|
| 1 | +// SPDX-License-Identifier: Apache-2.0 |
| 2 | +import stylistic from '@stylistic/eslint-plugin'; |
| 3 | +import tsEslint from '@typescript-eslint/eslint-plugin'; |
| 4 | +import tsParser from '@typescript-eslint/parser'; |
| 5 | +import eslintStandard from 'eslint-config-love'; |
| 6 | +import eslintPluginEslintComments from 'eslint-plugin-eslint-comments'; |
| 7 | + |
| 8 | +export default [ |
| 9 | + { |
| 10 | + files: ['**/*.ts'], |
| 11 | + plugins: { |
| 12 | + ...eslintStandard.plugins, |
| 13 | + ['eslint-comments']: eslintPluginEslintComments, |
| 14 | + ['@typescript-eslint']: tsEslint, |
| 15 | + ['@stylistic']: stylistic, |
| 16 | + }, |
| 17 | + languageOptions: { |
| 18 | + ...eslintStandard.languageOptions, |
| 19 | + parser: tsParser, |
| 20 | + ecmaVersion: 2022, |
| 21 | + sourceType: 'module', |
| 22 | + parserOptions: { |
| 23 | + project: ['./tsconfig.json'], |
| 24 | + }, |
| 25 | + }, |
| 26 | + rules: { |
| 27 | + ...eslintStandard.rules, |
| 28 | + ...eslintPluginEslintComments.configs.recommended.rules, |
| 29 | + 'eslint-comments/require-description': ['warn', { 'ignore': [] }], |
| 30 | + 'eslint-comments/disable-enable-pair': 'warn', |
| 31 | + 'no-console': 'warn', |
| 32 | + '@typescript-eslint/restrict-template-expressions': 'error', |
| 33 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 34 | + '@typescript-eslint/strict-boolean-expressions': 'off', |
| 35 | + '@typescript-eslint/no-explicit-any': 'error', |
| 36 | + '@typescript-eslint/no-floating-promises': 'off', |
| 37 | + '@typescript-eslint/no-var-requires': 'off', |
| 38 | + '@typescript-eslint/no-use-before-define': 'off', |
| 39 | + '@typescript-eslint/prefer-optional-chain': 'off', |
| 40 | + '@stylistic/indent': ['error', 2], |
| 41 | + '@stylistic/semi': ['warn', 'always'], |
| 42 | + '@stylistic/quotes': ['error', 'single'], |
| 43 | + '@stylistic/quote-props': ['warn', 'as-needed'], |
| 44 | + '@stylistic/arrow-parens': ["warn", "always"], |
| 45 | + }, |
| 46 | + ignores: [ |
| 47 | + '**/coverage/**', |
| 48 | + '**/build/**', |
| 49 | + '**/node_modules/**', |
| 50 | + '**/__tests__/**', |
| 51 | + '**/jest.config.ts', |
| 52 | + '**/cluster-setup.ts', |
| 53 | + ], |
| 54 | + } |
| 55 | +]; |
0 commit comments