-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.cjs
114 lines (114 loc) · 2.98 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
module.exports = {
env: {
es2022: true,
node: true,
},
extends: ["eslint:recommended", "plugin:import/recommended", "plugin:@eslint-community/eslint-comments/recommended", "prettier"],
parserOptions: {
ecmaVersion: 2022,
sourceType: "module",
},
plugins: ["simple-import-sort", "import"],
rules: {
"no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
args: "after-used",
caughtErrorsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"import/extensions": [
"error",
"ignorePackages",
{
"": "never",
js: "never",
jsx: "never",
ts: "never",
tsx: "never",
},
],
"import/no-useless-path-segments": "error",
"import/no-unresolved": ["error", { caseSensitive: true }],
"import/first": "error",
"import/no-named-as-default": "off",
"import/no-anonymous-default-export": "off",
"import/no-named-as-default-member": "off",
"import/order": [
"error",
{
"newlines-between": "always",
alphabetize: {
order: "asc",
caseInsensitive: true,
},
groups: ["builtin", "external", "internal", "parent", "sibling", "index", "object"],
pathGroups: [
{
pattern: "@/**",
group: "internal",
},
],
},
],
"import/newline-after-import": "error",
"import/no-mutable-exports": "error",
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: [
"**/test/**",
"**/tests/**",
"**/spec/**",
"**/__tests__/**",
"**/__mocks__/**",
"**/test.{js,jsx,ts,tsx}",
"**/test-*.{js,jsx,ts,tsx}",
"**/*{.,_}{test,spec,stories,bench,fixture}.{js,jsx,ts,tsx}",
"**/jest.config.js",
"**/dev.ts",
"**/tsup.config.ts",
"**/cypress.config.ts",
"*.ts",
],
optionalDependencies: false,
},
],
},
overrides: [
{
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
files: ["**/*.ts", "**/*.tsx"],
extends: ["plugin:import/typescript", "plugin:@typescript-eslint/recommended"],
rules: {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
args: "after-used",
caughtErrorsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"import/default": "off",
},
},
],
settings: {
"import/extensions": [".js", ".ts", ".jsx", ".tsx"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
node: {
allowModules: ["shared"],
},
},
}