eslint-config-heck 1.26.0 → 1.28.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/node.js +4 -2
- package/package.json +9 -8
- package/reactNative.js +14 -0
- package/readme.md +16 -2
package/node.js
CHANGED
|
@@ -5,7 +5,7 @@ const path = require("node:path");
|
|
|
5
5
|
const parserOptions = {
|
|
6
6
|
sourceType: "script",
|
|
7
7
|
|
|
8
|
-
ecmaVersion:
|
|
8
|
+
ecmaVersion: 13,
|
|
9
9
|
ecmaFeatures: {
|
|
10
10
|
globalReturn: false,
|
|
11
11
|
impliedStrict: false,
|
|
@@ -14,7 +14,7 @@ const parserOptions = {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const env = {
|
|
17
|
-
|
|
17
|
+
es2022: true,
|
|
18
18
|
node: true,
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -74,6 +74,7 @@ const rules = {
|
|
|
74
74
|
],
|
|
75
75
|
"no-loss-of-precision": "error",
|
|
76
76
|
"no-misleading-character-class": "error",
|
|
77
|
+
"no-new-native-nonconstructor": "error",
|
|
77
78
|
"no-obj-calls": "error",
|
|
78
79
|
"no-promise-executor-return": "error",
|
|
79
80
|
"no-prototype-builtins": "error",
|
|
@@ -141,6 +142,7 @@ const rules = {
|
|
|
141
142
|
],
|
|
142
143
|
"no-empty-function": "error",
|
|
143
144
|
"no-empty-pattern": "error",
|
|
145
|
+
"no-empty-static-block": "error",
|
|
144
146
|
"no-eq-null": "off",
|
|
145
147
|
"no-eval": "error",
|
|
146
148
|
"no-extend-native": "error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-heck",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.0",
|
|
4
4
|
"description": "Contains an ESLint configuration for ES2015+, TypeScript, and React.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,14 +18,15 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@delagen/eslint-plugin-deprecation": "1.3.2",
|
|
21
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
22
|
-
"@typescript-eslint/parser": "5.
|
|
23
|
-
"eslint": "8.
|
|
21
|
+
"@typescript-eslint/eslint-plugin": "5.42.1",
|
|
22
|
+
"@typescript-eslint/parser": "5.42.1",
|
|
23
|
+
"eslint": "8.27.0",
|
|
24
24
|
"eslint-import-resolver-typescript": "3.5.2",
|
|
25
25
|
"eslint-plugin-import": "2.26.0",
|
|
26
|
-
"eslint-plugin-jest": "27.1.
|
|
26
|
+
"eslint-plugin-jest": "27.1.5",
|
|
27
27
|
"eslint-plugin-react": "7.31.10",
|
|
28
28
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
29
|
+
"eslint-plugin-react-native": "4.0.0",
|
|
29
30
|
"eslint-plugin-testing-library": "5.9.1",
|
|
30
31
|
"eslint-plugin-typescript-heck": "1.3.1",
|
|
31
32
|
"eslint-plugin-unicorn": "44.0.2",
|
|
@@ -33,9 +34,9 @@
|
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@testing-library/react": "13.4.0",
|
|
36
|
-
"@types/jest": "29.2.
|
|
37
|
-
"@types/react": "18.0.
|
|
38
|
-
"jest": "29.
|
|
37
|
+
"@types/jest": "29.2.2",
|
|
38
|
+
"@types/react": "18.0.25",
|
|
39
|
+
"jest": "29.3.1",
|
|
39
40
|
"react": "18.2.0",
|
|
40
41
|
"semantic-release": "19.0.5"
|
|
41
42
|
},
|
package/reactNative.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
plugins: ["react-native"],
|
|
5
|
+
rules: {
|
|
6
|
+
"react-native/no-color-literals": "error",
|
|
7
|
+
"react-native/no-inline-styles": "error",
|
|
8
|
+
"react-native/no-raw-text": "error",
|
|
9
|
+
"react-native/no-single-element-style-arrays": "error",
|
|
10
|
+
"react-native/no-unused-styles": "error",
|
|
11
|
+
"react-native/sort-styles": "off",
|
|
12
|
+
"react-native/split-platform-components": "error",
|
|
13
|
+
},
|
|
14
|
+
};
|
package/readme.md
CHANGED
|
@@ -28,7 +28,9 @@ If you are in the browser, use:
|
|
|
28
28
|
}
|
|
29
29
|
~~~
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
## Extensions
|
|
32
|
+
|
|
33
|
+
### Complexity
|
|
32
34
|
|
|
33
35
|
Optionally you can enable some complexity rules by using the **complexity** configuration in addition to the **node** or **browser** rules:
|
|
34
36
|
|
|
@@ -38,10 +40,22 @@ Optionally you can enable some complexity rules by using the **complexity** conf
|
|
|
38
40
|
}
|
|
39
41
|
~~~
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
### Group imports
|
|
44
|
+
|
|
45
|
+
Optionally you can switch to another import sorting rule, which groups the imports by type and supports auto fixing. You can enable this rule by adding the **groupImports** configuration in addition to the **node** or **browser** rules:
|
|
42
46
|
|
|
43
47
|
~~~json
|
|
44
48
|
{
|
|
45
49
|
"extends": ["heck/node", "heck/groupImports"]
|
|
46
50
|
}
|
|
47
51
|
~~~
|
|
52
|
+
|
|
53
|
+
### React Native
|
|
54
|
+
|
|
55
|
+
If you are using react-native, you can enable react-native specific rules:
|
|
56
|
+
|
|
57
|
+
~~~json
|
|
58
|
+
{
|
|
59
|
+
"extends": ["heck/node", "heck/reactNative"]
|
|
60
|
+
}
|
|
61
|
+
~~~
|