-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
78 lines (77 loc) · 2.17 KB
/
eslint.config.mjs
File metadata and controls
78 lines (77 loc) · 2.17 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettier from 'eslint-config-prettier';
import jest from 'eslint-plugin-jest';
import globals from 'globals';
export default [
{
// Define ignores for the entire config
ignores: [
'dist/**/*',
'node_modules/**/*',
'jest.config.cjs',
'commitlint.config.cjs',
'src/types/**/*.d.ts' // Completely ignore .d.ts files in types directory
]
},
js.configs.recommended,
...tseslint.configs.recommended,
prettier,
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: ['./tsconfig.json'],
sourceType: 'module',
tsconfigRootDir: './',
},
globals: {
...globals.node,
...globals.jest,
process: true,
__dirname: true,
require: true,
exports: true,
module: true,
// Add Jest globals explicitly
jest: true,
describe: true,
it: true,
expect: true,
beforeAll: true,
afterAll: true,
beforeEach: true,
afterEach: true
}
},
plugins: {
'@typescript-eslint': tseslint.plugin,
jest,
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'warn',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['warn', {
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_',
'caughtErrorsIgnorePattern': '^_',
'ignoreRestSiblings': true
}],
'no-console': 'warn',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
'jest/no-standalone-expect': 'off',
'jest/expect-expect': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-require-imports': 'off',
'prefer-const': 'warn',
},
},
];