-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.mjs
More file actions
42 lines (41 loc) · 958 Bytes
/
eslint.config.mjs
File metadata and controls
42 lines (41 loc) · 958 Bytes
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
// eslint.config.mjs
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
export default [
// 0) Global ignores
{
ignores: [
'**/dist/**',
'**/node_modules/**',
'examples/**',
'scripts/**',
'eslint.config.mjs',
'docs/**',
'**/__tests__/**',
'**/*.test.ts',
'typechain/**/**',
'tsup.config.ts',
'src/adapters/__tests__/**',
],
},
js.configs.recommended,
...tseslint.configs.recommendedTypeChecked.map((cfg) => ({
...cfg,
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
...cfg.languageOptions,
parserOptions: {
...(cfg.languageOptions?.parserOptions ?? {}),
project: ['./tsconfig.eslint.json'],
tsconfigRootDir: process.cwd(),
},
},
})),
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'no-console': 'warn',
'@typescript-eslint/consistent-type-imports': 'warn',
},
},
];