@aliexme/eslint-config 0.3.0 → 0.3.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/package.json +1 -1
- package/rules/react-native.js +11 -11
- package/rules/react.js +29 -29
package/package.json
CHANGED
package/rules/react-native.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
"env": {
|
|
3
|
+
"react-native/react-native": true,
|
|
4
|
+
},
|
|
5
|
+
"plugins": ["react-native"],
|
|
6
|
+
"extends": ["plugin:import/react-native"],
|
|
7
|
+
"rules": {
|
|
8
|
+
"react-native/no-unused-styles": "error",
|
|
9
|
+
"react-native/no-inline-styles": "error",
|
|
10
|
+
"react-native/no-raw-text": ["error", { "skip": ["Text", "Button"] }],
|
|
11
|
+
"react-native/no-single-element-style-arrays": "error",
|
|
12
|
+
},
|
|
2
13
|
"overrides": [
|
|
3
14
|
{
|
|
4
15
|
"files": ["**/*.{jsx,tsx}"],
|
|
@@ -7,17 +18,6 @@ module.exports = {
|
|
|
7
18
|
"jsx": true,
|
|
8
19
|
},
|
|
9
20
|
},
|
|
10
|
-
"env": {
|
|
11
|
-
"react-native/react-native": true,
|
|
12
|
-
},
|
|
13
|
-
"plugins": ["react-native"],
|
|
14
|
-
"extends": ["plugin:import/react-native"],
|
|
15
|
-
"rules": {
|
|
16
|
-
"react-native/no-unused-styles": "error",
|
|
17
|
-
"react-native/no-inline-styles": "error",
|
|
18
|
-
"react-native/no-raw-text": ["error", { "skip": ["Text", "Button"] }],
|
|
19
|
-
"react-native/no-single-element-style-arrays": "error",
|
|
20
|
-
},
|
|
21
21
|
},
|
|
22
22
|
],
|
|
23
23
|
}
|
package/rules/react.js
CHANGED
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
"plugins": ["react", "react-hooks"],
|
|
3
|
+
"extends": [
|
|
4
|
+
"plugin:import/react",
|
|
5
|
+
"plugin:react/recommended",
|
|
6
|
+
"plugin:react/jsx-runtime",
|
|
7
|
+
"plugin:react-hooks/recommended",
|
|
8
|
+
],
|
|
9
|
+
"settings": {
|
|
10
|
+
"react": {
|
|
11
|
+
"version": "detect",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
"rules": {
|
|
15
|
+
"react/jsx-tag-spacing": [
|
|
16
|
+
"error",
|
|
17
|
+
{
|
|
18
|
+
"closingSlash": "never",
|
|
19
|
+
"beforeSelfClosing": "proportional-always",
|
|
20
|
+
"afterOpening": "never",
|
|
21
|
+
"beforeClosing": "never",
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
"react/jsx-max-props-per-line": ["error", { "when": "multiline" }],
|
|
25
|
+
"react/jsx-curly-spacing": ["error", { "when": "never", "children": true }],
|
|
26
|
+
"react/jsx-curly-brace-presence": ["error", "never"],
|
|
27
|
+
"react/jsx-closing-bracket-location": "error",
|
|
28
|
+
"react/self-closing-comp": "error",
|
|
29
|
+
"react/no-unused-prop-types": "error",
|
|
30
|
+
},
|
|
2
31
|
"overrides": [
|
|
3
32
|
{
|
|
4
33
|
"files": ["**/*.{jsx,tsx}"],
|
|
@@ -7,35 +36,6 @@ module.exports = {
|
|
|
7
36
|
"jsx": true,
|
|
8
37
|
},
|
|
9
38
|
},
|
|
10
|
-
"plugins": ["react", "react-hooks"],
|
|
11
|
-
"extends": [
|
|
12
|
-
"plugin:import/react",
|
|
13
|
-
"plugin:react/recommended",
|
|
14
|
-
"plugin:react/jsx-runtime",
|
|
15
|
-
"plugin:react-hooks/recommended",
|
|
16
|
-
],
|
|
17
|
-
"settings": {
|
|
18
|
-
"react": {
|
|
19
|
-
"version": "detect",
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
"rules": {
|
|
23
|
-
"react/jsx-tag-spacing": [
|
|
24
|
-
"error",
|
|
25
|
-
{
|
|
26
|
-
"closingSlash": "never",
|
|
27
|
-
"beforeSelfClosing": "proportional-always",
|
|
28
|
-
"afterOpening": "never",
|
|
29
|
-
"beforeClosing": "never",
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
"react/jsx-max-props-per-line": ["error", { "when": "multiline" }],
|
|
33
|
-
"react/jsx-curly-spacing": ["error", { "when": "never", "children": true }],
|
|
34
|
-
"react/jsx-curly-brace-presence": ["error", "never"],
|
|
35
|
-
"react/jsx-closing-bracket-location": "error",
|
|
36
|
-
"react/self-closing-comp": "error",
|
|
37
|
-
"react/no-unused-prop-types": "error",
|
|
38
|
-
},
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"files": ["**/*.tsx"],
|