|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + extends: ['@strapi/eslint-config/back/typescript'], |
| 4 | + parser: '@typescript-eslint/parser', |
| 5 | + plugins: ['@typescript-eslint', 'eslint-plugin-rxjs'], |
| 6 | + parserOptions: { |
| 7 | + project: ['./tsconfig.eslint.json'], |
| 8 | + }, |
| 9 | + overrides: [ |
| 10 | + { |
| 11 | + files: ['./scripts/**/*', './src/cli/errors.ts', './src/cli/index.ts'], |
| 12 | + rules: { |
| 13 | + 'no-console': ['error', { allow: ['error'] }], |
| 14 | + }, |
| 15 | + }, |
| 16 | + { |
| 17 | + files: ['./src/cli/commands/utils/logger.ts'], |
| 18 | + rules: { |
| 19 | + 'no-console': 'off', |
| 20 | + }, |
| 21 | + }, |
| 22 | + ], |
| 23 | + rules: { |
| 24 | + 'rxjs/finnish': 'error', |
| 25 | + // TODO: The following rules from @strapi/eslint-config/back/typescript are disabled because they're causing problems we need to solve or fix |
| 26 | + // to be solved in configuration |
| 27 | + 'node/no-unsupported-features/es-syntax': 'off', |
| 28 | + 'import/prefer-default-export': 'off', |
| 29 | + 'import/namespace': 'off', |
| 30 | + 'node/no-missing-import': 'off', |
| 31 | + 'no-process-exit': 'off', |
| 32 | + 'import/no-dynamic-require': 'off', |
| 33 | + 'global-require': 'off', |
| 34 | + 'no-underscore-dangle': 'off', |
| 35 | + '@typescript-eslint/no-use-before-define': 'off', |
| 36 | + '@typescript-eslint/no-explicit-any': 'off', |
| 37 | + /** |
| 38 | + * Force us to use the Logger instance. |
| 39 | + */ |
| 40 | + 'no-console': 'error', |
| 41 | + 'import/extensions': 'off', |
| 42 | + 'import/order': [ |
| 43 | + 'error', |
| 44 | + { |
| 45 | + groups: [ |
| 46 | + ['external', 'internal', 'builtin'], |
| 47 | + 'parent', |
| 48 | + ['sibling', 'index'], |
| 49 | + 'object', |
| 50 | + 'type', |
| 51 | + ], |
| 52 | + 'newlines-between': 'always', |
| 53 | + alphabetize: { order: 'asc', caseInsensitive: true }, |
| 54 | + }, |
| 55 | + ], |
| 56 | + 'nonblock-statement-body-position': ['error', 'below'], |
| 57 | + }, |
| 58 | +}; |
0 commit comments