@adbayb/stack 0.0.0-next-b891d6c → 0.0.0-next-0f6c3a3
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/configs/eslint/presets/overridable.js +0 -5
- package/configs/eslint/presets/react.js +18 -3
- package/configs/eslint/presets/stylistic.js +3 -0
- package/configs/eslint/presets/typescript.js +9 -1
- package/configs/eslint/presets/unicorn.js +9 -1
- package/dist/index.js +1 -1
- package/package.json +8 -6
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import tseslint from "typescript-eslint";
|
|
2
1
|
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
|
|
3
2
|
|
|
4
3
|
export const config = [
|
|
5
|
-
{
|
|
6
|
-
files: ["**/*.{js,jsx,cjs,mjs}"],
|
|
7
|
-
...tseslint.configs.disableTypeChecked,
|
|
8
|
-
},
|
|
9
4
|
{
|
|
10
5
|
// Relaxed rules for example-like folder, and [config-, story-, and test]-like files
|
|
11
6
|
files: [
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import reactWebApiPlugin from "eslint-plugin-react-web-api";
|
|
2
|
+
import reactHooksExtraPlugin from "eslint-plugin-react-hooks-extra";
|
|
1
3
|
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
2
4
|
// eslint-disable-next-line depend/ban-dependencies
|
|
3
5
|
import reactPlugin from "eslint-plugin-react";
|
|
@@ -8,16 +10,29 @@ export const config = [
|
|
|
8
10
|
plugins: {
|
|
9
11
|
"react": reactPlugin,
|
|
10
12
|
"react-hooks": reactHooksPlugin,
|
|
13
|
+
"react-hooks-extra": reactHooksExtraPlugin,
|
|
14
|
+
"react-web-api": reactWebApiPlugin,
|
|
11
15
|
},
|
|
12
16
|
rules: {
|
|
17
|
+
"react-hooks-extra/no-direct-set-state-in-use-effect": "error",
|
|
18
|
+
"react-hooks-extra/no-direct-set-state-in-use-layout-effect": "error",
|
|
19
|
+
"react-hooks-extra/no-redundant-custom-hook": "error",
|
|
20
|
+
"react-hooks-extra/no-unnecessary-use-callback": "error",
|
|
21
|
+
"react-hooks-extra/no-unnecessary-use-memo": "error",
|
|
22
|
+
"react-hooks-extra/prefer-use-state-lazy-initialization": "error",
|
|
13
23
|
"react-hooks/exhaustive-deps": "warn",
|
|
14
24
|
"react-hooks/rules-of-hooks": "error",
|
|
25
|
+
"react-web-api/no-leaked-event-listener": "error",
|
|
26
|
+
"react-web-api/no-leaked-interval": "error",
|
|
27
|
+
"react-web-api/no-leaked-resize-observer": "error",
|
|
28
|
+
"react-web-api/no-leaked-timeout": "error",
|
|
15
29
|
"react/boolean-prop-naming": [
|
|
16
30
|
"error",
|
|
17
31
|
{ rule: "^(is|has)[A-Z]([A-Za-z0-9]?)+" },
|
|
18
32
|
],
|
|
19
33
|
"react/button-has-type": "error",
|
|
20
34
|
"react/checked-requires-onchange-or-readonly": "error",
|
|
35
|
+
"react/destructuring-assignment": ["error", "always"],
|
|
21
36
|
"react/display-name": "error",
|
|
22
37
|
"react/forbid-component-props": "error",
|
|
23
38
|
"react/forward-ref-uses-ref": "error",
|
|
@@ -28,14 +43,13 @@ export const config = [
|
|
|
28
43
|
"react/jsx-handler-names": "error",
|
|
29
44
|
"react/jsx-key": "error",
|
|
30
45
|
"react/jsx-no-bind": "error",
|
|
46
|
+
"react/jsx-no-comment-textnodes": "error",
|
|
31
47
|
"react/jsx-no-constructed-context-values": "error",
|
|
32
48
|
"react/jsx-no-leaked-render": "error",
|
|
33
49
|
"react/jsx-no-script-url": "error",
|
|
34
50
|
"react/jsx-no-target-blank": "error",
|
|
35
51
|
"react/jsx-no-useless-fragment": "error",
|
|
36
|
-
"react/jsx-pascal-case": "error",
|
|
37
52
|
"react/jsx-props-no-spread-multi": "error",
|
|
38
|
-
"react/jsx-sort-props": "error",
|
|
39
53
|
"react/jsx-uses-react": "error",
|
|
40
54
|
"react/jsx-uses-vars": "error",
|
|
41
55
|
"react/no-access-state-in-setstate": "error",
|
|
@@ -64,7 +78,8 @@ export const config = [
|
|
|
64
78
|
"react/no-will-update-set-state": "error",
|
|
65
79
|
"react/prefer-read-only-props": "error",
|
|
66
80
|
"react/prefer-stateless-function": "error",
|
|
67
|
-
"react/
|
|
81
|
+
"react/sort-comp": "error",
|
|
82
|
+
"react/state-in-constructor": ["error", "never"],
|
|
68
83
|
"react/style-prop-object": "error",
|
|
69
84
|
"react/void-dom-elements-no-children": "error",
|
|
70
85
|
},
|
|
@@ -9,6 +9,9 @@ export const config = [
|
|
|
9
9
|
"@stylistic": stylistic,
|
|
10
10
|
},
|
|
11
11
|
rules: {
|
|
12
|
+
"@stylistic/jsx-pascal-case": "error",
|
|
13
|
+
"@stylistic/jsx-self-closing-comp": "error",
|
|
14
|
+
"@stylistic/jsx-sort-props": "error",
|
|
12
15
|
"@stylistic/lines-between-class-members": ["error", "always"],
|
|
13
16
|
"@stylistic/multiline-comment-style": ["error", "starred-block"],
|
|
14
17
|
"@stylistic/padding-line-between-statements": [
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import tseslint from "typescript-eslint";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
CWD,
|
|
5
|
+
JAVASCRIPT_EXTENSIONS,
|
|
6
|
+
JAVASCRIPT_LIKE_EXTENSIONS,
|
|
7
|
+
} from "../constants.js";
|
|
4
8
|
|
|
5
9
|
export const config = [
|
|
6
10
|
{
|
|
@@ -169,4 +173,8 @@ export const config = [
|
|
|
169
173
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error",
|
|
170
174
|
},
|
|
171
175
|
},
|
|
176
|
+
{
|
|
177
|
+
files: JAVASCRIPT_EXTENSIONS,
|
|
178
|
+
...tseslint.configs.disableTypeChecked,
|
|
179
|
+
},
|
|
172
180
|
];
|
|
@@ -108,7 +108,15 @@ export const config = [
|
|
|
108
108
|
"unicorn/prefer-ternary": "error",
|
|
109
109
|
"unicorn/prefer-top-level-await": "error",
|
|
110
110
|
"unicorn/prefer-type-error": "error",
|
|
111
|
-
"unicorn/prevent-abbreviations":
|
|
111
|
+
"unicorn/prevent-abbreviations": [
|
|
112
|
+
"error",
|
|
113
|
+
{
|
|
114
|
+
allowList: {
|
|
115
|
+
props: true,
|
|
116
|
+
Props: true,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
],
|
|
112
120
|
"unicorn/relative-url-style": ["error", "always"],
|
|
113
121
|
"unicorn/require-array-join-separator": "error",
|
|
114
122
|
"unicorn/require-number-to-fixed-digits-argument": "error",
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adbayb/stack",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-0f6c3a3",
|
|
4
4
|
"description": "My opinionated JavaScript-based toolchain",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"@changesets/cli": "^2.27.9",
|
|
51
51
|
"@commitlint/cli": "^19.5.0",
|
|
52
52
|
"@commitlint/config-conventional": "^19.5.0",
|
|
53
|
-
"@eslint/compat": "^1.2.
|
|
54
|
-
"@eslint/eslintrc": "^3.
|
|
53
|
+
"@eslint/compat": "^1.2.3",
|
|
54
|
+
"@eslint/eslintrc": "^3.2.0",
|
|
55
55
|
"@stylistic/eslint-plugin": "^2.10.1",
|
|
56
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
56
|
+
"@vitest/eslint-plugin": "^1.1.10",
|
|
57
57
|
"eslint-config-prettier": "^9.1.0",
|
|
58
58
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
59
59
|
"eslint-plugin-depend": "^0.12.0",
|
|
@@ -61,9 +61,11 @@
|
|
|
61
61
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
62
62
|
"eslint-plugin-jsdoc": "^50.5.0",
|
|
63
63
|
"eslint-plugin-mdx": "^3.1.5",
|
|
64
|
-
"eslint-plugin-n": "^17.13.
|
|
64
|
+
"eslint-plugin-n": "^17.13.2",
|
|
65
65
|
"eslint-plugin-prettier": "^5.2.1",
|
|
66
|
+
"eslint-plugin-react-hooks-extra": "^1.16.1",
|
|
66
67
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
68
|
+
"eslint-plugin-react-web-api": "^1.16.1",
|
|
67
69
|
"eslint-plugin-react": "^7.37.2",
|
|
68
70
|
"eslint-plugin-sonarjs": "^2.0.4",
|
|
69
71
|
"eslint-plugin-sort-keys-custom-order": "^2.2.0",
|
|
@@ -73,7 +75,7 @@
|
|
|
73
75
|
"globals": "^15.12.0",
|
|
74
76
|
"prettier": "^3.3.3",
|
|
75
77
|
"termost": "^1.2.0",
|
|
76
|
-
"turbo": "^2.
|
|
78
|
+
"turbo": "^2.3.0",
|
|
77
79
|
"typescript-eslint": "^8.14.0",
|
|
78
80
|
"typescript": "^5.6.3"
|
|
79
81
|
},
|