|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + extends: ['prettier'], |
| 4 | + plugins: ['import', 'prettier'], |
| 5 | + env: { |
| 6 | + es6: true, |
| 7 | + jest: true, |
| 8 | + node: true |
| 9 | + }, |
| 10 | + parser: 'babel-eslint', |
| 11 | + parserOptions: { |
| 12 | + ecmaVersion: 2018, |
| 13 | + sourceType: 'module', |
| 14 | + ecmaFeatures: { |
| 15 | + jsx: true |
| 16 | + } |
| 17 | + }, |
| 18 | + globals: { |
| 19 | + on: true // for the Socket file |
| 20 | + }, |
| 21 | + rules: { |
| 22 | + 'array-bracket-spacing': [ |
| 23 | + 'error', |
| 24 | + 'never', |
| 25 | + { |
| 26 | + objectsInArrays: false, |
| 27 | + arraysInArrays: false |
| 28 | + } |
| 29 | + ], |
| 30 | + 'arrow-parens': ['error', 'always'], |
| 31 | + 'arrow-spacing': ['error', { before: true, after: true }], |
| 32 | + 'comma-dangle': ['error', 'never'], |
| 33 | + curly: 'error', |
| 34 | + 'eol-last': 'error', |
| 35 | + 'func-names': 'off', |
| 36 | + 'id-length': [ |
| 37 | + 'error', |
| 38 | + { |
| 39 | + min: 2, |
| 40 | + max: 50, |
| 41 | + properties: 'never', |
| 42 | + exceptions: ['e', 'i', 'n', 't', 'x', 'y', 'z', '_', '$'] |
| 43 | + } |
| 44 | + ], |
| 45 | + 'no-alert': 'error', |
| 46 | + 'no-console': 'error', |
| 47 | + 'no-const-assign': 'error', |
| 48 | + 'no-else-return': 'error', |
| 49 | + 'no-empty': 'off', |
| 50 | + 'no-shadow': 'error', |
| 51 | + 'no-undef': 'error', |
| 52 | + 'no-unused-vars': 'error', |
| 53 | + 'no-use-before-define': 'error', |
| 54 | + 'no-useless-constructor': 'error', |
| 55 | + 'object-curly-newline': 'off', |
| 56 | + 'object-shorthand': 'off', |
| 57 | + 'prefer-const': 'error', |
| 58 | + 'prefer-destructuring': ['error', { object: true, array: false }], |
| 59 | + quotes: [ |
| 60 | + 'error', |
| 61 | + 'single', |
| 62 | + { |
| 63 | + allowTemplateLiterals: true, |
| 64 | + avoidEscape: true |
| 65 | + } |
| 66 | + ], |
| 67 | + semi: ['error', 'never'], |
| 68 | + 'spaced-comment': 'error', |
| 69 | + strict: ['error', 'never'], |
| 70 | + 'prettier/prettier': 'error' |
| 71 | + } |
| 72 | +} |
0 commit comments