|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + parser: '@typescript-eslint/parser', |
| 4 | + parserOptions: { |
| 5 | + ecmaVersion: 2020, |
| 6 | + sourceType: 'module', |
| 7 | + }, |
| 8 | + plugins: ['@typescript-eslint', 'prettier'], |
| 9 | + extends: [ |
| 10 | + 'eslint:recommended', |
| 11 | + 'plugin:@typescript-eslint/recommended', |
| 12 | + 'plugin:prettier/recommended', |
| 13 | + ], |
| 14 | + env: { |
| 15 | + node: true, |
| 16 | + es6: true, |
| 17 | + }, |
| 18 | + overrides: [ |
| 19 | + { |
| 20 | + files: ['test/**/*.js', 'test/**/*.ts'], |
| 21 | + env: { |
| 22 | + jest: true, |
| 23 | + }, |
| 24 | + }, |
| 25 | + { |
| 26 | + files: ['src/types/**/*.ts', 'src/validation/**/*.ts', 'src/core/**/*.ts'], |
| 27 | + rules: { |
| 28 | + '@typescript-eslint/no-unused-vars': [ |
| 29 | + 'warn', |
| 30 | + { |
| 31 | + argsIgnorePattern: '^_', |
| 32 | + varsIgnorePattern: '^_', |
| 33 | + ignoreRestSiblings: true, |
| 34 | + args: 'none', |
| 35 | + caughtErrorsIgnorePattern: '^_', |
| 36 | + }, |
| 37 | + ], |
| 38 | + }, |
| 39 | + }, |
| 40 | + { |
| 41 | + files: ['src/commands/**/*.ts'], |
| 42 | + rules: { |
| 43 | + '@typescript-eslint/no-unused-vars': [ |
| 44 | + 'warn', |
| 45 | + { |
| 46 | + argsIgnorePattern: 'options', |
| 47 | + varsIgnorePattern: '^_', |
| 48 | + ignoreRestSiblings: true, |
| 49 | + args: 'after-used', |
| 50 | + caughtErrorsIgnorePattern: '^_', |
| 51 | + }, |
| 52 | + ], |
| 53 | + }, |
| 54 | + }, |
| 55 | + ], |
| 56 | + rules: { |
| 57 | + 'prettier/prettier': 'error', |
| 58 | + '@typescript-eslint/no-explicit-any': 'error', |
| 59 | + 'no-unused-vars': 'warn', |
| 60 | + '@typescript-eslint/no-unused-vars': [ |
| 61 | + 'warn', |
| 62 | + { |
| 63 | + argsIgnorePattern: 'options', |
| 64 | + varsIgnorePattern: '^_', |
| 65 | + ignoreRestSiblings: true, |
| 66 | + args: 'after-used', |
| 67 | + caughtErrorsIgnorePattern: '^_', |
| 68 | + }, |
| 69 | + ], |
| 70 | + eqeqeq: ['error', 'always'], |
| 71 | + 'consistent-return': 'error', |
| 72 | + 'no-implicit-coercion': 'warn', |
| 73 | + '@typescript-eslint/explicit-module-boundary-types': 'warn', |
| 74 | + }, |
| 75 | +}; |
0 commit comments