-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
52 lines (47 loc) · 1.31 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// @ts-check
import eslint from '@eslint/js';
import importX from 'eslint-plugin-import-x';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import { config, configs } from 'typescript-eslint';
export default config(
eslint.configs.recommended,
...configs.recommendedTypeChecked,
...configs.stylisticTypeChecked,
importX.flatConfigs.recommended,
importX.flatConfigs.typescript,
{
languageOptions: {
parserOptions: {
project: true,
},
},
linterOptions: {
reportUnusedDisableDirectives: 'error',
},
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'import-x/newline-after-import': 'error',
'import-x/no-deprecated': 'error',
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error',
eqeqeq: 'error',
},
plugins: {
'simple-import-sort': simpleImportSort,
},
},
{
// Test-specific rules
files: ['src/integration/**/*.ts', 'src/**/*.test.ts', 'src/**/*.spec.ts'],
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
},
},
{
files: ['*.js', '*.config.{js,ts}', 'tasks/**/*.{js,ts}', '.husky/**/*.{js,ts}'],
...configs.disableTypeChecked,
},
{
ignores: ['node_modules', 'dist', 'public', 'reports', 'src/graphql/gen'],
},
);