-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.eslintrc.cjs
89 lines (89 loc) · 2.31 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
module.exports = {
env: {
browser: true,
es2020: true,
},
extends: [
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
tsconfigRootDir: __dirname,
project: [
'./packages/**/tsconfig.json',
'./docs/**/tsconfig.json',
'**/tsconfig.eslint.json',
],
},
plugins: ['@typescript-eslint', 'import'],
rules: {
'prettier/prettier': 'warn',
quotes: [
2,
'single',
{
avoidEscape: true,
},
],
'import/no-unresolved': [
2,
{
ignore: [
'^@concordium/rust-bindings(/(.*))?$',
'grpc-api',
'^@concordium/web-sdk(/(.*))?$',
'^#.+$', // ESLint resolver does not support subpath imports: https://github.com/import-js/eslint-plugin-import/issues/1868.
],
},
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/*/test/*', '**/*.config.*'],
},
],
'@typescript-eslint/no-unused-vars': [
'warn',
{
ignoreRestSiblings: true,
},
],
},
overrides: [
{
files: ['*.config.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'import/namespace': 'off',
},
},
],
ignorePatterns: [
'**/pkg/**/*',
'**/dist/**/*',
'**/lib/**/*',
'deps/**/*',
'**/src/grpc-api/*',
'typedoc/**',
],
settings: {
'import/ignore': ['bs58check'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
exports: true,
typescript: {
project: ['packages/*/tsconfig.json'],
},
node: {
project: ['packages/*/tsconfig.json'],
},
},
},
};