github.com/grafana/pyroscope@v1.18.0/.eslintrc.js (about) 1 module.exports = { 2 plugins: ['@typescript-eslint', 'css-modules'], 3 extends: [ 4 '@grafana/eslint-config', 5 'plugin:import/recommended', 6 'plugin:import/typescript', 7 ], 8 plugins: ['unused-imports'], 9 rules: { 10 'react/react-in-jsx-scope': 'error', 11 'react-hooks/exhaustive-deps': 'error', 12 'no-duplicate-imports': 'off', 13 '@typescript-eslint/naming-convention': [ 14 'warn', 15 { selector: 'function', format: ['PascalCase', 'camelCase'] }, 16 ], 17 '@typescript-eslint/no-duplicate-imports': 'error', 18 '@typescript-eslint/no-unused-vars': 'off', 19 'unused-imports/no-unused-imports': 'error', 20 'unused-imports/no-unused-vars': [ 21 'error', 22 { 23 vars: 'all', 24 varsIgnorePattern: '^_', 25 args: 'after-used', 26 argsIgnorePattern: '^_', 27 }, 28 ], 29 'import/no-relative-packages': 'error', 30 'no-restricted-imports': [ 31 'error', 32 { 33 patterns: [ 34 // Dialing back this restriction for now 35 // { 36 // group: ['../*', './*'], 37 // message: 38 // 'Usage of relative parent imports is not allowed. Please use absolute(use alias) imports instead.', 39 // }, 40 ], 41 }, 42 ], 43 'react/prop-types': ['off'], 44 }, 45 env: { 46 browser: true, 47 jquery: true, 48 }, 49 settings: { 50 'import/internal-regex': '^@webapp', 51 'import/resolver': { 52 node: { 53 extensions: ['.ts', '.tsx', '.es6', '.js', '.json', '.svg'], 54 }, 55 typescript: { 56 project: 'tsconfig.json', 57 }, 58 }, 59 }, 60 parserOptions: { 61 project: ['tsconfig.json'], 62 }, 63 overrides: [ 64 { 65 // For tests it's fine to import with ./myfile, since tests won't be overriden downstream 66 files: ['*.spec.tsx', '*.spec.ts'], 67 rules: { 68 'no-restricted-imports': 'off', 69 }, 70 }, 71 ], 72 };