@xaliksss/eslint-config 4.0.0 → 4.0.1
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/dist/rules/eslint.js +5 -5
- package/dist/rules/stylistic.js +23 -4
- package/dist/rules/typescript.js +6 -3
- package/package.json +1 -1
package/dist/rules/eslint.js
CHANGED
|
@@ -19,7 +19,7 @@ export const eslintRules = {
|
|
|
19
19
|
"no-dupe-else-if": "error",
|
|
20
20
|
"no-dupe-keys": "error", // [TS]
|
|
21
21
|
"no-duplicate-case": "error",
|
|
22
|
-
"no-duplicate-imports": "error",
|
|
22
|
+
"no-duplicate-imports": ["error", { allowSeparateTypeImports: true }],
|
|
23
23
|
"no-empty-character-class": "error",
|
|
24
24
|
"no-empty-pattern": "error",
|
|
25
25
|
"no-ex-assign": "error",
|
|
@@ -62,7 +62,7 @@ export const eslintRules = {
|
|
|
62
62
|
}],
|
|
63
63
|
"no-useless-assignment": "error",
|
|
64
64
|
"no-useless-backreference": "error",
|
|
65
|
-
"require-atomic-updates": "
|
|
65
|
+
"require-atomic-updates": "off",
|
|
66
66
|
"use-isnan": "error",
|
|
67
67
|
"valid-typeof": "error",
|
|
68
68
|
"no-ternary": "off", // Отключает тернарные операторы
|
|
@@ -115,10 +115,10 @@ export const eslintRules = {
|
|
|
115
115
|
"yoda": "error",
|
|
116
116
|
"unicode-bom": "error",
|
|
117
117
|
"accessor-pairs": "error", // Спорно, возможно удалится
|
|
118
|
-
"arrow-body-style":
|
|
118
|
+
"arrow-body-style": "off",
|
|
119
119
|
"block-scoped-var": "error",
|
|
120
120
|
"camelcase": "off", // есть naming-convention с более детальной настройкой
|
|
121
|
-
"capitalized-comments": "
|
|
121
|
+
"capitalized-comments": "off",
|
|
122
122
|
"class-methods-use-this": "off",
|
|
123
123
|
"complexity": "off",
|
|
124
124
|
"consistent-return": "off",
|
|
@@ -140,7 +140,7 @@ export const eslintRules = {
|
|
|
140
140
|
"init-declarations": "off",
|
|
141
141
|
"logical-assignment-operators": ["error", "always", { enforceForIfStatements: true }],
|
|
142
142
|
"max-classes-per-file": "off",
|
|
143
|
-
"max-depth":
|
|
143
|
+
"max-depth": "off",
|
|
144
144
|
"max-lines": "off",
|
|
145
145
|
"max-lines-per-function": "off",
|
|
146
146
|
"max-nested-callbacks": ["error", { max: 3 }],
|
package/dist/rules/stylistic.js
CHANGED
|
@@ -47,8 +47,26 @@ export const stylisticRules = {
|
|
|
47
47
|
"@stylistic/line-comment-position": "off", // Без разницы где ставить комментарий
|
|
48
48
|
"@stylistic/linebreak-style": ["error", "unix"],
|
|
49
49
|
"@stylistic/lines-around-comment": "off", // Без разницы где ставить комментарий
|
|
50
|
-
"@stylistic/lines-between-class-members": "error",
|
|
51
|
-
|
|
50
|
+
"@stylistic/lines-between-class-members": ["error",
|
|
51
|
+
{
|
|
52
|
+
enforce: [
|
|
53
|
+
{ blankLine: "always", prev: "method", next: "method" },
|
|
54
|
+
{ blankLine: "always", prev: "field", next: "method" },
|
|
55
|
+
{ blankLine: "always", prev: "method", next: "field" },
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
{ exceptAfterOverload: true }
|
|
59
|
+
],
|
|
60
|
+
"@stylistic/max-len": ["error", {
|
|
61
|
+
code: 120,
|
|
62
|
+
tabWidth: 1,
|
|
63
|
+
ignoreComments: true,
|
|
64
|
+
ignoreTrailingComments: true,
|
|
65
|
+
ignoreUrls: true,
|
|
66
|
+
ignoreStrings: true,
|
|
67
|
+
ignoreTemplateLiterals: true,
|
|
68
|
+
ignoreRegExpLiterals: true
|
|
69
|
+
}],
|
|
52
70
|
"@stylistic/max-statements-per-line": ["error", { max: 1 }],
|
|
53
71
|
"@stylistic/member-delimiter-style": ["error", {
|
|
54
72
|
multiline: {
|
|
@@ -83,7 +101,7 @@ export const stylisticRules = {
|
|
|
83
101
|
groups: [["&&", "||", "?:"]],
|
|
84
102
|
allowSamePrecedence: true,
|
|
85
103
|
}],
|
|
86
|
-
"@stylistic/no-mixed-spaces-and-tabs": "
|
|
104
|
+
"@stylistic/no-mixed-spaces-and-tabs": "off", // разобраться
|
|
87
105
|
"@stylistic/no-multi-spaces": "error",
|
|
88
106
|
"@stylistic/no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 1 }],
|
|
89
107
|
"@stylistic/no-tabs": "off",
|
|
@@ -91,13 +109,14 @@ export const stylisticRules = {
|
|
|
91
109
|
"@stylistic/no-whitespace-before-property": "error",
|
|
92
110
|
"@stylistic/nonblock-statement-body-position": "error",
|
|
93
111
|
"@stylistic/object-curly-newline": "error",
|
|
94
|
-
"@stylistic/object-curly-spacing": "error",
|
|
112
|
+
"@stylistic/object-curly-spacing": ["error", "always"],
|
|
95
113
|
"@stylistic/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
|
|
96
114
|
"@stylistic/one-var-declaration-per-line": "off",
|
|
97
115
|
"@stylistic/operator-linebreak": ["error", "after", {
|
|
98
116
|
overrides: {
|
|
99
117
|
"?": "before",
|
|
100
118
|
":": "before",
|
|
119
|
+
"|": "before",
|
|
101
120
|
},
|
|
102
121
|
}],
|
|
103
122
|
"@stylistic/padded-blocks": ["error", "never"],
|
package/dist/rules/typescript.js
CHANGED
|
@@ -194,7 +194,7 @@ export const typescriptTypeAwareRules = {
|
|
|
194
194
|
"@typescript-eslint/prefer-regexp-exec": "error",
|
|
195
195
|
"@typescript-eslint/prefer-return-this-type": "error",
|
|
196
196
|
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
197
|
-
"@typescript-eslint/promise-function-async": "
|
|
197
|
+
"@typescript-eslint/promise-function-async": "off",
|
|
198
198
|
"@typescript-eslint/related-getter-setter-pairs": "error",
|
|
199
199
|
"@typescript-eslint/require-array-sort-compare": "error",
|
|
200
200
|
"require-await": "off",
|
|
@@ -208,11 +208,14 @@ export const typescriptTypeAwareRules = {
|
|
|
208
208
|
allowAny: false,
|
|
209
209
|
allowNever: false,
|
|
210
210
|
allowArray: false,
|
|
211
|
-
allow: [
|
|
211
|
+
allow: [
|
|
212
|
+
{ from: "lib", name: ["Error", "URL", "URLSearchParams"] },
|
|
213
|
+
{ from: "package", name: ["Big"], package: "big.js" },
|
|
214
|
+
],
|
|
212
215
|
}],
|
|
213
216
|
"@typescript-eslint/return-await": ["error", "in-try-catch"],
|
|
214
217
|
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
215
|
-
"@typescript-eslint/strict-void-return": "
|
|
218
|
+
"@typescript-eslint/strict-void-return": "off",
|
|
216
219
|
"@typescript-eslint/switch-exhaustiveness-check": ["error", { requireDefaultForNonUnion: true }],
|
|
217
220
|
"@typescript-eslint/unbound-method": "error",
|
|
218
221
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
|