|
1 | 1 | module.exports = { |
2 | | - "env": { |
3 | | - "node": true |
4 | | - }, |
5 | | - "plugins": [ |
6 | | - "node", |
7 | | - "prettier", |
| 2 | + 'root': true, |
| 3 | + 'overrides': [ |
| 4 | + { |
| 5 | + 'env': { |
| 6 | + 'node': true, |
| 7 | + }, |
| 8 | + 'files': ['**/*.js', '**/*.jsx'], |
| 9 | + 'plugins': ['node', 'jest', 'prettier'], |
| 10 | + 'extends': ['airbnb-base', 'plugin:jest/recommended', 'plugin:jest/style', 'prettier'], |
| 11 | + 'rules': { |
| 12 | + 'camelcase': 'off', |
| 13 | + 'import/extensions': 'off', |
| 14 | + 'no-template-curly-in-string': 'off', |
| 15 | + 'no-underscore-dangle': 'off', |
| 16 | + 'prefer-const': 'error', |
| 17 | + 'prettier/prettier': 'error', |
| 18 | + }, |
| 19 | + }, |
| 20 | + { |
| 21 | + 'files': ['*.test.js', '*.test.jsx'], |
| 22 | + 'rules': { |
| 23 | + 'jest/expect-expect': 'off', |
| 24 | + 'jest/no-conditional-expect': 'off', |
| 25 | + 'jest/no-done-callback': 'off', |
| 26 | + 'jest/no-standalone-expect': 'off', |
| 27 | + 'jest/no-try-expect': 'off', |
| 28 | + 'no-unused-vars': 'off', |
| 29 | + }, |
| 30 | + }, |
| 31 | + { |
| 32 | + 'files': ['**/*.ts', '**/*.tsx'], |
| 33 | + 'env': { |
| 34 | + 'node': true, |
| 35 | + }, |
| 36 | + 'extends': ['airbnb-typescript/base', 'prettier'], |
| 37 | + 'parser': '@typescript-eslint/parser', |
| 38 | + 'parserOptions': { |
| 39 | + 'project': 'tsconfig.json', |
| 40 | + 'sourceType': 'module', |
| 41 | + }, |
| 42 | + 'plugins': ['eslint-plugin-jsdoc', 'eslint-plugin-import', '@typescript-eslint', 'prettier'], |
| 43 | + 'rules': { |
| 44 | + '@typescript-eslint/naming-convention': 'off', |
| 45 | + '@typescript-eslint/no-unused-vars': 'off', |
| 46 | + 'max-len': 'off', |
| 47 | + 'no-param-reassign': 'off', |
| 48 | + 'no-underscore-dangle': 'off', |
| 49 | + 'prettier/prettier': 'error', |
| 50 | + 'spaced-comment': ['error', 'always', { 'exceptions': ['*'] }], |
| 51 | + }, |
| 52 | + }, |
8 | 53 | ], |
9 | | - "extends": [ |
10 | | - "eslint:recommended", |
11 | | - "google", |
12 | | - "plugin:node/recommended", |
13 | | - "prettier", |
14 | | - ], |
15 | | - "rules": { |
16 | | - "prettier/prettier": ["error", {"singleQuote": true, "printWidth": 100}], |
17 | | - "prefer-const": "error", |
18 | | - "prefer-rest-params": "off", // https://github.com/mysticatea/eslint-plugin-node/issues/63 |
19 | | - // The rest of these override rules that are enabled by one of the configs we extend but not compatible with current codebase |
20 | | - // todo: fix issues and then remove overrides here |
21 | | - "valid-jsdoc": "off", // too many issues; drowns out everything else |
22 | | - "camelcase": "off", // todo: determine if we should keep this off globally, or disable it on a per-line basis |
23 | | - } |
24 | 54 | }; |
0 commit comments