|
| 1 | +// eslint.config.mjs |
| 2 | + |
| 3 | +import { defineConfig } from 'eslint-define-config'; |
| 4 | +import ts from '@typescript-eslint/parser'; |
| 5 | +import tsEslint from '@typescript-eslint/eslint-plugin'; |
| 6 | +import stylisticEslint from '@stylistic/eslint-plugin'; |
| 7 | + |
| 8 | +export default defineConfig([ |
| 9 | + { |
| 10 | + ignores: ['**/*.test.js'], |
| 11 | + }, |
| 12 | + { |
| 13 | + files: ['**/*.ts', '**/*.tsx'], |
| 14 | + languageOptions: { |
| 15 | + parser: ts, |
| 16 | + parserOptions: { |
| 17 | + ecmaVersion: 2024, |
| 18 | + project: './tsconfig.json', |
| 19 | + createDefaultProgram: true, |
| 20 | + ecmaFeatures: { |
| 21 | + impliedStrict: true, |
| 22 | + }, |
| 23 | + }, |
| 24 | + }, |
| 25 | + plugins: { |
| 26 | + '@typescript-eslint': tsEslint, |
| 27 | + '@stylistic': stylisticEslint, |
| 28 | + }, |
| 29 | + rules: { |
| 30 | + '@typescript-eslint/naming-convention': 'warn', |
| 31 | + '@typescript-eslint/no-unused-expressions': 'off', |
| 32 | + '@stylistic/semi': 'warn', |
| 33 | + 'curly': 'warn', |
| 34 | + 'eqeqeq': ['warn', 'always'], |
| 35 | + 'no-redeclare': 'warn', |
| 36 | + 'no-throw-literal': 'warn', |
| 37 | + 'no-unused-expressions': 'off', |
| 38 | + }, |
| 39 | + ignores: ['src/ui-test/resources/problems.ts'], |
| 40 | + }, |
| 41 | +]); |
0 commit comments