-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
50 lines (46 loc) · 1.34 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
// This file configures rules that do not require TypeScript type information.
// Excluding such checks allows eslint to run more quickly when using this file.
// To run *all* eslint checks, use `.eslintrc.full.json` instead.
{
"env": {
"browser": true,
"node": true,
"es2020": true
},
"plugins": [
"@typescript-eslint"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module"
},
"extends": [
"airbnb-base",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"object-curly-spacing": ["error", "never"],
// Omit file extensions when importing TypeScript files
"import/extensions": ["error", "ignorePackages", {
"ts": "never"
}],
// Use named exports for more consistent import naming
"import/prefer-default-export": "off",
"import/no-default-export": "error",
// Allow importing dev dependencies from build scripts
"import/no-extraneous-dependencies": ["error", {
"devDependencies": true
}],
// Use type inference to reduce duplicated definitions (types and values)
"@typescript-eslint/explicit-function-return-type": "off"
},
"overrides": [{
"files": ["src/**/*.ts"],
"rules": {
"import/no-extraneous-dependencies": ["error", {
"devDependencies": false
}]
}
}]
}