forked from Keyri-Co/ez-web-crypto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
70 lines (70 loc) · 1.67 KB
/
.eslintrc.json
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
{
"ignorePatterns": ["cdk.out/", "coverage/", "lib/**/*.js", "bin/*.js", "dist"],
"env": {
"browser": false,
"es2021": true,
"node": true
},
"extends": [
"airbnb-base",
"prettier",
"plugin:@typescript-eslint/recommended" // Add TypeScript support
],
"parser": "@typescript-eslint/parser", // Add TypeScript parser
"plugins": [
"prettier",
"@typescript-eslint" // Add TypeScript plugin
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.base.json" // Point to your tsconfig
},
"rules": {
"prettier/prettier": "error",
"import/prefer-default-export": "off",
"no-await-in-loop": "off",
"camelcase": "off",
"no-empty": "off",
"import/extensions": [
// Handle TypeScript imports
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
]
},
"settings": {
"import/resolver": {
// Help ESLint resolve TypeScript imports
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"overrides": [
{
"files": ["src/**/*.ts", "tests/**/*.ts"], // Add TypeScript files pattern
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.base.json"
}
},
{
"files": ["tests/**"],
"plugins": ["jest"],
"extends": ["plugin:jest/recommended"],
"rules": {
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
}
},
{
"files": ["lib/**"],
"rules": {
"import/no-extraneous-dependencies": ["error", { "devDependencies": false }]
}
}
]
}