-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
100 lines (100 loc) · 2.67 KB
/
.eslintrc
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
90
91
92
93
94
95
96
97
98
99
100
{
"env": {
"browser": true,
"es6": true
},
"extends": ["airbnb-base"],
"plugins": ["import"],
"rules": {
"max-len": [
"error",
{
"code": 100
}
],
"linebreak-style": "off",
"no-plusplus": "off",
"no-param-reassign": "off",
"no-unused-expressions": "off",
"no-return-assign": "off",
"no-console": "error",
"no-debugger": "error",
"no-tabs": "off",
"semi": ["error", "always"],
"space-before-blocks": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"no-multiple-empty-lines": [
"error",
{
"max": 1,
"maxEOF": 1,
"maxBOF": 0
}
],
"no-underscore-dangle": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"js": "ignorePackages",
"jsx": "never"
}
]
},
"overrides": [
{
"files": ["**/*.astro"],
"plugins": [
"@typescript-eslint",
"unused-imports",
"simple-import-sort"
],
"env": {
// Enables global variables available in Astro components.
"node": true,
"es2020": true
},
"parser": "astro-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"project": "./tsconfig.json",
"extraFileExtensions": [".astro"]
},
"rules": {
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never",
"": "never"
}
], // Avoid missing file extension errors in .astro files
"import/no-unresolved": [
"error",
{
"ignore": ["@/*"]
}
], // Disable no-unresolved rule for .astro files
"@typescript-eslint/comma-dangle": "off", // Avoid conflict rule between Eslint and Prettier
"@typescript-eslint/consistent-type-imports": "error", // Ensure `import type` is used when it's necessary
"import/prefer-default-export": "off", // Named export is easier to refactor automatically
"simple-import-sort/imports": "error", // Import configuration for `eslint-plugin-simple-import-sort`
"simple-import-sort/exports": "error", // Export configuration for `eslint-plugin-simple-import-sort`
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_" }
]
},
"globals": {
"Astro": "readonly"
}
}
]
}