|
| 1 | +const off = 0; |
| 2 | +const warn = 1; |
| 3 | +const error = 2; |
| 4 | + |
| 5 | +module.exports = { |
| 6 | + extends: [ |
| 7 | + 'airbnb-base', |
| 8 | + 'plugin:flowtype/recommended', |
| 9 | + 'plugin:import/errors', |
| 10 | + 'plugin:import/warnings' |
| 11 | + ], |
| 12 | + plugins: ['import'], |
| 13 | + env: { |
| 14 | + es6: true, |
| 15 | + node: true, |
| 16 | + browser: true, |
| 17 | + }, |
| 18 | + globals: { |
| 19 | + '$Diff': true, |
| 20 | + }, |
| 21 | + rules: { |
| 22 | + 'comma-dangle': [ |
| 23 | + error, |
| 24 | + { |
| 25 | + arrays: 'always-multiline', |
| 26 | + objects: 'always-multiline', |
| 27 | + imports: 'always-multiline', |
| 28 | + exports: 'always-multiline', |
| 29 | + functions: 'only-multiline', |
| 30 | + }, |
| 31 | + ], |
| 32 | + 'function-paren-newline': [error, 'consistent'], |
| 33 | + 'global-require': off, |
| 34 | + 'import/extensions': off, |
| 35 | + 'import/no-deprecated': warn, |
| 36 | + 'import/no-unresolved': off, |
| 37 | + 'import/prefer-default-export': off, |
| 38 | + indent: off, |
| 39 | + 'lines-between-class-members': [error, 'always', { exceptAfterSingleLine: true }], |
| 40 | + 'max-len': [error, 200, { ignoreComments: true }], |
| 41 | + 'no-console': error, |
| 42 | + 'no-multiple-empty-lines': [error, { max: error, maxEOF: error }], |
| 43 | + 'no-implicit-coercion': error, |
| 44 | + 'no-undef': off, |
| 45 | + 'no-underscore-dangle': off, |
| 46 | + 'no-unused-vars': [ |
| 47 | + error, { |
| 48 | + args: 'after-used', |
| 49 | + ignoreRestSiblings: false, |
| 50 | + varsIgnorePattern: 'Fragment', |
| 51 | + }, |
| 52 | + ], |
| 53 | + 'object-curly-newline': [error, { consistent: true }], |
| 54 | + 'prefer-spread': off, |
| 55 | + 'quotes': [error, 'single'], |
| 56 | + }, |
| 57 | + parser: 'babel-eslint', |
| 58 | + overrides: [ |
| 59 | + { |
| 60 | + files: ['src/utils/*.js'], |
| 61 | + rules: { |
| 62 | + 'no-lonely-if': false, |
| 63 | + 'no-param-reassign': false, |
| 64 | + }, |
| 65 | + }, |
| 66 | + { |
| 67 | + files: ['src/**/*.test.js'], |
| 68 | + rules: { |
| 69 | + 'max-len': off, |
| 70 | + 'no-undef': off, |
| 71 | + }, |
| 72 | + }, |
| 73 | + ], |
| 74 | +}; |
0 commit comments