|
| 1 | +module.exports = { |
| 2 | + extends: [ |
| 3 | + '@grafana/eslint-config', |
| 4 | + 'plugin:import/recommended', |
| 5 | + 'plugin:import/typescript', |
| 6 | + ], |
| 7 | + plugins: ['unused-imports'], |
| 8 | + rules: { |
| 9 | + 'react-hooks/exhaustive-deps': 'warn', |
| 10 | + 'no-duplicate-imports': 'off', |
| 11 | + '@typescript-eslint/no-duplicate-imports': 'error', |
| 12 | + '@typescript-eslint/no-unused-vars': 'off', |
| 13 | + 'unused-imports/no-unused-imports': 'error', |
| 14 | + 'unused-imports/no-unused-vars': [ |
| 15 | + 'warn', |
| 16 | + { |
| 17 | + vars: 'all', |
| 18 | + varsIgnorePattern: '^_', |
| 19 | + args: 'after-used', |
| 20 | + argsIgnorePattern: '^_', |
| 21 | + }, |
| 22 | + ], |
| 23 | + 'import/no-relative-packages': 'error', |
| 24 | + 'no-restricted-imports': [ |
| 25 | + 'error', |
| 26 | + { |
| 27 | + patterns: [ |
| 28 | + { |
| 29 | + group: ['../*', './*'], |
| 30 | + message: |
| 31 | + 'Usage of relative parent imports is not allowed. Please use absolute(use alias) imports instead.', |
| 32 | + }, |
| 33 | + ], |
| 34 | + }, |
| 35 | + ], |
| 36 | + }, |
| 37 | + env: { |
| 38 | + browser: true, |
| 39 | + jquery: true, |
| 40 | + }, |
| 41 | + settings: { |
| 42 | + 'import/internal-regex': '^@webapp', |
| 43 | + 'import/resolver': { |
| 44 | + node: { |
| 45 | + extensions: ['.ts', '.tsx', '.es6', '.js', '.json', '.svg'], |
| 46 | + }, |
| 47 | + typescript: { |
| 48 | + project: 'tsconfig.json', |
| 49 | + }, |
| 50 | + }, |
| 51 | + }, |
| 52 | + parserOptions: { |
| 53 | + project: ['tsconfig.json'], |
| 54 | + }, |
| 55 | +}; |
0 commit comments