-
Notifications
You must be signed in to change notification settings - Fork 16
/
.eslintrc.cjs
70 lines (70 loc) · 2.08 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
module.exports = {
env: {
browser: true,
es2020: true,
},
extends: ['plugin:import/recommended', 'plugin:import/typescript', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
tsconfigRootDir: __dirname,
project: [
'./packages/**/tsconfig.json',
'./examples/wallet-connection/*/tsconfig.json',
'./docs/**/tsconfig.json',
'**/tsconfig.eslint.json',
],
},
plugins: ['@typescript-eslint', 'import'],
rules: {
'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.*', '**/*/__tests__/*'],
},
],
'@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'],
},
},
},
};