sforkowany z mirror/soapbox
Merge branch 'eslint-rules' into 'develop'
eslint: add key-spacing and space-unary-ops rules See merge request soapbox-pub/soapbox-fe!890features-override
commit
665d7a1e1f
11
.eslintrc.js
11
.eslintrc.js
|
@ -69,6 +69,10 @@ module.exports = {
|
||||||
eqeqeq: 'error',
|
eqeqeq: 'error',
|
||||||
indent: ['error', 2],
|
indent: ['error', 2],
|
||||||
'jsx-quotes': ['error', 'prefer-single'],
|
'jsx-quotes': ['error', 'prefer-single'],
|
||||||
|
'key-spacing': [
|
||||||
|
'error',
|
||||||
|
{ mode: 'minimum' },
|
||||||
|
],
|
||||||
'no-catch-shadow': 'error',
|
'no-catch-shadow': 'error',
|
||||||
'no-cond-assign': 'error',
|
'no-cond-assign': 'error',
|
||||||
'no-console': [
|
'no-console': [
|
||||||
|
@ -111,6 +115,13 @@ module.exports = {
|
||||||
'prefer-const': 'error',
|
'prefer-const': 'error',
|
||||||
quotes: ['error', 'single'],
|
quotes: ['error', 'single'],
|
||||||
semi: 'error',
|
semi: 'error',
|
||||||
|
'space-unary-ops': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
words: true,
|
||||||
|
nonwords: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
strict: 'off',
|
strict: 'off',
|
||||||
'valid-typeof': 'error',
|
'valid-typeof': 'error',
|
||||||
|
|
||||||
|
|
|
@ -367,7 +367,7 @@ export const fetchAccountLists = accountId => (dispatch, getState) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const fetchAccountListsRequest = id => ({
|
export const fetchAccountListsRequest = id => ({
|
||||||
type:LIST_ADDER_LISTS_FETCH_REQUEST,
|
type: LIST_ADDER_LISTS_FETCH_REQUEST,
|
||||||
id,
|
id,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -235,7 +235,7 @@ class Header extends ImmutablePureComponent {
|
||||||
menu.push({
|
menu.push({
|
||||||
text: intl.formatMessage(messages.direct, { name: account.get('username') }),
|
text: intl.formatMessage(messages.direct, { name: account.get('username') }),
|
||||||
action: this.props.onDirect,
|
action: this.props.onDirect,
|
||||||
icon:require('@tabler/icons/icons/mail.svg'),
|
icon: require('@tabler/icons/icons/mail.svg'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ export default class Conversation extends ImmutablePureComponent {
|
||||||
conversationId: PropTypes.string.isRequired,
|
conversationId: PropTypes.string.isRequired,
|
||||||
accounts: ImmutablePropTypes.list.isRequired,
|
accounts: ImmutablePropTypes.list.isRequired,
|
||||||
lastStatusId: PropTypes.string,
|
lastStatusId: PropTypes.string,
|
||||||
unread:PropTypes.bool.isRequired,
|
unread: PropTypes.bool.isRequired,
|
||||||
onMoveUp: PropTypes.func,
|
onMoveUp: PropTypes.func,
|
||||||
onMoveDown: PropTypes.func,
|
onMoveDown: PropTypes.func,
|
||||||
markRead: PropTypes.func.isRequired,
|
markRead: PropTypes.func.isRequired,
|
||||||
|
|
|
@ -34,7 +34,7 @@ export default @injectIntl class Accordion extends React.PureComponent {
|
||||||
const { headline, children, menu, expanded, intl } = this.props;
|
const { headline, children, menu, expanded, intl } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classNames('accordion', { 'accordion--expanded' : expanded })}>
|
<div className={classNames('accordion', { 'accordion--expanded': expanded })}>
|
||||||
{menu && (
|
{menu && (
|
||||||
<div className='accordion__menu'>
|
<div className='accordion__menu'>
|
||||||
<DropdownMenu items={menu} icon='ellipsis-v' size={18} direction='right' />
|
<DropdownMenu items={menu} icon='ellipsis-v' size={18} direction='right' />
|
||||||
|
|
|
@ -16,7 +16,7 @@ class ColumnsArea extends ImmutablePureComponent {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { children } = this.props;
|
const { children } = this.props;
|
||||||
const layout = this.props.layout || { LEFT:null, RIGHT:null };
|
const layout = this.props.layout || { LEFT: null, RIGHT: null };
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='page'>
|
<div className='page'>
|
||||||
|
|
|
@ -38,7 +38,7 @@ const MODAL_COMPONENTS = {
|
||||||
'EMBED': EmbedModal,
|
'EMBED': EmbedModal,
|
||||||
'LIST_EDITOR': ListEditor,
|
'LIST_EDITOR': ListEditor,
|
||||||
'FOCAL_POINT': FocalPointModal,
|
'FOCAL_POINT': FocalPointModal,
|
||||||
'LIST_ADDER':ListAdder,
|
'LIST_ADDER': ListAdder,
|
||||||
'HOTKEYS': HotkeysModal,
|
'HOTKEYS': HotkeysModal,
|
||||||
'COMPOSE': ComposeModal,
|
'COMPOSE': ComposeModal,
|
||||||
'UNAUTHORIZED': UnauthorizedModal,
|
'UNAUTHORIZED': UnauthorizedModal,
|
||||||
|
|
|
@ -127,7 +127,7 @@ class ProfileDropdown extends React.PureComponent {
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='compose__action-bar' style={{ 'marginTop':'-6px' }}>
|
<div className='compose__action-bar' style={{ marginTop: '-6px' }}>
|
||||||
<div className='compose__action-bar-dropdown'>
|
<div className='compose__action-bar-dropdown'>
|
||||||
<DropdownMenuContainer items={menu} icon='chevron-down' size={size} direction='right' />
|
<DropdownMenuContainer items={menu} icon='chevron-down' size={size} direction='right' />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -152,7 +152,7 @@ const extractedMessages = extractedMessagesFiles.reduce((acc, messageFile) => {
|
||||||
const translations = languages.map((language) => {
|
const translations = languages.map((language) => {
|
||||||
return {
|
return {
|
||||||
language: language,
|
language: language,
|
||||||
data : JSON.parse(fs.readFileSync(path.join(translationsDirectory, language + '.json'), 'utf8')),
|
data: JSON.parse(fs.readFileSync(path.join(translationsDirectory, language + '.json'), 'utf8')),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue