@adbayb/stack 2.27.0 → 2.28.1
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/constants.js +1 -3
- package/configs/eslint/index.js +2 -0
- package/configs/eslint/presets/import.js +0 -1
- package/configs/eslint/presets/markdown.js +3 -0
- package/configs/eslint/presets/node.js +3 -2
- package/configs/eslint/presets/react.js +2 -0
- package/configs/eslint/presets/uncategorized.js +0 -8
- package/configs/eslint/presets/unicorn.js +5 -4
- package/dist/index.js +5 -6
- package/package.json +16 -17
package/configs/eslint/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { config as sonarConfig } from "./presets/sonar.js";
|
|
|
7
7
|
import { config as reactConfig } from "./presets/react.js";
|
|
8
8
|
import { config as overridableConfig } from "./presets/overridable.js";
|
|
9
9
|
import { config as nodeConfig } from "./presets/node.js";
|
|
10
|
+
import { config as markdownConfig } from "./presets/markdown.js";
|
|
10
11
|
import { config as jsdocConfig } from "./presets/jsdoc.js";
|
|
11
12
|
import { config as importConfig } from "./presets/import.js";
|
|
12
13
|
import { config as eslintConfig } from "./presets/eslint.js";
|
|
@@ -20,6 +21,7 @@ export default createConfig(
|
|
|
20
21
|
...typescriptConfig,
|
|
21
22
|
...importConfig,
|
|
22
23
|
...jsdocConfig,
|
|
24
|
+
...markdownConfig,
|
|
23
25
|
...nodeConfig,
|
|
24
26
|
...reactConfig,
|
|
25
27
|
...sonarConfig,
|
|
@@ -19,7 +19,6 @@ export const config = [
|
|
|
19
19
|
"import-x/no-anonymous-default-export": "error",
|
|
20
20
|
"import-x/no-cycle": "error",
|
|
21
21
|
"import-x/no-default-export": "error",
|
|
22
|
-
"import-x/no-deprecated": "error",
|
|
23
22
|
"import-x/no-duplicates": "error",
|
|
24
23
|
"import-x/no-empty-named-blocks": "error",
|
|
25
24
|
"import-x/no-extraneous-dependencies": "error",
|
|
@@ -14,6 +14,7 @@ export const config = [
|
|
|
14
14
|
rules: {
|
|
15
15
|
"n/callback-return": "error",
|
|
16
16
|
"n/exports-style": ["error", "module.exports"],
|
|
17
|
+
"n/hashbang": "error",
|
|
17
18
|
"n/no-exports-assign": "error",
|
|
18
19
|
"n/no-path-concat": "error",
|
|
19
20
|
"n/no-process-env": [
|
|
@@ -29,9 +30,9 @@ export const config = [
|
|
|
29
30
|
"error",
|
|
30
31
|
{ allowExperimental: true },
|
|
31
32
|
],
|
|
32
|
-
"n/prefer-global/buffer": ["error", "
|
|
33
|
+
"n/prefer-global/buffer": ["error", "always"],
|
|
33
34
|
"n/prefer-global/console": ["error", "always"],
|
|
34
|
-
"n/prefer-global/process": ["error", "
|
|
35
|
+
"n/prefer-global/process": ["error", "always"],
|
|
35
36
|
"n/prefer-global/text-decoder": ["error", "always"],
|
|
36
37
|
"n/prefer-global/text-encoder": ["error", "always"],
|
|
37
38
|
"n/prefer-global/url": ["error", "always"],
|
|
@@ -22,6 +22,7 @@ export const config = [
|
|
|
22
22
|
"react/dom/no-missing-iframe-sandbox": "error",
|
|
23
23
|
"react/dom/no-namespace": "error",
|
|
24
24
|
"react/dom/no-render": "error",
|
|
25
|
+
"react/dom/no-render-return-value": "error",
|
|
25
26
|
"react/dom/no-script-url": "error",
|
|
26
27
|
"react/dom/no-unsafe-iframe-sandbox": "error",
|
|
27
28
|
"react/dom/no-unsafe-target-blank": "error",
|
|
@@ -60,6 +61,7 @@ export const config = [
|
|
|
60
61
|
"react/no-unstable-context-value": "error",
|
|
61
62
|
"react/no-unstable-default-props": "error",
|
|
62
63
|
"react/no-use-context": "error",
|
|
64
|
+
"react/no-useless-forward-ref": "error",
|
|
63
65
|
"react/no-useless-fragment": "error",
|
|
64
66
|
"react/prefer-shorthand-boolean": "error",
|
|
65
67
|
"react/prefer-shorthand-fragment": "error",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import sortKeysCustomOrderPlugin from "eslint-plugin-sort-keys-custom-order";
|
|
2
2
|
import dependPlugin from "eslint-plugin-depend";
|
|
3
|
-
import { FlatCompat } from "@eslint/eslintrc";
|
|
4
3
|
|
|
5
4
|
import { JAVASCRIPT_LIKE_EXTENSIONS } from "../constants.js";
|
|
6
5
|
|
|
@@ -41,11 +40,4 @@ export const config = [
|
|
|
41
40
|
],
|
|
42
41
|
},
|
|
43
42
|
},
|
|
44
|
-
...new FlatCompat().extends("plugin:mdx/recommended").map((mdxConfig) => ({
|
|
45
|
-
...mdxConfig,
|
|
46
|
-
files: ["**/*.{md,mdx}"],
|
|
47
|
-
settings: {
|
|
48
|
-
"mdx/code-blocks": true,
|
|
49
|
-
},
|
|
50
|
-
})),
|
|
51
43
|
];
|
|
@@ -3,6 +3,7 @@ import unicornPlugin from "eslint-plugin-unicorn";
|
|
|
3
3
|
import { JAVASCRIPT_LIKE_EXTENSIONS } from "../constants.js";
|
|
4
4
|
|
|
5
5
|
export const config = [
|
|
6
|
+
// TODO: Add new rules https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v60.0.0
|
|
6
7
|
{
|
|
7
8
|
files: JAVASCRIPT_LIKE_EXTENSIONS,
|
|
8
9
|
plugins: {
|
|
@@ -36,6 +37,7 @@ export const config = [
|
|
|
36
37
|
"unicorn/new-for-builtins": "error",
|
|
37
38
|
"unicorn/no-abusive-eslint-disable": "error",
|
|
38
39
|
"unicorn/no-array-callback-reference": "error",
|
|
40
|
+
"unicorn/no-array-reverse": "error",
|
|
39
41
|
"unicorn/no-await-in-promise-methods": "error",
|
|
40
42
|
"unicorn/no-console-spaces": "error",
|
|
41
43
|
"unicorn/no-document-cookie": "error",
|
|
@@ -57,6 +59,7 @@ export const config = [
|
|
|
57
59
|
"unicorn/no-unreadable-array-destructuring": "error",
|
|
58
60
|
"unicorn/no-unreadable-iife": "error",
|
|
59
61
|
"unicorn/no-unused-properties": "error",
|
|
62
|
+
"unicorn/no-useless-error-capture-stack-trace": "error",
|
|
60
63
|
"unicorn/no-useless-fallback-in-spread": "error",
|
|
61
64
|
"unicorn/no-useless-length-check": "error",
|
|
62
65
|
"unicorn/no-useless-promise-resolve-reject": "error",
|
|
@@ -70,6 +73,7 @@ export const config = [
|
|
|
70
73
|
"unicorn/prefer-array-index-of": "error",
|
|
71
74
|
"unicorn/prefer-array-some": "error",
|
|
72
75
|
"unicorn/prefer-blob-reading-methods": "error",
|
|
76
|
+
"unicorn/prefer-class-fields": "error",
|
|
73
77
|
"unicorn/prefer-code-point": "error",
|
|
74
78
|
"unicorn/prefer-date-now": "error",
|
|
75
79
|
"unicorn/prefer-dom-node-append": "error",
|
|
@@ -116,10 +120,7 @@ export const config = [
|
|
|
116
120
|
"unicorn/prevent-abbreviations": [
|
|
117
121
|
"error",
|
|
118
122
|
{
|
|
119
|
-
|
|
120
|
-
props: true,
|
|
121
|
-
Props: true,
|
|
122
|
-
},
|
|
123
|
+
ignore: [/^props/i, /props$/i, /^ref/i, /ref$/i],
|
|
123
124
|
},
|
|
124
125
|
],
|
|
125
126
|
"unicorn/relative-url-style": ["error", "always"],
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { helpers, termost } from 'termost';
|
|
2
|
-
import process from 'node:process';
|
|
3
2
|
import { resolve, join } from 'node:path';
|
|
4
3
|
import { createRequire } from 'node:module';
|
|
5
4
|
import { writeFile, chmod, mkdir, symlink, rm } from 'node:fs/promises';
|
|
@@ -196,7 +195,7 @@ const ESLINT_EXTENSIONS = [
|
|
|
196
195
|
"mdx"
|
|
197
196
|
];
|
|
198
197
|
|
|
199
|
-
var version = "2.
|
|
198
|
+
var version = "2.28.1";
|
|
200
199
|
|
|
201
200
|
const createWatchCommand = (program)=>{
|
|
202
201
|
program.command({
|
|
@@ -628,7 +627,7 @@ const checkDependencyVersionRange = ({ name, dependencies, devDependencies, peer
|
|
|
628
627
|
name: dependencyName,
|
|
629
628
|
consumedBy: name
|
|
630
629
|
});
|
|
631
|
-
if (version !== "workspace:*" && !
|
|
630
|
+
if (version !== "workspace:*" && !isExcluded(version) && !/^\d/.test(version)) throw createPackageError(`As a dev dependency, \`${dependencyName}\` version must be fixed (or set as "workspace:*" for local packages) to reduce accidental breaking change risks due to an implicit semver upgrade.`, {
|
|
632
631
|
name: dependencyName,
|
|
633
632
|
consumedBy: name
|
|
634
633
|
});
|
|
@@ -639,7 +638,7 @@ const checkDependencyVersionRange = ({ name, dependencies, devDependencies, peer
|
|
|
639
638
|
name: dependencyName,
|
|
640
639
|
consumedBy: name
|
|
641
640
|
});
|
|
642
|
-
if (version !== "workspace:^" && !hasCaret(version) && !
|
|
641
|
+
if (version !== "workspace:^" && !hasCaret(version) && !isExcluded(version)) throw createPackageError(`As a dependency, \`${dependencyName}\` version must be prefixed with a caret (or set as "workspace:^" for local packages) to optimize the size (whether of installation or bundle output) on the consumer side.`, {
|
|
643
642
|
name: dependencyName,
|
|
644
643
|
consumedBy: name
|
|
645
644
|
});
|
|
@@ -650,7 +649,7 @@ const checkDependencyVersionRange = ({ name, dependencies, devDependencies, peer
|
|
|
650
649
|
name: dependencyName,
|
|
651
650
|
consumedBy: name
|
|
652
651
|
});
|
|
653
|
-
if (!hasCaret(version) && !
|
|
652
|
+
if (!hasCaret(version) && !isExcluded(version)) /*
|
|
654
653
|
* Why disallowing workspace protocol as a version resolver?
|
|
655
654
|
* To reduce the update frequency needs consumer-side and guarantee on our side the minimum compatible version,
|
|
656
655
|
* the best practice should be to keeping an explicit number version which represents the lowest compatible version from an API perspective.
|
|
@@ -699,7 +698,7 @@ function assertVersion(version, { name, consumedBy }) {
|
|
|
699
698
|
consumedBy
|
|
700
699
|
}));
|
|
701
700
|
}
|
|
702
|
-
const
|
|
701
|
+
const isExcluded = (version)=>{
|
|
703
702
|
const isPreReleaseVersion = /\d+\.\d+\.\d+-(alpha|beta|experimental|next|rc).*/.exec(version);
|
|
704
703
|
const isNpmProtocol = version.startsWith("npm:");
|
|
705
704
|
return isNpmProtocol || isPreReleaseVersion;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adbayb/stack",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.28.1",
|
|
4
4
|
"description": "My opinionated JavaScript-based toolchain",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stack",
|
|
@@ -43,36 +43,35 @@
|
|
|
43
43
|
"@changesets/cli": "^2.29.5",
|
|
44
44
|
"@commitlint/cli": "^19.8.1",
|
|
45
45
|
"@commitlint/config-conventional": "^19.8.1",
|
|
46
|
-
"@eslint-react/eslint-plugin": "^1.52.
|
|
46
|
+
"@eslint-react/eslint-plugin": "^1.52.3",
|
|
47
47
|
"@eslint/compat": "^1.3.1",
|
|
48
|
-
"@eslint
|
|
49
|
-
"@stylistic/eslint-plugin": "^5.2.0",
|
|
48
|
+
"@stylistic/eslint-plugin": "^5.2.2",
|
|
50
49
|
"@vitest/eslint-plugin": "^1.3.3",
|
|
51
|
-
"eslint": "^9.
|
|
52
|
-
"eslint-config-prettier": "^10.1.
|
|
50
|
+
"eslint": "^9.32.0",
|
|
51
|
+
"eslint-config-prettier": "^10.1.8",
|
|
53
52
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
54
53
|
"eslint-plugin-depend": "^1.2.0",
|
|
55
54
|
"eslint-plugin-import-x": "^4.16.1",
|
|
56
55
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
57
|
-
"eslint-plugin-jsdoc": "^51.
|
|
58
|
-
"eslint-plugin-mdx": "^3.
|
|
59
|
-
"eslint-plugin-n": "^17.
|
|
60
|
-
"eslint-plugin-prettier": "^5.5.
|
|
56
|
+
"eslint-plugin-jsdoc": "^51.4.1",
|
|
57
|
+
"eslint-plugin-mdx": "^3.6.2",
|
|
58
|
+
"eslint-plugin-n": "^17.21.0",
|
|
59
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
61
60
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
62
61
|
"eslint-plugin-sonarjs": "^3.0.4",
|
|
63
62
|
"eslint-plugin-sort-keys-custom-order": "^2.2.1",
|
|
64
|
-
"eslint-plugin-unicorn": "^
|
|
63
|
+
"eslint-plugin-unicorn": "^60.0.0",
|
|
65
64
|
"fdir": "^6.4.6",
|
|
66
|
-
"globals": "^16.
|
|
65
|
+
"globals": "^16.3.0",
|
|
67
66
|
"prettier": "^3.6.2",
|
|
68
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
69
|
-
"termost": "^1.
|
|
70
|
-
"turbo": "^2.5.
|
|
67
|
+
"prettier-plugin-packagejson": "^2.5.19",
|
|
68
|
+
"termost": "^1.8.0",
|
|
69
|
+
"turbo": "^2.5.5",
|
|
71
70
|
"typescript": "^5.8.3",
|
|
72
|
-
"typescript-eslint": "^8.
|
|
71
|
+
"typescript-eslint": "^8.38.0"
|
|
73
72
|
},
|
|
74
73
|
"devDependencies": {
|
|
75
|
-
"@types/node": "22.16.
|
|
74
|
+
"@types/node": "22.16.5",
|
|
76
75
|
"quickbundle": "2.13.0"
|
|
77
76
|
},
|
|
78
77
|
"publishConfig": {
|