|
| 1 | +'use strict' |
| 2 | + |
| 3 | +module.exports = { |
| 4 | + extends: [ |
| 5 | + '@strv/eslint-config-typescript', |
| 6 | + '@strv/eslint-config-typescript/optional', |
| 7 | + '@strv/eslint-config-typescript/style', |
| 8 | + |
| 9 | + '@strv/eslint-config-react', |
| 10 | + '@strv/eslint-config-react/optional', |
| 11 | + '@strv/eslint-config-react/style', |
| 12 | + |
| 13 | + 'prettier', |
| 14 | + ], |
| 15 | + plugins: ['@typescript-eslint', 'import', 'jest'], |
| 16 | + parser: '@typescript-eslint/parser', |
| 17 | + parserOptions: { |
| 18 | + tsconfigRootDir: __dirname, |
| 19 | + project: ['./tsconfig.json'], |
| 20 | + }, |
| 21 | + env: { |
| 22 | + 'jest/globals': true, |
| 23 | + }, |
| 24 | + rules: { |
| 25 | + '@typescript-eslint/naming-convention': [ |
| 26 | + 'warn', |
| 27 | + { |
| 28 | + selector: 'default', |
| 29 | + format: ['camelCase'], |
| 30 | + leadingUnderscore: 'allow', |
| 31 | + trailingUnderscore: 'allow', |
| 32 | + }, |
| 33 | + /** |
| 34 | + * To also support format for React components which are using `PascalCase` |
| 35 | + */ |
| 36 | + { |
| 37 | + selector: 'variable', |
| 38 | + format: ['camelCase', 'PascalCase', 'UPPER_CASE'], |
| 39 | + leadingUnderscore: 'allow', |
| 40 | + trailingUnderscore: 'allow', |
| 41 | + }, |
| 42 | + { |
| 43 | + selector: 'typeLike', |
| 44 | + format: ['PascalCase'], |
| 45 | + }, |
| 46 | + ], |
| 47 | + 'padding-line-between-statements': 'off', |
| 48 | + |
| 49 | + '@typescript-eslint/prefer-readonly-parameter-types': 'off', |
| 50 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 51 | + '@typescript-eslint/explicit-module-boundary-types': 'off', |
| 52 | + }, |
| 53 | +} |
0 commit comments