@adbayb/stack 0.0.0-next-a66d467 → 0.0.0-next-389cf5e

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.
@@ -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,10 +10,22 @@ 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]?)+" },
@@ -35,9 +49,7 @@ export const config = [
35
49
  "react/jsx-no-script-url": "error",
36
50
  "react/jsx-no-target-blank": "error",
37
51
  "react/jsx-no-useless-fragment": "error",
38
- "react/jsx-pascal-case": "error",
39
52
  "react/jsx-props-no-spread-multi": "error",
40
- "react/jsx-sort-props": "error",
41
53
  "react/jsx-uses-react": "error",
42
54
  "react/jsx-uses-vars": "error",
43
55
  "react/no-access-state-in-setstate": "error",
@@ -66,7 +78,6 @@ export const config = [
66
78
  "react/no-will-update-set-state": "error",
67
79
  "react/prefer-read-only-props": "error",
68
80
  "react/prefer-stateless-function": "error",
69
- "react/self-closing-comp": "error",
70
81
  "react/sort-comp": "error",
71
82
  "react/state-in-constructor": ["error", "never"],
72
83
  "react/style-prop-object": "error",
@@ -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 { CWD, JAVASCRIPT_LIKE_EXTENSIONS } from "../constants.js";
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": "error",
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
@@ -136,8 +136,8 @@ const eslint = (options)=>async (files = [])=>{
136
136
  };
137
137
  const turbo = async (command, options = {})=>{
138
138
  try {
139
- const { hasLiveOutput = true, ...restOptions } = options;
140
- return await helpers.exec(`turbo run ${command}`, {
139
+ const { excludeExamples = false, hasLiveOutput = true, ...restOptions } = options;
140
+ return await helpers.exec(`turbo run ${command} ${excludeExamples ? "--filter !@examples/*" : ""}`, {
141
141
  ...restOptions,
142
142
  hasLiveOutput
143
143
  });
@@ -167,7 +167,7 @@ const ESLINT_EXTENSIONS = [
167
167
  "mdx"
168
168
  ];
169
169
 
170
- var version = "0.0.0-next-a66d467";
170
+ var version = "0.0.0-next-389cf5e";
171
171
 
172
172
  const createWatchCommand = (program)=>{
173
173
  program.command({
@@ -220,7 +220,6 @@ const createReleaseCommand = (program)=>{
220
220
  description: "Publish package(s) to the registry"
221
221
  }).task({
222
222
  async handler () {
223
- // TODO: label instead?
224
223
  helpers.message("New changelog entry\n");
225
224
  await changeset("changeset");
226
225
  },
@@ -307,6 +306,7 @@ const createFixCommand = (program)=>{
307
306
  label: label$3("Prepare the project"),
308
307
  async handler () {
309
308
  await turbo("build", {
309
+ excludeExamples: true,
310
310
  hasLiveOutput: false
311
311
  });
312
312
  }
@@ -691,6 +691,7 @@ const createCheckCommand = (program)=>{
691
691
  label: label("Prepare the project"),
692
692
  async handler () {
693
693
  await turbo("build", {
694
+ excludeExamples: true,
694
695
  hasLiveOutput: false
695
696
  });
696
697
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adbayb/stack",
3
- "version": "0.0.0-next-a66d467",
3
+ "version": "0.0.0-next-389cf5e",
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.2",
54
- "@eslint/eslintrc": "^3.1.0",
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.8",
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.1",
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.2.3",
78
+ "turbo": "^2.3.0",
77
79
  "typescript-eslint": "^8.14.0",
78
80
  "typescript": "^5.6.3"
79
81
  },