@luxass/eslint-config 1.0.8 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -2
- package/package.json +16 -17
- package/src/index.js +120 -107
- package/src/javascript.js +91 -91
- package/src/typescript.js +93 -93
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxass/eslint-config",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "luxass' ESLint config",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Lucas Norgaard",
|
|
7
7
|
"email": "lucasnrgaard@gmail.com",
|
|
@@ -23,34 +23,33 @@
|
|
|
23
23
|
"src"
|
|
24
24
|
],
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"eslint": "^8.
|
|
26
|
+
"eslint": "^8.29.0",
|
|
27
|
+
"typescript": "^4.9.4"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
30
|
-
"@typescript-eslint/parser": "^5.
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "^5.46.0",
|
|
31
|
+
"@typescript-eslint/parser": "^5.46.0",
|
|
31
32
|
"eslint-config-standard": "^17.0.0",
|
|
33
|
+
"eslint-plugin-astro": "^0.21.0",
|
|
32
34
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
33
35
|
"eslint-plugin-import": "^2.26.0",
|
|
34
|
-
"eslint-plugin-jsonc": "^2.
|
|
36
|
+
"eslint-plugin-jsonc": "^2.5.0",
|
|
35
37
|
"eslint-plugin-markdown": "^3.0.0",
|
|
36
|
-
"eslint-plugin-n": "^15.
|
|
37
|
-
"eslint-plugin-promise": "^6.
|
|
38
|
-
"eslint-plugin-react": "^7.
|
|
39
|
-
"eslint-plugin-unicorn": "^
|
|
40
|
-
"eslint-plugin-yml": "^1.
|
|
38
|
+
"eslint-plugin-n": "^15.6.0",
|
|
39
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
40
|
+
"eslint-plugin-react": "^7.31.11",
|
|
41
|
+
"eslint-plugin-unicorn": "^45.0.1",
|
|
42
|
+
"eslint-plugin-yml": "^1.3.0",
|
|
41
43
|
"jsonc-eslint-parser": "^2.1.0"
|
|
42
44
|
},
|
|
43
45
|
"devDependencies": {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"prettier": "^2.7.1",
|
|
48
|
-
"typescript": "^4.7.4"
|
|
46
|
+
"bumpp": "^8.2.1",
|
|
47
|
+
"eslint": "^8.29.0",
|
|
48
|
+
"typescript": "^4.9.4"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"bump": "bumpp package.json --commit --push --tag",
|
|
52
52
|
"release": "pnpm -r publish --access public",
|
|
53
|
-
"format": "prettier --write --cache .",
|
|
54
53
|
"lint": "eslint --cache src/**/*.js"
|
|
55
54
|
}
|
|
56
55
|
}
|
package/src/index.js
CHANGED
|
@@ -6,162 +6,175 @@ module.exports = {
|
|
|
6
6
|
},
|
|
7
7
|
reportUnusedDisableDirectives: true,
|
|
8
8
|
extends: [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
"eslint-config-standard",
|
|
10
|
+
"plugin:import/recommended",
|
|
11
|
+
"plugin:eslint-comments/recommended",
|
|
12
|
+
"plugin:jsonc/recommended-with-jsonc",
|
|
13
|
+
"plugin:markdown/recommended",
|
|
14
|
+
"plugin:yml/standard",
|
|
15
|
+
"plugin:astro/recommended",
|
|
16
|
+
"./javascript",
|
|
17
|
+
"./typescript"
|
|
17
18
|
],
|
|
18
19
|
ignorePatterns: [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
"*.min.*",
|
|
21
|
+
"CHANGELOG.md",
|
|
22
|
+
"dist",
|
|
23
|
+
"build",
|
|
24
|
+
"LICENSE*",
|
|
25
|
+
"coverage",
|
|
26
|
+
"public",
|
|
27
|
+
"package-lock.json",
|
|
28
|
+
"pnpm-lock.yaml",
|
|
29
|
+
"yarn.lock",
|
|
30
|
+
"!.github",
|
|
31
|
+
"!.vscode"
|
|
31
32
|
],
|
|
32
|
-
plugins: [
|
|
33
|
+
plugins: ["unicorn"],
|
|
33
34
|
settings: {
|
|
34
|
-
|
|
35
|
-
node: { extensions: [
|
|
35
|
+
"import/resolver": {
|
|
36
|
+
node: { extensions: [".js", ".mjs"] }
|
|
36
37
|
}
|
|
37
38
|
},
|
|
38
39
|
overrides: [
|
|
39
40
|
{
|
|
40
|
-
files: [
|
|
41
|
-
parser:
|
|
41
|
+
files: ["*.json", "*.json5"],
|
|
42
|
+
parser: "jsonc-eslint-parser",
|
|
42
43
|
rules: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
"jsonc/array-bracket-spacing": ["error", "never"],
|
|
45
|
+
"jsonc/comma-dangle": ["error", "never"],
|
|
46
|
+
"jsonc/comma-style": ["error", "last"],
|
|
47
|
+
"jsonc/indent": ["error", 2],
|
|
48
|
+
"jsonc/key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
49
|
+
"jsonc/no-octal-escape": "error",
|
|
50
|
+
"jsonc/object-curly-newline": ["error", { multiline: true, consistent: true }],
|
|
51
|
+
"jsonc/object-curly-spacing": ["error", "always"],
|
|
52
|
+
"jsonc/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }]
|
|
52
53
|
}
|
|
53
54
|
},
|
|
54
55
|
{
|
|
55
|
-
files: [
|
|
56
|
-
parser:
|
|
56
|
+
files: ["*.yaml", "*.yml"],
|
|
57
|
+
parser: "yaml-eslint-parser",
|
|
57
58
|
rules: {
|
|
58
|
-
|
|
59
|
+
"spaced-comment": "off"
|
|
59
60
|
}
|
|
60
61
|
},
|
|
61
62
|
{
|
|
62
|
-
files: [
|
|
63
|
-
parser:
|
|
63
|
+
files: ["package.json"],
|
|
64
|
+
parser: "jsonc-eslint-parser",
|
|
64
65
|
rules: {
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
"jsonc/sort-keys": [
|
|
67
|
+
"error",
|
|
67
68
|
{
|
|
68
|
-
pathPattern:
|
|
69
|
+
pathPattern: "^$",
|
|
69
70
|
order: [
|
|
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
|
-
|
|
71
|
+
"name",
|
|
72
|
+
"publisher",
|
|
73
|
+
"displayName",
|
|
74
|
+
"version",
|
|
75
|
+
"private",
|
|
76
|
+
"type",
|
|
77
|
+
"packageManager",
|
|
78
|
+
"description",
|
|
79
|
+
"author",
|
|
80
|
+
"license",
|
|
81
|
+
"funding",
|
|
82
|
+
"homepage",
|
|
83
|
+
"repository",
|
|
84
|
+
"bugs",
|
|
85
|
+
"keywords",
|
|
86
|
+
"categories",
|
|
87
|
+
"sideEffects",
|
|
88
|
+
"exports",
|
|
89
|
+
"main",
|
|
90
|
+
"module",
|
|
91
|
+
"types",
|
|
92
|
+
"typesVersions",
|
|
93
|
+
"bin",
|
|
94
|
+
"icon",
|
|
95
|
+
"files",
|
|
96
|
+
"engines",
|
|
97
|
+
"activationEvents",
|
|
98
|
+
"contributes",
|
|
99
|
+
"scripts",
|
|
100
|
+
"peerDependencies",
|
|
101
|
+
"peerDependenciesMeta",
|
|
102
|
+
"dependencies",
|
|
103
|
+
"optionalDependencies",
|
|
104
|
+
"devDependencies",
|
|
105
|
+
"pnpm"
|
|
105
106
|
]
|
|
106
107
|
},
|
|
107
108
|
{
|
|
108
|
-
pathPattern:
|
|
109
|
-
order: { type:
|
|
109
|
+
pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies$",
|
|
110
|
+
order: { type: "asc" }
|
|
110
111
|
},
|
|
111
112
|
{
|
|
112
|
-
pathPattern:
|
|
113
|
-
order: [
|
|
113
|
+
pathPattern: "^exports.*$",
|
|
114
|
+
order: ["types", "require", "import"]
|
|
114
115
|
}
|
|
115
116
|
]
|
|
116
117
|
}
|
|
117
118
|
},
|
|
118
119
|
{
|
|
119
|
-
files: [
|
|
120
|
+
files: ["*.d.ts"],
|
|
120
121
|
rules: {
|
|
121
|
-
|
|
122
|
+
"import/no-duplicates": "off"
|
|
122
123
|
}
|
|
123
124
|
},
|
|
124
125
|
{
|
|
125
|
-
files: [
|
|
126
|
+
files: ["*.js"],
|
|
126
127
|
rules: {
|
|
127
|
-
|
|
128
|
+
"@typescript-eslint/no-var-requires": "off"
|
|
128
129
|
}
|
|
129
130
|
},
|
|
130
131
|
{
|
|
131
|
-
files: [
|
|
132
|
+
files: ["scripts/**/*.*", "cli.*"],
|
|
132
133
|
rules: {
|
|
133
|
-
|
|
134
|
+
"no-console": "off"
|
|
134
135
|
}
|
|
135
136
|
},
|
|
136
137
|
{
|
|
137
|
-
files: [
|
|
138
|
+
files: ["*.test.ts", "*.test.js", "*.spec.ts", "*.spec.js"],
|
|
138
139
|
rules: {
|
|
139
|
-
|
|
140
|
+
"no-unused-expressions": "off"
|
|
140
141
|
}
|
|
141
142
|
},
|
|
142
143
|
{
|
|
143
|
-
files: [
|
|
144
|
+
files: ["**/*.md/*.*"],
|
|
144
145
|
rules: {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
146
|
+
"@typescript-eslint/no-redeclare": "off",
|
|
147
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
148
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
149
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
150
|
+
"@typescript-eslint/comma-dangle": "off",
|
|
151
|
+
"import/no-unresolved": "off",
|
|
152
|
+
"no-alert": "off",
|
|
153
|
+
"no-console": "off",
|
|
154
|
+
"no-restricted-imports": "off",
|
|
155
|
+
"no-undef": "off",
|
|
156
|
+
"no-unused-expressions": "off",
|
|
157
|
+
"no-unused-vars": "off"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
files: ["*.astro"],
|
|
162
|
+
parser: "astro-eslint-parser",
|
|
163
|
+
parserOptions: {
|
|
164
|
+
parser: "@typescript-eslint/parser",
|
|
165
|
+
extraFileExtensions: [".astro"],
|
|
166
|
+
},
|
|
167
|
+
rules: {
|
|
168
|
+
"astro/no-deprecated-astro-canonicalurl": "error",
|
|
169
|
+
"no-tabs": "off",
|
|
157
170
|
}
|
|
158
171
|
}
|
|
159
172
|
],
|
|
160
173
|
rules: {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
174
|
+
"eol-last": "off",
|
|
175
|
+
"no-trailing-spaces": "off",
|
|
176
|
+
"padded-blocks": "off",
|
|
177
|
+
"yml/quotes": ["error", { prefer: "single", avoidEscape: false }],
|
|
178
|
+
"yml/no-empty-document": "off"
|
|
166
179
|
}
|
|
167
180
|
};
|
package/src/javascript.js
CHANGED
|
@@ -1,126 +1,126 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
rules: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
semi: [
|
|
9
|
-
quotes: [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
camelcase:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
indent: [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
3
|
+
"import/order": "error",
|
|
4
|
+
"import/first": "error",
|
|
5
|
+
"import/no-mutable-exports": "error",
|
|
6
|
+
"import/no-unresolved": "off",
|
|
7
|
+
"import/no-absolute-path": "off",
|
|
8
|
+
semi: ["warn", "always"],
|
|
9
|
+
quotes: ["error", "double"],
|
|
10
|
+
"quote-props": ["warn", "as-needed"],
|
|
11
|
+
"no-unused-vars": "warn",
|
|
12
|
+
"no-param-reassign": "off",
|
|
13
|
+
"array-bracket-spacing": ["error", "never"],
|
|
14
|
+
"brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
15
|
+
"block-spacing": ["error", "always"],
|
|
16
|
+
camelcase: "off",
|
|
17
|
+
"comma-spacing": ["error", { before: false, after: true }],
|
|
18
|
+
"comma-style": ["error", "last"],
|
|
19
|
+
"comma-dangle": ["error", "only-multiline"],
|
|
20
|
+
"no-constant-condition": "warn",
|
|
21
|
+
"no-debugger": "error",
|
|
22
|
+
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
23
|
+
"no-cond-assign": ["error", "always"],
|
|
24
|
+
"func-call-spacing": ["off", "never"],
|
|
25
|
+
"key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
26
|
+
indent: ["error", 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }],
|
|
27
|
+
"no-restricted-syntax": ["error", "DebuggerStatement", "LabeledStatement", "WithStatement"],
|
|
28
|
+
"object-curly-spacing": ["error", "always"],
|
|
29
|
+
"no-return-await": "off",
|
|
30
|
+
"space-before-function-paren": [
|
|
31
|
+
"error",
|
|
32
32
|
{
|
|
33
|
-
anonymous:
|
|
34
|
-
named:
|
|
35
|
-
asyncArrow:
|
|
33
|
+
anonymous: "always",
|
|
34
|
+
named: "never",
|
|
35
|
+
asyncArrow: "always"
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
38
|
// "no-multiple-empty-lines": ["warn", { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
"no-multiple-empty-lines": "off",
|
|
40
|
+
"no-var": "error",
|
|
41
|
+
"prefer-const": [
|
|
42
|
+
"error",
|
|
43
43
|
{
|
|
44
|
-
destructuring:
|
|
44
|
+
destructuring: "any",
|
|
45
45
|
ignoreReadBeforeAssign: true
|
|
46
46
|
}
|
|
47
47
|
],
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
"prefer-arrow-callback": [
|
|
49
|
+
"error",
|
|
50
50
|
{
|
|
51
51
|
allowNamedFunctions: false,
|
|
52
52
|
allowUnboundThis: true
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
"object-shorthand": [
|
|
56
|
+
"error",
|
|
57
|
+
"always",
|
|
58
58
|
{
|
|
59
59
|
ignoreConstructors: false,
|
|
60
60
|
avoidQuotes: true
|
|
61
61
|
}
|
|
62
62
|
],
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
"prefer-exponentiation-operator": "error",
|
|
64
|
+
"prefer-rest-params": "error",
|
|
65
|
+
"prefer-spread": "error",
|
|
66
|
+
"prefer-template": "error",
|
|
67
|
+
"template-curly-spacing": "error",
|
|
68
|
+
"generator-star-spacing": "off",
|
|
69
|
+
"spaced-comment": [
|
|
70
|
+
"error",
|
|
71
|
+
"always",
|
|
72
72
|
{
|
|
73
73
|
line: {
|
|
74
|
-
markers: [
|
|
75
|
-
exceptions: [
|
|
74
|
+
markers: ["/"],
|
|
75
|
+
exceptions: ["/", "#"]
|
|
76
76
|
},
|
|
77
77
|
block: {
|
|
78
|
-
markers: [
|
|
79
|
-
exceptions: [
|
|
78
|
+
markers: ["!"],
|
|
79
|
+
exceptions: ["*"],
|
|
80
80
|
balanced: true
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
],
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
complexity: [
|
|
88
|
-
eqeqeq: [
|
|
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
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
84
|
+
"array-callback-return": "error",
|
|
85
|
+
"block-scoped-var": "error",
|
|
86
|
+
"consistent-return": "off",
|
|
87
|
+
complexity: ["off", 11],
|
|
88
|
+
eqeqeq: ["error", "smart"],
|
|
89
|
+
"no-alert": "warn",
|
|
90
|
+
"no-case-declarations": "error",
|
|
91
|
+
"no-multi-spaces": "error",
|
|
92
|
+
"no-multi-str": "error",
|
|
93
|
+
"no-with": "error",
|
|
94
|
+
"no-void": "error",
|
|
95
|
+
"no-useless-escape": "off",
|
|
96
|
+
"vars-on-top": "error",
|
|
97
|
+
"require-await": "off",
|
|
98
|
+
"no-return-assign": "off",
|
|
99
|
+
"operator-linebreak": ["error", "before"],
|
|
100
|
+
"unicorn/error-message": "error",
|
|
101
|
+
"unicorn/escape-case": "error",
|
|
102
|
+
"unicorn/no-instanceof-array": "error",
|
|
103
|
+
"unicorn/no-new-buffer": "error",
|
|
104
|
+
"unicorn/no-unsafe-regex": "off",
|
|
105
|
+
"unicorn/number-literal-case": "error",
|
|
106
|
+
"unicorn/prefer-includes": "error",
|
|
107
|
+
"unicorn/prefer-starts-ends-with": "error",
|
|
108
|
+
"unicorn/prefer-text-content": "error",
|
|
109
|
+
"unicorn/prefer-type-error": "error",
|
|
110
|
+
"unicorn/throw-new-error": "error",
|
|
111
|
+
"no-use-before-define": ["error", { functions: false, classes: false, variables: true }],
|
|
112
|
+
"eslint-comments/disable-enable-pair": "off",
|
|
113
|
+
"import/no-named-as-default-member": "off",
|
|
114
|
+
"import/no-named-as-default": "off",
|
|
115
|
+
"import/namespace": "off",
|
|
116
|
+
"n/no-callback-literal": "off",
|
|
117
|
+
"sort-imports": [
|
|
118
|
+
"error",
|
|
119
119
|
{
|
|
120
120
|
ignoreCase: false,
|
|
121
121
|
ignoreDeclarationSort: true,
|
|
122
122
|
ignoreMemberSort: false,
|
|
123
|
-
memberSyntaxSortOrder: [
|
|
123
|
+
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
|
|
124
124
|
allowSeparatedGroups: false
|
|
125
125
|
}
|
|
126
126
|
]
|
package/src/typescript.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
extends: [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
"plugin:import/typescript",
|
|
4
|
+
"plugin:@typescript-eslint/recommended",
|
|
5
|
+
"plugin:react/recommended"
|
|
6
6
|
],
|
|
7
7
|
settings: {
|
|
8
|
-
|
|
9
|
-
node: { extensions: [
|
|
8
|
+
"import/resolver": {
|
|
9
|
+
node: { extensions: [".js", ".jsx", ".mjs", ".ts", ".tsx", ".d.ts"] }
|
|
10
10
|
},
|
|
11
11
|
react: {
|
|
12
|
-
version:
|
|
12
|
+
version: "17.0"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
rules: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
],
|
|
24
|
-
|
|
25
|
-
indent:
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
"import/named": "off",
|
|
17
|
+
"@typescript-eslint/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" }],
|
|
18
|
+
"@typescript-eslint/member-delimiter-style": "warn",
|
|
19
|
+
"@typescript-eslint/type-annotation-spacing": ["error", {}],
|
|
20
|
+
"@typescript-eslint/consistent-type-imports": ["warn", {
|
|
21
|
+
prefer: "type-imports",
|
|
22
|
+
disallowTypeAnnotations: false
|
|
23
|
+
}],
|
|
24
|
+
"no-useless-constructor": "off",
|
|
25
|
+
indent: "off",
|
|
26
|
+
"@typescript-eslint/indent": [
|
|
27
|
+
"error",
|
|
28
28
|
2,
|
|
29
29
|
{
|
|
30
30
|
SwitchCase: 1,
|
|
@@ -40,93 +40,93 @@ module.exports = {
|
|
|
40
40
|
flatTernaryExpressions: false,
|
|
41
41
|
ignoreComments: false,
|
|
42
42
|
ignoredNodes: [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
43
|
+
"TemplateLiteral *",
|
|
44
|
+
"JSXElement",
|
|
45
|
+
"JSXElement > *",
|
|
46
|
+
"JSXAttribute",
|
|
47
|
+
"JSXIdentifier",
|
|
48
|
+
"JSXNamespacedName",
|
|
49
|
+
"JSXMemberExpression",
|
|
50
|
+
"JSXSpreadAttribute",
|
|
51
|
+
"JSXExpressionContainer",
|
|
52
|
+
"JSXOpeningElement",
|
|
53
|
+
"JSXClosingElement",
|
|
54
|
+
"JSXFragment",
|
|
55
|
+
"JSXOpeningFragment",
|
|
56
|
+
"JSXClosingFragment",
|
|
57
|
+
"JSXText",
|
|
58
|
+
"JSXEmptyExpression",
|
|
59
|
+
"JSXSpreadChild",
|
|
60
|
+
"TSTypeParameterInstantiation"
|
|
61
61
|
],
|
|
62
62
|
offsetTernaryExpressions: true
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
"no-unused-vars": "off",
|
|
66
|
+
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
|
|
67
|
+
"no-redeclare": "off",
|
|
68
|
+
"@typescript-eslint/no-redeclare": "error",
|
|
69
|
+
"no-use-before-define": "off",
|
|
70
|
+
"@typescript-eslint/no-use-before-define": [
|
|
71
|
+
"error",
|
|
72
72
|
{ functions: false, classes: false, variables: true }
|
|
73
73
|
],
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
semi:
|
|
81
|
-
|
|
82
|
-
quotes:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
74
|
+
"brace-style": "off",
|
|
75
|
+
"@typescript-eslint/brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
76
|
+
"comma-dangle": "off",
|
|
77
|
+
"@typescript-eslint/comma-dangle": ["error", "only-multiline"],
|
|
78
|
+
"object-curly-spacing": "off",
|
|
79
|
+
"@typescript-eslint/object-curly-spacing": ["error", "always"],
|
|
80
|
+
semi: "off",
|
|
81
|
+
"@typescript-eslint/semi": ["warn", "always"],
|
|
82
|
+
quotes: "off",
|
|
83
|
+
"@typescript-eslint/quotes": ["warn", "double"],
|
|
84
|
+
"space-before-blocks": "off",
|
|
85
|
+
"@typescript-eslint/space-before-blocks": ["error", "always"],
|
|
86
|
+
"space-before-function-paren": "off",
|
|
87
|
+
"@typescript-eslint/space-before-function-paren": [
|
|
88
|
+
"error",
|
|
89
89
|
{
|
|
90
|
-
anonymous:
|
|
91
|
-
named:
|
|
92
|
-
asyncArrow:
|
|
90
|
+
anonymous: "always",
|
|
91
|
+
named: "never",
|
|
92
|
+
asyncArrow: "always"
|
|
93
93
|
}
|
|
94
94
|
],
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
95
|
+
"space-infix-ops": "off",
|
|
96
|
+
"@typescript-eslint/space-infix-ops": "error",
|
|
97
|
+
"keyword-spacing": "off",
|
|
98
|
+
"@typescript-eslint/keyword-spacing": ["error", { before: true, after: true }],
|
|
99
|
+
"comma-spacing": "off",
|
|
100
|
+
"@typescript-eslint/comma-spacing": ["error", { before: false, after: true }],
|
|
101
|
+
"no-extra-parens": "off",
|
|
102
|
+
"@typescript-eslint/no-extra-parens": ["error", "functions"],
|
|
103
|
+
"no-dupe-class-members": "off",
|
|
104
|
+
"@typescript-eslint/no-dupe-class-members": "error",
|
|
105
|
+
"no-loss-of-precision": "off",
|
|
106
|
+
"@typescript-eslint/no-loss-of-precision": "error",
|
|
107
|
+
"lines-between-class-members": "off",
|
|
108
|
+
"@typescript-eslint/lines-between-class-members": [
|
|
109
|
+
"error",
|
|
110
|
+
"always",
|
|
111
111
|
{ exceptAfterSingleLine: true }
|
|
112
112
|
],
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
113
|
+
"@typescript-eslint/consistent-indexed-object-style": "off",
|
|
114
|
+
"@typescript-eslint/naming-convention": "off",
|
|
115
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
116
|
+
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
117
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
118
|
+
"@typescript-eslint/parameter-properties": "off",
|
|
119
|
+
"@typescript-eslint/no-empty-interface": "off",
|
|
120
|
+
"@typescript-eslint/ban-ts-ignore": "off",
|
|
121
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
122
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
123
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
124
|
+
"@typescript-eslint/ban-types": "off",
|
|
125
|
+
"@typescript-eslint/no-namespace": "off",
|
|
126
|
+
"@typescript-eslint/triple-slash-reference": "off",
|
|
127
127
|
|
|
128
128
|
// REACT
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
"jsx-quotes": ["warn", "prefer-double"],
|
|
130
|
+
"react/react-in-jsx-scope": "off"
|
|
131
131
|
}
|
|
132
132
|
};
|