-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.cjs
58 lines (56 loc) · 1.71 KB
/
.eslintrc.cjs
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
/**
* @type { import("eslint").Linter.Config }
*/
const config = {
env: {
es2023: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:node/recommended',
'plugin:promise/recommended',
'plugin:prettier/recommended',
],
parserOptions: {
ecmaVersion: 2023,
sourceType: 'module',
},
overrides: [
{
files: '**/*.ts',
extends: ['plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
rules: {
'no-unused-vars': 0, // off - caught by the compiler
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'node/no-missing-import': [
'off',
{
tryExtensions: ['.js', '.d.ts', '.ts'],
},
],
'node/no-unsupported-features/es-syntax': [
'error',
{
ignores: ['modules'],
},
],
},
},
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx', '.mts'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code
// use an array of glob patterns
project: ['packages/*/tsconfig.json', 'integration-tests/tsconfig.json'],
},
},
},
};
module.exports = config;