|
| 1 | +module.exports = { |
| 2 | + parser: '@typescript-eslint/parser', |
| 3 | + extends: [ |
| 4 | + 'plugin:import/errors', |
| 5 | + 'plugin:import/warnings', |
| 6 | + 'plugin:import/typescript', |
| 7 | + 'plugin:@typescript-eslint/recommended', |
| 8 | + 'plugin:prettier/recommended', |
| 9 | + ], |
| 10 | + parserOptions: { |
| 11 | + ecmaVersion: 2018, |
| 12 | + sourceType: 'module', |
| 13 | + }, |
| 14 | + settings: { |
| 15 | + 'import/resolver': { |
| 16 | + typescript: { |
| 17 | + project: 'packages/*/tsconfig.json', |
| 18 | + }, |
| 19 | + }, |
| 20 | + }, |
| 21 | + rules: { |
| 22 | + 'no-console': 1, |
| 23 | + 'import/no-named-as-default': 0, |
| 24 | + // https://github.com/benmosher/eslint-plugin-import/blob/HEAD/docs/rules/order.md |
| 25 | + 'import/order': ['error', { 'newlines-between': 'always' }], |
| 26 | + 'import/newline-after-import': 'error', |
| 27 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 28 | + '@typescript-eslint/no-var-requires': 'off', |
| 29 | + '@typescript-eslint/explicit-member-accessibility': 'off', |
| 30 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 31 | + '@typescript-eslint/explicit-module-boundary-types': 'off', |
| 32 | + '@typescript-eslint/no-explicit-any': 'off', |
| 33 | + '@typescript-eslint/no-unused-vars': [ |
| 34 | + process.env.NODE_ENV === 'production' ? 2 : 1, |
| 35 | + { |
| 36 | + vars: 'all', |
| 37 | + args: 'after-used', |
| 38 | + ignoreRestSiblings: true, |
| 39 | + caughtErrors: 'none', |
| 40 | + varsIgnorePattern: '^_', |
| 41 | + argsIgnorePattern: '^_', |
| 42 | + }, |
| 43 | + ], |
| 44 | + }, |
| 45 | +}; |
0 commit comments