-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy patheslint.config.mjs
More file actions
50 lines (48 loc) · 1.14 KB
/
eslint.config.mjs
File metadata and controls
50 lines (48 loc) · 1.14 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
import tsParser from '@typescript-eslint/parser'
import importPlugin from 'eslint-plugin-import'
export default [
{
ignores: [
'dist/**',
'lib/**',
'node_modules/**',
'coverage/**'
],
},
{
files: ['src/**/*.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
project: ['./tsconfig.json'],
sourceType: 'module',
},
},
plugins: {
import: importPlugin,
},
rules: {
// Style rules (not handled by TypeScript)
semi: ['error', 'never'],
quotes: ['error', 'single'],
// Disable ESLint rules that TypeScript handles better
'no-unused-vars': 'off', // TypeScript handles this via noUnusedLocals
'no-undef': 'off', // TypeScript handles undefined variables
},
},
{
files: ['test/**/*.ts'],
languageOptions: {
parser: tsParser,
parserOptions: {
project: ['./tsconfig.test.json'],
},
},
rules: {
semi: ['error', 'never'],
quotes: ['error', 'single'],
'no-console': 'off', // Allow console in tests
'no-undef': 'off', // Tests may define globals
}
}
]