|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + env: { |
| 4 | + node: true, |
| 5 | + es2021: true, |
| 6 | + }, |
| 7 | + extends: [ |
| 8 | + 'airbnb-typescript/base', |
| 9 | + 'eslint:recommended', |
| 10 | + 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
| 11 | + 'plugin:import/errors', |
| 12 | + 'plugin:import/typescript', |
| 13 | + 'prettier', |
| 14 | + ], |
| 15 | + parser: '@typescript-eslint/parser', |
| 16 | + parserOptions: { |
| 17 | + project: './tsconfig.json', |
| 18 | + tsconfigRootDir: __dirname, |
| 19 | + }, |
| 20 | + plugins: ['@typescript-eslint', 'import'], |
| 21 | + rules: { |
| 22 | + 'no-console': ['error', { allow: ['warn', 'error'] }], |
| 23 | + '@typescript-eslint/naming-convention': 'warn', |
| 24 | + 'no-unused-vars': 'off', |
| 25 | + '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], |
| 26 | + '@typescript-eslint/lines-between-class-members': 'off', |
| 27 | + '@typescript-eslint/restrict-template-expressions': 'error', |
| 28 | + '@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false }], |
| 29 | + 'import/no-unresolved': 'error', |
| 30 | + 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], |
| 31 | + }, |
| 32 | + settings: { |
| 33 | + 'import/resolver': { |
| 34 | + typescript: { |
| 35 | + alwaysTryTypes: true, |
| 36 | + }, |
| 37 | + }, |
| 38 | + }, |
| 39 | + overrides: [ |
| 40 | + { |
| 41 | + files: ['*.js'], |
| 42 | + rules: { |
| 43 | + '@typescript-eslint/no-var-requires': 'off', |
| 44 | + }, |
| 45 | + }, |
| 46 | + ], |
| 47 | + ignorePatterns: ['out', 'dist', 'server', '**/*.d.ts'], |
| 48 | +}; |
0 commit comments