@10stars/config 5.0.0 → 5.1.2
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/.eslintrc.js +23 -4
- package/package.json +4 -4
package/.eslintrc.js
CHANGED
|
@@ -50,7 +50,7 @@ module.exports = {
|
|
|
50
50
|
`@typescript-eslint`,
|
|
51
51
|
`import`,
|
|
52
52
|
`react`,
|
|
53
|
-
|
|
53
|
+
`@10stars/react-hooks`, // https://reactjs.org/docs/hooks-rules.html#eslint-plugin
|
|
54
54
|
`regexp`,
|
|
55
55
|
`simple-import-sort`,
|
|
56
56
|
`sort-keys-fix`,
|
|
@@ -65,7 +65,7 @@ module.exports = {
|
|
|
65
65
|
`plugin:@typescript-eslint/recommended`,
|
|
66
66
|
`plugin:@typescript-eslint/recommended-requiring-type-checking`,
|
|
67
67
|
`plugin:react/recommended`,
|
|
68
|
-
`plugin
|
|
68
|
+
`plugin:@10stars/react-hooks/recommended`,
|
|
69
69
|
`plugin:regexp/recommended`,
|
|
70
70
|
|
|
71
71
|
// "plugin:import/typescript",
|
|
@@ -84,7 +84,7 @@ module.exports = {
|
|
|
84
84
|
"import/parsers": { "@typescript-eslint/parser": [`.ts`, `.tsx`] },
|
|
85
85
|
"import/extensions": [`.ts`, `.tsx`, `.js`, `.jsx`],
|
|
86
86
|
react: {
|
|
87
|
-
version: `
|
|
87
|
+
version: `latest`,
|
|
88
88
|
},
|
|
89
89
|
},
|
|
90
90
|
rules: {
|
|
@@ -115,13 +115,32 @@ module.exports = {
|
|
|
115
115
|
type.warning,
|
|
116
116
|
{ extensions: [`.jsx`, `.tsx`] },
|
|
117
117
|
], // also want to use with ".tsx"
|
|
118
|
+
"react/no-invalid-html-attribute": type.error,
|
|
119
|
+
"react/prefer-stateless-function": type.error,
|
|
120
|
+
"react/jsx-boolean-value": [type.error, "never"],
|
|
121
|
+
"react/jsx-curly-brace-presence": [type.error, "always"],
|
|
122
|
+
"react/jsx-fragments": type.error,
|
|
123
|
+
"react/jsx-no-bind": type.error,
|
|
124
|
+
"react/jsx-no-constructed-context-values": type.error,
|
|
125
|
+
"react/jsx-no-script-url": [
|
|
126
|
+
type.error,
|
|
127
|
+
[
|
|
128
|
+
{ name: "Link", props: ["to"] },
|
|
129
|
+
{ name: "NavLink", props: ["to"] },
|
|
130
|
+
{ name: "a", props: ["href", "to"] },
|
|
131
|
+
],
|
|
132
|
+
],
|
|
133
|
+
"react/jsx-no-useless-fragment": type.error,
|
|
134
|
+
"react/jsx-no-target-blank": type.error,
|
|
135
|
+
"react/jsx-sort-props": type.error,
|
|
118
136
|
/**
|
|
119
137
|
* Hooks
|
|
120
138
|
*/
|
|
121
|
-
"react-hooks/exhaustive-deps": [
|
|
139
|
+
"@10stars/react-hooks/exhaustive-deps": [
|
|
122
140
|
type.warning,
|
|
123
141
|
{
|
|
124
142
|
additionalHooks: `(${reactUseHooks.join(`|`)})`,
|
|
143
|
+
ignoreThisDependency: `always`,
|
|
125
144
|
},
|
|
126
145
|
],
|
|
127
146
|
/**
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
},
|
|
6
6
|
"name": "@10stars/config",
|
|
7
7
|
"description": "10stars.dev Shareable Configs",
|
|
8
|
-
"version": "5.
|
|
8
|
+
"version": "5.1.2",
|
|
9
9
|
"author": "10stars.dev <web@alexandrov.co> (https://alexandrov.co)",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"config"
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"lint-rule-timings": "cross-env TIMING=1 npm run lint"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
+
"@10stars/eslint-plugin-react-hooks": "^4.3.1",
|
|
27
28
|
"@commitlint/cli": "^16.0.0",
|
|
28
29
|
"@commitlint/config-conventional": "^16.0.0",
|
|
29
30
|
"@types/lodash": "^4.0.0",
|
|
@@ -31,13 +32,12 @@
|
|
|
31
32
|
"@types/react": "^17.0.0",
|
|
32
33
|
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
33
34
|
"@typescript-eslint/parser": "^5.0.0",
|
|
34
|
-
"esbuild": "~0.14.
|
|
35
|
-
"esbuild-node-loader": "~0.6.
|
|
35
|
+
"esbuild": "~0.14.23",
|
|
36
|
+
"esbuild-node-loader": "~0.6.5",
|
|
36
37
|
"eslint": "^8.0.0",
|
|
37
38
|
"eslint-config-prettier": "^8.0.0",
|
|
38
39
|
"eslint-plugin-import": "^2.0.0",
|
|
39
40
|
"eslint-plugin-react": "^7.0.0",
|
|
40
|
-
"eslint-plugin-react-hooks": "^4.0.0",
|
|
41
41
|
"eslint-plugin-regexp": "^1.0.0",
|
|
42
42
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
43
43
|
"eslint-plugin-sort-keys-fix": "^1.0.0",
|