|
| 1 | +module.exports = { |
| 2 | + parser: '@typescript-eslint/parser', |
| 3 | + parserOptions: { |
| 4 | + sourceType: 'module', |
| 5 | + }, |
| 6 | + plugins: ['@typescript-eslint/eslint-plugin', 'import', '@stylistic/ts'], |
| 7 | + extends: [ |
| 8 | + 'eslint:recommended', |
| 9 | + 'plugin:@typescript-eslint/eslint-recommended', |
| 10 | + 'plugin:@typescript-eslint/recommended', |
| 11 | + 'prettier', |
| 12 | + 'plugin:sonarjs/recommended-legacy', |
| 13 | + 'plugin:import/recommended', |
| 14 | + 'plugin:import/typescript', |
| 15 | + ], |
| 16 | + root: true, |
| 17 | + env: { |
| 18 | + node: true, |
| 19 | + jest: true, |
| 20 | + }, |
| 21 | + ignorePatterns: [ |
| 22 | + '**/node_modules/*', |
| 23 | + 'dist', |
| 24 | + 'tests', |
| 25 | + 'scripts', |
| 26 | + 'resources', |
| 27 | + '.dev', |
| 28 | + '.devops', |
| 29 | + '.debug', |
| 30 | + ], |
| 31 | + rules: { |
| 32 | + 'no-console': 'error', |
| 33 | + '@typescript-eslint/no-explicit-any': 'off', |
| 34 | + '@typescript-eslint/no-inferrable-types': 'error', |
| 35 | + '@typescript-eslint/interface-name-prefix': 'off', |
| 36 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 37 | + 'no-eval': 'error', |
| 38 | + 'no-implied-eval': 'error', |
| 39 | + 'prefer-promise-reject-errors': 'warn', |
| 40 | + complexity: ['error', 20], |
| 41 | + 'import/no-unresolved': 'error', |
| 42 | + 'import/order': [ |
| 43 | + 'error', |
| 44 | + { |
| 45 | + alphabetize: { |
| 46 | + /* sort in ascending order. Options: ["ignore", "asc", "desc"] */ |
| 47 | + order: 'asc', |
| 48 | + /* ignore case. Options: [true, false] */ |
| 49 | + caseInsensitive: true, |
| 50 | + }, |
| 51 | + }, |
| 52 | + ], |
| 53 | + }, |
| 54 | + settings: { |
| 55 | + 'import/resolver': { |
| 56 | + typescript: { |
| 57 | + project: './tsconfig.json', |
| 58 | + }, |
| 59 | + }, |
| 60 | + }, |
| 61 | +}; |
0 commit comments