This repository has been archived by the owner on Jun 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update eslint config * update eslint * use latest yarn version * add comment for travis config
- Loading branch information
Alexander Ivantsov
authored
Oct 3, 2017
1 parent
a3a7fe2
commit 767fdd5
Showing
90 changed files
with
2,641 additions
and
2,487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,76 @@ | ||
const {resolve} = require('./webpack/base'); | ||
|
||
const INDENT = 4; | ||
|
||
const base = { | ||
// disabled | ||
'max-len': 'off', | ||
'arrow-parens': 'off', | ||
'arrow-body-style': 'off', | ||
'no-prototype-builtins': 'off', | ||
'no-plusplus': 'off', | ||
// disabled | ||
'max-len': 'off', | ||
'arrow-parens': 'off', | ||
'arrow-body-style': 'off', | ||
'no-prototype-builtins': 'off', | ||
'no-plusplus': 'off', | ||
|
||
// modified | ||
indent: ['error', INDENT, { | ||
SwitchCase: 1 | ||
}], | ||
'brace-style': ['error', 'stroustrup', { | ||
'allowSingleLine': false | ||
}], | ||
'object-curly-spacing': ['error', 'never'], | ||
'one-var': ['error', { | ||
initialized: 'never' | ||
}], | ||
'one-var-declaration-per-line': ['error', 'initializations'], | ||
// modified | ||
'object-curly-spacing': ['error', 'never'], | ||
'one-var': ['error', { | ||
initialized: 'never' | ||
}], | ||
'one-var-declaration-per-line': ['error', 'initializations'], | ||
}; | ||
|
||
const react = { | ||
// disabled | ||
'react/forbid-prop-types': 'off', | ||
'react/no-array-index-key': 'off', | ||
// disabled | ||
'react/forbid-prop-types': 'off', | ||
'react/no-array-index-key': 'off', | ||
|
||
// modified | ||
'react/jsx-filename-extension': ['error', {extensions: ['.js']}], | ||
'react/jsx-indent': ['error', INDENT], | ||
'react/jsx-indent-props': ['error', INDENT], | ||
'react/jsx-tag-spacing': ['error', { | ||
closingSlash: 'never', | ||
beforeSelfClosing: 'never', | ||
afterOpening: 'never' | ||
}], | ||
'react/sort-comp': ['error', { | ||
order: [ | ||
'static-methods', | ||
'lifecycle', | ||
'rendering', | ||
'everything-else' | ||
], | ||
groups: { | ||
rendering: [ | ||
'render', | ||
'/^render.+$/' | ||
] | ||
} | ||
}], | ||
// modified | ||
'react/jsx-filename-extension': ['error', {extensions: ['.js']}], | ||
'react/jsx-tag-spacing': ['error', { | ||
closingSlash: 'never', | ||
beforeSelfClosing: 'never', | ||
afterOpening: 'never' | ||
}], | ||
'react/sort-comp': ['error', { | ||
order: [ | ||
'static-methods', | ||
'lifecycle', | ||
'rendering', | ||
'everything-else' | ||
], | ||
groups: { | ||
rendering: [ | ||
'render', | ||
'/^render.+$/' | ||
] | ||
} | ||
}], | ||
}; | ||
|
||
const other = { | ||
'jsx-a11y/no-static-element-interactions': 'off' | ||
'jsx-a11y/no-static-element-interactions': 'off' | ||
}; | ||
|
||
module.exports = { | ||
parser: 'babel-eslint', | ||
extends: 'airbnb', | ||
env: { | ||
webextensions: true, | ||
browser: true, | ||
jest: true | ||
}, | ||
globals: { | ||
__DEV__: false | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
webpack: { | ||
config: { | ||
resolve | ||
} | ||
} | ||
parser: 'babel-eslint', | ||
extends: 'airbnb', | ||
env: { | ||
webextensions: true, | ||
browser: true, | ||
jest: true | ||
}, | ||
globals: { | ||
__DEV__: false | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
webpack: { | ||
config: { | ||
resolve | ||
} | ||
}, | ||
rules: Object.assign({}, | ||
base, | ||
react, | ||
other | ||
) | ||
} | ||
} | ||
}, | ||
rules: { | ||
...base, | ||
...react, | ||
...other, | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
module.exports = { | ||
rootDir: './src', | ||
clearMocks: true, | ||
resetModules: true, | ||
moduleDirectories: [ | ||
'node_modules', | ||
'src/pages', | ||
], | ||
moduleNameMapper: { | ||
'\\.(less)$': 'identity-obj-proxy', | ||
}, | ||
testPathIgnorePatterns: [ | ||
'/node_modules/', | ||
'fixtures.js', | ||
], | ||
rootDir: './src', | ||
clearMocks: true, | ||
resetModules: true, | ||
moduleDirectories: [ | ||
'node_modules', | ||
'src/pages', | ||
], | ||
moduleNameMapper: { | ||
'\\.(less)$': 'identity-obj-proxy', | ||
}, | ||
testPathIgnorePatterns: [ | ||
'/node_modules/', | ||
'fixtures.js', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const i18n = require('webext-i18n'); | ||
|
||
i18n({ | ||
inputDir: './src/locales', | ||
outputDir: './dist/_locales', | ||
inputDir: './src/locales', | ||
outputDir: './dist/_locales', | ||
}).then(() => console.log('Locales are generated.')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.