@adbayb/stack 2.22.0 → 2.24.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.
@@ -4,7 +4,9 @@ export const CWD = cwd();
4
4
 
5
5
  export const JAVASCRIPT_EXTENSIONS = ["**/*.{js,jsx,cjs,mjs}"];
6
6
 
7
+ export const TYPESCRIPT_EXTENSIONS = ["**/*.{ts,tsx,cts,mts}"];
8
+
7
9
  export const JAVASCRIPT_LIKE_EXTENSIONS = [
8
10
  ...JAVASCRIPT_EXTENSIONS,
9
- "**/*.{ts,tsx,cts,mts}",
11
+ ...TYPESCRIPT_EXTENSIONS,
10
12
  ];
@@ -1,10 +1,10 @@
1
- import reactWebApiPlugin from "eslint-plugin-react-web-api";
2
- import reactHooksExtraPlugin from "eslint-plugin-react-hooks-extra";
3
1
  import reactHooksPlugin from "eslint-plugin-react-hooks";
4
- // eslint-disable-next-line depend/ban-dependencies
5
- import reactPlugin from "eslint-plugin-react";
2
+ import reactPlugin from "@eslint-react/eslint-plugin";
6
3
 
7
- import { JAVASCRIPT_LIKE_EXTENSIONS } from "../constants.js";
4
+ import {
5
+ JAVASCRIPT_LIKE_EXTENSIONS,
6
+ TYPESCRIPT_EXTENSIONS,
7
+ } from "../constants.js";
8
8
 
9
9
  export const config = [
10
10
  {
@@ -12,84 +12,74 @@ export const config = [
12
12
  plugins: {
13
13
  "react": reactPlugin,
14
14
  "react-hooks": reactHooksPlugin,
15
- "react-hooks-extra": reactHooksExtraPlugin,
16
- "react-web-api": reactWebApiPlugin,
17
15
  },
18
16
  rules: {
19
- "react-hooks-extra/no-direct-set-state-in-use-effect": "error",
20
- "react-hooks-extra/no-direct-set-state-in-use-layout-effect":
21
- "error",
22
- "react-hooks-extra/no-redundant-custom-hook": "error",
23
- "react-hooks-extra/no-unnecessary-use-callback": "error",
24
- "react-hooks-extra/no-unnecessary-use-memo": "error",
25
- "react-hooks-extra/prefer-use-state-lazy-initialization": "error",
26
17
  "react-hooks/exhaustive-deps": "warn",
27
18
  "react-hooks/rules-of-hooks": "error",
28
- "react-web-api/no-leaked-event-listener": "error",
29
- "react-web-api/no-leaked-interval": "error",
30
- "react-web-api/no-leaked-resize-observer": "error",
31
- "react-web-api/no-leaked-timeout": "error",
32
- "react/boolean-prop-naming": [
19
+ "react/dom/no-dangerously-set-innerhtml": "error",
20
+ "react/dom/no-dangerously-set-innerhtml-with-children": "error",
21
+ "react/dom/no-find-dom-node": "error",
22
+ "react/dom/no-flush-sync": "error",
23
+ "react/dom/no-hydrate": "error",
24
+ "react/dom/no-missing-button-type": "error",
25
+ "react/dom/no-missing-iframe-sandbox": "error",
26
+ "react/dom/no-namespace": "error",
27
+ "react/dom/no-render": "error",
28
+ "react/dom/no-script-url": "error",
29
+ "react/dom/no-unsafe-iframe-sandbox": "error",
30
+ "react/dom/no-unsafe-target-blank": "error",
31
+ "react/dom/no-use-form-state": "error",
32
+ "react/dom/no-void-elements-with-children": "error",
33
+ "react/hooks-extra/no-direct-set-state-in-use-effect": "error",
34
+ "react/hooks-extra/no-direct-set-state-in-use-layout-effect":
33
35
  "error",
34
- { rule: "^(is|has)[A-Z]([A-Za-z0-9]?)+" },
35
- ],
36
- "react/button-has-type": "error",
37
- "react/checked-requires-onchange-or-readonly": "error",
38
- "react/destructuring-assignment": ["error", "always"],
39
- "react/display-name": "error",
40
- "react/forbid-component-props": "error",
41
- "react/forward-ref-uses-ref": "error",
42
- "react/hook-use-state": "error",
43
- "react/iframe-missing-sandbox": "error",
44
- "react/jsx-boolean-value": "error",
45
- "react/jsx-fragments": "error",
46
- "react/jsx-handler-names": "error",
47
- "react/jsx-key": "error",
48
- "react/jsx-no-bind": "error",
49
- "react/jsx-no-comment-textnodes": "error",
50
- "react/jsx-no-constructed-context-values": "error",
51
- "react/jsx-no-leaked-render": "error",
52
- "react/jsx-no-script-url": "error",
53
- "react/jsx-no-target-blank": "error",
54
- "react/jsx-no-useless-fragment": "error",
55
- "react/jsx-props-no-spread-multi": "error",
56
- "react/jsx-uses-react": "error",
57
- "react/jsx-uses-vars": "error",
36
+ "react/hooks-extra/no-unnecessary-use-callback": "error",
37
+ "react/hooks-extra/no-unnecessary-use-memo": "error",
38
+ "react/hooks-extra/no-unnecessary-use-prefix": "error",
39
+ "react/hooks-extra/prefer-use-state-lazy-initialization": "error",
40
+ "react/jsx-key-before-spread": "error",
41
+ "react/jsx-no-iife": "error",
42
+ "react/naming-convention/component-name": "error",
43
+ "react/naming-convention/context-name": "error",
44
+ "react/naming-convention/use-state": "error",
58
45
  "react/no-access-state-in-setstate": "error",
59
- "react/no-array-index-key": "error",
60
- "react/no-arrow-function-lifecycle": "error",
61
46
  "react/no-children-prop": "error",
62
- "react/no-danger-with-children": "error",
63
- "react/no-did-mount-set-state": "error",
64
- "react/no-did-update-set-state": "error",
47
+ "react/no-class-component": "error",
48
+ "react/no-comment-textnodes": "error",
49
+ "react/no-context-provider": "error",
50
+ "react/no-create-ref": "error",
51
+ "react/no-default-props": "error",
65
52
  "react/no-direct-mutation-state": "error",
66
- "react/no-find-dom-node": "error",
67
- "react/no-is-mounted": "error",
68
- "react/no-namespace": "error",
69
- "react/no-object-type-as-default-prop": "error",
70
- "react/no-redundant-should-component-update": "error",
71
- "react/no-render-return-value": "error",
53
+ "react/no-duplicate-key": "error",
54
+ "react/no-forward-ref": "error",
55
+ "react/no-implicit-key": "error",
56
+ "react/no-leaked-conditional-rendering": "error",
57
+ "react/no-missing-component-display-name": "error",
58
+ "react/no-missing-key": "error",
59
+ "react/no-misused-capture-owner-stack": "error",
60
+ "react/no-nested-component-definitions": "error",
61
+ "react/no-nested-lazy-component-declarations": "error",
62
+ "react/no-prop-types": "error",
72
63
  "react/no-string-refs": "error",
73
- "react/no-this-in-sfc": "error",
74
- "react/no-typos": "error",
75
- "react/no-unescaped-entities": "error",
76
- "react/no-unknown-property": "error",
77
- "react/no-unsafe": "error",
78
- "react/no-unstable-nested-components": "error",
79
- "react/no-unused-class-component-methods": "error",
80
- "react/no-unused-state": "error",
81
- "react/no-will-update-set-state": "error",
82
- "react/prefer-read-only-props": "error",
83
- "react/prefer-stateless-function": "error",
84
- "react/sort-comp": "error",
85
- "react/state-in-constructor": ["error", "never"],
86
- "react/style-prop-object": "error",
87
- "react/void-dom-elements-no-children": "error",
64
+ "react/no-unstable-context-value": "error",
65
+ "react/no-unstable-default-props": "error",
66
+ "react/no-use-context": "error",
67
+ "react/no-useless-fragment": "error",
68
+ "react/prefer-shorthand-boolean": "error",
69
+ "react/prefer-shorthand-fragment": "error",
70
+ "react/web-api/no-leaked-event-listener": "error",
71
+ "react/web-api/no-leaked-interval": "error",
72
+ "react/web-api/no-leaked-resize-observer": "error",
73
+ "react/web-api/no-leaked-timeout": "error",
74
+ },
75
+ },
76
+ {
77
+ files: TYPESCRIPT_EXTENSIONS,
78
+ plugins: {
79
+ react: reactPlugin,
88
80
  },
89
- settings: {
90
- react: {
91
- version: "detect",
92
- },
81
+ rules: {
82
+ "react/prefer-read-only-props": "error",
93
83
  },
94
84
  },
95
85
  ];
@@ -112,7 +112,6 @@ export const config = [
112
112
  "sonarjs/no-incorrect-string-concat": "error",
113
113
  "sonarjs/no-internal-api-use": "error",
114
114
  "sonarjs/no-intrusive-permissions": "error",
115
- "sonarjs/no-invalid-await": "error",
116
115
  "sonarjs/no-invalid-regexp": "error",
117
116
  "sonarjs/no-invariant-returns": "error",
118
117
  "sonarjs/no-inverted-boolean-check": "error",
@@ -1,7 +1,6 @@
1
1
  import tseslint from "typescript-eslint";
2
2
 
3
3
  import {
4
- CWD,
5
4
  JAVASCRIPT_EXTENSIONS,
6
5
  JAVASCRIPT_LIKE_EXTENSIONS,
7
6
  } from "../constants.js";
@@ -12,8 +11,8 @@ export const config = [
12
11
  languageOptions: {
13
12
  parser: tseslint.parser,
14
13
  parserOptions: {
15
- project: "./tsconfig.json",
16
- tsconfigRootDir: CWD,
14
+ projectService: true,
15
+ tsconfigRootDir: import.meta.dirname,
17
16
  },
18
17
  },
19
18
  plugins: {
package/dist/index.js CHANGED
@@ -196,7 +196,7 @@ const ESLINT_EXTENSIONS = [
196
196
  "mdx"
197
197
  ];
198
198
 
199
- var version = "2.22.0";
199
+ var version = "2.24.0";
200
200
 
201
201
  const createWatchCommand = (program)=>{
202
202
  program.command({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adbayb/stack",
3
- "version": "2.22.0",
3
+ "version": "2.24.0",
4
4
  "description": "My opinionated JavaScript-based toolchain",
5
5
  "keywords": [
6
6
  "stack",
@@ -40,41 +40,39 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "@changesets/changelog-github": "^0.5.1",
43
- "@changesets/cli": "^2.28.1",
44
- "@commitlint/cli": "^19.8.0",
45
- "@commitlint/config-conventional": "^19.8.0",
46
- "@eslint/compat": "^1.2.7",
43
+ "@changesets/cli": "^2.29.4",
44
+ "@commitlint/cli": "^19.8.1",
45
+ "@commitlint/config-conventional": "^19.8.1",
46
+ "@eslint-react/eslint-plugin": "^1.52.2",
47
+ "@eslint/compat": "^1.3.0",
47
48
  "@eslint/eslintrc": "^3.3.1",
48
- "@stylistic/eslint-plugin": "^4.2.0",
49
- "@vitest/eslint-plugin": "^1.1.38",
50
- "eslint": "^9.23.0",
51
- "eslint-config-prettier": "^10.1.1",
52
- "eslint-import-resolver-typescript": "^4.3.1",
53
- "eslint-plugin-depend": "^0.12.0",
54
- "eslint-plugin-import-x": "^4.9.4",
49
+ "@stylistic/eslint-plugin": "^4.4.1",
50
+ "@vitest/eslint-plugin": "^1.2.7",
51
+ "eslint": "^9.29.0",
52
+ "eslint-config-prettier": "^10.1.5",
53
+ "eslint-import-resolver-typescript": "^4.4.3",
54
+ "eslint-plugin-depend": "^1.2.0",
55
+ "eslint-plugin-import-x": "^4.15.2",
55
56
  "eslint-plugin-jest-formatting": "^3.1.0",
56
- "eslint-plugin-jsdoc": "^50.6.9",
57
- "eslint-plugin-mdx": "^3.3.1",
58
- "eslint-plugin-n": "^17.17.0",
59
- "eslint-plugin-prettier": "^5.2.5",
60
- "eslint-plugin-react": "^7.37.4",
57
+ "eslint-plugin-jsdoc": "^51.0.3",
58
+ "eslint-plugin-mdx": "^3.5.0",
59
+ "eslint-plugin-n": "^17.20.0",
60
+ "eslint-plugin-prettier": "^5.5.0",
61
61
  "eslint-plugin-react-hooks": "^5.2.0",
62
- "eslint-plugin-react-hooks-extra": "^1.38.4",
63
- "eslint-plugin-react-web-api": "^1.38.4",
64
- "eslint-plugin-sonarjs": "^3.0.2",
62
+ "eslint-plugin-sonarjs": "^3.0.3",
65
63
  "eslint-plugin-sort-keys-custom-order": "^2.2.1",
66
- "eslint-plugin-unicorn": "^58.0.0",
67
- "fdir": "^6.4.3",
68
- "globals": "^16.0.0",
64
+ "eslint-plugin-unicorn": "^59.0.1",
65
+ "fdir": "^6.4.6",
66
+ "globals": "^16.2.0",
69
67
  "prettier": "^3.5.3",
70
- "prettier-plugin-packagejson": "^2.5.10",
68
+ "prettier-plugin-packagejson": "^2.5.15",
71
69
  "termost": "^1.4.0",
72
- "turbo": "^2.4.4",
73
- "typescript": "^5.8.2",
74
- "typescript-eslint": "^8.28.0"
70
+ "turbo": "^2.5.4",
71
+ "typescript": "^5.8.3",
72
+ "typescript-eslint": "^8.34.1"
75
73
  },
76
74
  "devDependencies": {
77
- "@types/node": "22.13.14",
75
+ "@types/node": "22.15.32",
78
76
  "quickbundle": "2.12.0"
79
77
  },
80
78
  "publishConfig": {
@@ -40,8 +40,8 @@ jobs:
40
40
  - name: Publish pre-release version(s)
41
41
  if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
42
42
  run: |
43
- pnpm --filter=\!@examples/\* --recursive exec pnpm version "$(pnpm show ./ version)-next-${GITHUB_SHA::7}"
44
- pnpm --filter=\!@examples/\* --recursive exec pnpm publish --tag next --no-git-checks
43
+ pnpm --filter="!./(applications|examples|tools)/*" --recursive exec pnpm version "$(pnpm show ./ version)-next-${GITHUB_SHA::7}"
44
+ pnpm --filter="!./(applications|examples|tools)/*" --recursive exec pnpm publish --tag next --no-git-checks
45
45
  - name: Create release pull request
46
46
  if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
47
47
  uses: changesets/action@v1
@@ -40,8 +40,8 @@ jobs:
40
40
  - name: Publish pre-release version(s)
41
41
  if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
42
42
  run: |
43
- pnpm --filter=\!@examples/\* --recursive exec pnpm version "$(pnpm show ./ version)-next-${GITHUB_SHA::7}"
44
- pnpm --filter=\!@examples/\* --recursive exec pnpm publish --tag next --no-git-checks
43
+ pnpm --filter="!./(applications|examples|tools)/*" --recursive exec pnpm version "$(pnpm show ./ version)-next-${GITHUB_SHA::7}"
44
+ pnpm --filter="!./(applications|examples|tools)/*" --recursive exec pnpm publish --tag next --no-git-checks
45
45
  - name: Create release pull request
46
46
  if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
47
47
  uses: changesets/action@v1