eslint: add key-spacing and space-unary-ops rules
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
b9febfc1a3
commit
4e04f06142
9 changed files with 19 additions and 8 deletions
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',
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue