2017-04-17 16:37:37 +02:00
|
|
|
const error = 2;
|
|
|
|
const warn = 1;
|
|
|
|
const ignore = 0;
|
|
|
|
|
2017-04-14 09:26:27 +02:00
|
|
|
module.exports = {
|
2017-05-26 14:10:52 +02:00
|
|
|
root: true,
|
2017-05-09 10:15:00 +02:00
|
|
|
extends: [
|
|
|
|
'@ndelangen/eslint-config-airbnb',
|
|
|
|
'prettier',
|
|
|
|
'plugin:jest/recommended'
|
|
|
|
],
|
2017-04-14 10:13:31 +02:00
|
|
|
plugins: [
|
|
|
|
'prettier',
|
2017-04-17 16:37:37 +02:00
|
|
|
'jest',
|
|
|
|
'react',
|
2017-04-02 00:22:33 +02:00
|
|
|
],
|
2017-04-14 10:13:31 +02:00
|
|
|
parser: 'babel-eslint',
|
|
|
|
parserOptions: {
|
|
|
|
sourceType: 'module',
|
2017-04-02 00:22:33 +02:00
|
|
|
},
|
2017-04-14 10:13:31 +02:00
|
|
|
env: {
|
|
|
|
es6: true,
|
|
|
|
node: true,
|
2017-04-17 16:37:37 +02:00
|
|
|
'jest/globals': true,
|
2017-04-02 00:22:33 +02:00
|
|
|
},
|
2017-04-14 10:13:31 +02:00
|
|
|
rules: {
|
2017-04-28 17:25:45 +02:00
|
|
|
strict: [error, 'never'],
|
2017-04-14 10:13:31 +02:00
|
|
|
'prettier/prettier': ['warn', {
|
|
|
|
printWidth: 100,
|
|
|
|
tabWidth: 2,
|
|
|
|
bracketSpacing: true,
|
2017-05-26 10:05:20 +02:00
|
|
|
trailingComma: 'es5',
|
2017-04-14 10:13:31 +02:00
|
|
|
singleQuote: true,
|
2017-04-02 00:22:33 +02:00
|
|
|
}],
|
2017-04-14 10:13:31 +02:00
|
|
|
quotes: ['warn', 'single'],
|
2017-04-17 16:37:49 +02:00
|
|
|
'class-methods-use-this': ignore,
|
2017-04-14 10:13:31 +02:00
|
|
|
'arrow-parens': ['warn', 'as-needed'],
|
2017-04-17 16:37:37 +02:00
|
|
|
'space-before-function-paren': ignore,
|
2017-05-19 01:17:26 +02:00
|
|
|
'import/no-unresolved': warn,
|
|
|
|
'import/extentions': warn,
|
|
|
|
'import/no-extraneous-dependencies': [warn, {
|
2017-05-09 10:15:00 +02:00
|
|
|
devDependencies: [
|
|
|
|
'**/*.test.js',
|
|
|
|
'**/scripts/*.js',
|
|
|
|
'**/stories/*.js',
|
|
|
|
'**/__tests__/*.js'
|
|
|
|
],
|
2017-04-28 17:25:45 +02:00
|
|
|
peerDependencies: true
|
|
|
|
}],
|
2017-04-17 16:37:37 +02:00
|
|
|
'import/prefer-default-export': ignore,
|
|
|
|
'react/jsx-uses-react': error,
|
|
|
|
'react/jsx-uses-vars': error,
|
|
|
|
'react/react-in-jsx-scope': error,
|
2017-04-28 17:25:45 +02:00
|
|
|
'react/jsx-filename-extension': [warn, {
|
|
|
|
extensions: ['.js', '.jsx']
|
|
|
|
}],
|
2017-05-09 10:15:00 +02:00
|
|
|
'jsx-a11y/accessible-emoji': ignore,
|
2017-04-28 17:25:45 +02:00
|
|
|
'react/no-unescaped-entities': ignore,
|
2017-04-14 09:26:27 +02:00
|
|
|
},
|
2017-04-02 00:22:33 +02:00
|
|
|
}
|