@omer-x/eslint-config 1.0.1 → 1.0.3
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/package.json +1 -1
- package/stylistic.js +88 -6
- package/typescript.js +5 -1
package/package.json
CHANGED
package/stylistic.js
CHANGED
|
@@ -1,31 +1,104 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
extends: [
|
|
3
|
-
"plugin:@stylistic/recommended-extends",
|
|
4
|
-
],
|
|
5
2
|
plugins: [
|
|
6
3
|
"@stylistic",
|
|
7
4
|
],
|
|
8
5
|
rules: {
|
|
6
|
+
"@stylistic/array-bracket-newline": ["error", "consistent"],
|
|
7
|
+
"@stylistic/array-bracket-spacing": ["error", "never"],
|
|
8
|
+
"@stylistic/array-element-newline": ["error", "consistent"],
|
|
9
|
+
"@stylistic/arrow-parens": ["error", "as-needed"],
|
|
9
10
|
"@stylistic/arrow-spacing": ["warn", { after: true, before: true }],
|
|
11
|
+
"@stylistic/block-spacing": ["error", "always"],
|
|
10
12
|
"@stylistic/brace-style": ["error", "1tbs"],
|
|
11
13
|
"@stylistic/comma-dangle": ["error", "always-multiline"],
|
|
12
|
-
"@stylistic/comma-spacing": "error",
|
|
14
|
+
"@stylistic/comma-spacing": ["error", { after: true, before: false }],
|
|
13
15
|
"@stylistic/comma-style": "error",
|
|
16
|
+
"@stylistic/computed-property-spacing": ["error", "never"],
|
|
14
17
|
"@stylistic/dot-location": ["error", "property"],
|
|
18
|
+
"@stylistic/eol-last": ["error", "always"],
|
|
19
|
+
"@stylistic/function-call-argument-newline": ["error", "consistent"],
|
|
20
|
+
"@stylistic/function-call-spacing": ["error", "never"],
|
|
21
|
+
"@stylistic/function-paren-newline": ["error", "multiline"],
|
|
22
|
+
"@stylistic/generator-star-spacing": ["error", "both"],
|
|
23
|
+
"@stylistic/implicit-arrow-linebreak": ["error", "beside"],
|
|
15
24
|
"@stylistic/indent": ["error", 2, { SwitchCase: 1 }],
|
|
25
|
+
"@stylistic/indent-binary-ops": "error",
|
|
26
|
+
"@stylistic/jsx-child-element-spacing": "error",
|
|
27
|
+
"@stylistic/jsx-closing-bracket-location": ["error", "tag-aligned"],
|
|
28
|
+
"@stylistic/jsx-closing-tag-location": "error",
|
|
29
|
+
"@stylistic/jsx-curly-brace-presence": ["error", {
|
|
30
|
+
children: "never",
|
|
31
|
+
propElementValues: "always",
|
|
32
|
+
props: "never",
|
|
33
|
+
}],
|
|
34
|
+
"@stylistic/jsx-curly-newline": ["error", {
|
|
35
|
+
multiline: "consistent",
|
|
36
|
+
singleline: "consistent",
|
|
37
|
+
}],
|
|
38
|
+
"@stylistic/jsx-curly-spacing": ["error", { when: "never" }],
|
|
39
|
+
"@stylistic/jsx-equals-spacing": ["error", "never"],
|
|
40
|
+
"@stylistic/jsx-first-prop-new-line": ["error", "multiline-multiprop"],
|
|
41
|
+
"@stylistic/jsx-indent": ["error", 2],
|
|
42
|
+
"@stylistic/jsx-indent-props": ["error", 2],
|
|
43
|
+
"@stylistic/jsx-max-props-per-line": ["error", { maximum: { multi: 1, single: 4 } }],
|
|
44
|
+
"@stylistic/jsx-newline": ["error", { allowMultilines: false, prevent: true }],
|
|
45
|
+
"@stylistic/jsx-one-expression-per-line": ["error", { allow: "single-child" }],
|
|
46
|
+
"@stylistic/jsx-props-no-multi-spaces": "error",
|
|
47
|
+
"@stylistic/jsx-quotes": ["error", "prefer-double"],
|
|
48
|
+
"@stylistic/jsx-self-closing-comp": ["error", { component: true, html: true }],
|
|
49
|
+
"@stylistic/jsx-sort-props": "off",
|
|
50
|
+
"@stylistic/jsx-tag-spacing": "error",
|
|
51
|
+
"@stylistic/jsx-wrap-multilines": ["error", {
|
|
52
|
+
arrow: "parens-new-line",
|
|
53
|
+
assignment: "parens-new-line",
|
|
54
|
+
condition: "parens-new-line",
|
|
55
|
+
declaration: "parens-new-line",
|
|
56
|
+
logical: "parens-new-line",
|
|
57
|
+
prop: "parens-new-line",
|
|
58
|
+
return: "parens-new-line",
|
|
59
|
+
}],
|
|
60
|
+
"@stylistic/key-spacing": "error",
|
|
16
61
|
"@stylistic/keyword-spacing": "error",
|
|
62
|
+
"@stylistic/linebreak-style": ["error", "unix"],
|
|
63
|
+
"@stylistic/lines-around-comment": "off",
|
|
64
|
+
"@stylistic/lines-between-class-members": ["error", "always", { exceptAfterSingleLine: true }],
|
|
65
|
+
"@stylistic/max-len": ["warn", { code: 128 }],
|
|
66
|
+
"@stylistic/max-statements-per-line": ["error", { max: 1 }],
|
|
17
67
|
"@stylistic/member-delimiter-style": ["error", {
|
|
18
68
|
multiline: { delimiter: "comma", requireLast: true },
|
|
19
69
|
multilineDetection: "brackets",
|
|
20
70
|
singleline: { delimiter: "comma", requireLast: false },
|
|
21
71
|
}],
|
|
72
|
+
"@stylistic/multiline-ternary": "off",
|
|
73
|
+
"@stylistic/new-parens": ["error", "always"],
|
|
74
|
+
"@stylistic/newline-per-chained-call": ["error", { ignoreChainWithDepth: 3 }],
|
|
75
|
+
"@stylistic/no-confusing-arrow": "error",
|
|
76
|
+
"@stylistic/no-extra-parens": ["error", "all", {
|
|
77
|
+
returnAssign: false,
|
|
78
|
+
}],
|
|
79
|
+
"@stylistic/no-extra-semi": "error",
|
|
22
80
|
"@stylistic/no-floating-decimal": "error",
|
|
81
|
+
"@stylistic/no-mixed-operators": "error",
|
|
82
|
+
"@stylistic/no-mixed-spaces-and-tabs": "error",
|
|
23
83
|
"@stylistic/no-multi-spaces": "error",
|
|
24
84
|
"@stylistic/no-multiple-empty-lines": ["error", { max: 2, maxBOF: 0, maxEOF: 1 }],
|
|
25
|
-
"@stylistic/no-
|
|
85
|
+
"@stylistic/no-tabs": "error",
|
|
86
|
+
"@stylistic/no-trailing-spaces": "error",
|
|
87
|
+
"@stylistic/no-whitespace-before-property": "error",
|
|
88
|
+
"@stylistic/nonblock-statement-body-position": ["error", "beside"],
|
|
89
|
+
"@stylistic/object-curly-newline": "error",
|
|
26
90
|
"@stylistic/object-curly-spacing": ["error", "always"],
|
|
27
|
-
"@stylistic/
|
|
91
|
+
"@stylistic/object-property-newline": "off",
|
|
92
|
+
"@stylistic/one-var-declaration-per-line": ["error", "initializations"],
|
|
93
|
+
"@stylistic/operator-linebreak": "error",
|
|
94
|
+
"@stylistic/padded-blocks": ["error", "never"],
|
|
95
|
+
"@stylistic/padding-line-between-statements": "error",
|
|
96
|
+
"@stylistic/quote-props": ["error", "consistent-as-needed"],
|
|
97
|
+
"@stylistic/quotes": ["error", "double", { avoidEscape: true }],
|
|
98
|
+
"@stylistic/rest-spread-spacing": ["error", "never"],
|
|
28
99
|
"@stylistic/semi": ["error", "always"],
|
|
100
|
+
"@stylistic/semi-spacing": ["error", { after: true, before: false }],
|
|
101
|
+
"@stylistic/semi-style": "error",
|
|
29
102
|
"@stylistic/space-before-blocks": "error",
|
|
30
103
|
"@stylistic/space-before-function-paren": ["error", {
|
|
31
104
|
anonymous: "never",
|
|
@@ -36,5 +109,14 @@ module.exports = {
|
|
|
36
109
|
"@stylistic/space-infix-ops": "error",
|
|
37
110
|
"@stylistic/space-unary-ops": "error",
|
|
38
111
|
"@stylistic/spaced-comment": "error",
|
|
112
|
+
"@stylistic/switch-colon-spacing": ["error", { after: true, before: false }],
|
|
113
|
+
"@stylistic/template-curly-spacing": ["error", "never"],
|
|
114
|
+
"@stylistic/template-tag-spacing": ["error", "never"],
|
|
115
|
+
"@stylistic/type-annotation-spacing": "error",
|
|
116
|
+
"@stylistic/type-generic-spacing": "error",
|
|
117
|
+
"@stylistic/type-named-tuple-spacing": "error",
|
|
118
|
+
"@stylistic/wrap-iife": ["error", "outside"],
|
|
119
|
+
"@stylistic/wrap-regex": "error",
|
|
120
|
+
"@stylistic/yield-star-spacing": ["error", "both"],
|
|
39
121
|
},
|
|
40
122
|
};
|
package/typescript.js
CHANGED
|
@@ -8,6 +8,10 @@ module.exports = {
|
|
|
8
8
|
rules: {
|
|
9
9
|
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
10
10
|
"@typescript-eslint/no-unused-vars": "off",
|
|
11
|
-
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
|
11
|
+
"@typescript-eslint/prefer-nullish-coalescing": ["error", {
|
|
12
|
+
ignorePrimitives: {
|
|
13
|
+
string: true,
|
|
14
|
+
},
|
|
15
|
+
}],
|
|
12
16
|
},
|
|
13
17
|
};
|