@vp-tw/eslint-config 0.0.25 → 0.0.26
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/README.md +40 -0
- package/dist/eslint-typegen.d.ts +1 -1
- package/dist/esm/eslint-typegen.d.ts +1 -1
- package/dist/esm/utils/extendsConfig.mjs +3 -1
- package/dist/esm/utils/mergeConfig.mjs +1 -1
- package/dist/utils/extendsConfig.js +3 -1
- package/dist/utils/mergeConfig.js +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -56,6 +56,46 @@ pnpm -w v:major
|
|
|
56
56
|
pnpm -r publish
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
+
## Known Issues
|
|
60
|
+
|
|
61
|
+
### `eslint-plugin-unicorn@^57.0.0`
|
|
62
|
+
|
|
63
|
+
Getting the following error when call `typegen`:
|
|
64
|
+
|
|
65
|
+
<!-- cSpell:disable -->
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
/eslint-config/node_modules/.pnpm/eslint-plugin-unicorn@57.0.0_eslint@9.21.0_jiti@2.4.2_/node_modules/eslint-plugin-unicorn/rules…
|
|
69
|
+
│ atisIdentifierName,
|
|
70
|
+
│ at^
|
|
71
|
+
│ TypeError: Cannot destructure property 'isIdentifierName' of 'import_helper_validator_identifier.default' as it is undefined.
|
|
72
|
+
│ at resolveVariableName (/eslint-config/node_modules/.pnpm/eslint-plugin-unicorn@57.0.0_eslint@9.21.0_jiti@2.4.2_/node_modules…
|
|
73
|
+
│ at Object.<anonymous> (/eslint-config/node_modules/.pnpm/eslint-plugin-unicorn@57.0.0_eslint@9.21.0_jiti@2.4.2_/node_modules/…
|
|
74
|
+
│ at Module._compile (node:internal/modules/cjs/loader:1739:14)
|
|
75
|
+
│ at Object.transformer (/eslint-config/node_modules/.pnpm/tsx@4.19.3/node_modules/tsx/dist/register-DCnOAxY2.cjs:2:1186)
|
|
76
|
+
│ at Module.load (node:internal/modules/cjs/loader:1473:32)
|
|
77
|
+
│ at Function._load (node:internal/modules/cjs/loader:1285:12)
|
|
78
|
+
│ at TracingChannel.traceSync (node:diagnostics_channel:322:14)
|
|
79
|
+
│ at wrapModuleLoad (node:internal/modules/cjs/loader:234:24)
|
|
80
|
+
│ at Module.require (node:internal/modules/cjs/loader:1495:12)
|
|
81
|
+
│ at require (node:internal/modules/helpers:135:16)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
<!-- cSpell:enable -->
|
|
85
|
+
|
|
86
|
+
Workaround: downgrade `eslint-plugin-unicorn` to `^56.0.1`.
|
|
87
|
+
|
|
88
|
+
```jsonc
|
|
89
|
+
// package.json
|
|
90
|
+
{
|
|
91
|
+
"pnpm": {
|
|
92
|
+
"overrides": {
|
|
93
|
+
"eslint-plugin-unicorn": "^56.0.1",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
59
99
|
## License
|
|
60
100
|
|
|
61
101
|
MIT © ViPro <vdustr@gmail.com> (<http://vdustr.dev>)
|
package/dist/eslint-typegen.d.ts
CHANGED
|
@@ -99,5 +99,5 @@ type StorybookNoUninstalledAddons = []|[{
|
|
|
99
99
|
[k: string]: unknown | undefined
|
|
100
100
|
}]
|
|
101
101
|
// Names of all the configs
|
|
102
|
-
export type ConfigNames = 'vdustr/mdx/setup' | 'vdustr/mdx/processor' | 'vdustr/mdx/rules' | 'vdustr/mdx/code-blocks' | 'vdustr/prettier/rules' | 'vdustr/react/react-compiler/setup' | 'vdustr/react/react-compiler/rules' | 'vdustr/stroybook/setup' | 'vdustr/storybook/stories/rules' | 'vdustr/storybook/main/rules' | 'vdustr/
|
|
102
|
+
export type ConfigNames = 'vdustr/mdx/setup' | 'vdustr/mdx/processor' | 'vdustr/mdx/rules' | 'vdustr/mdx/code-blocks' | 'vdustr/prettier/rules' | 'vdustr/react/react-compiler/setup' | 'vdustr/react/react-compiler/rules' | 'vdustr/stroybook/setup' | 'vdustr/storybook/stories/rules' | 'vdustr/storybook/main/rules' | 'vdustr/imports/rules' | 'vdustr/imports/no-default-export/rules' | 'vdustr/javascript/rules' | 'vdustr/jsonc/rules' | 'vdustr/sort/json-keys' | 'vdustr/sort/json-array-values' | 'vdustr/react/rules' | 'vdustr/react/react-compiler/setup' | 'vdustr/react/react-compiler/rules' | 'vdustr/typescript/rules' | 'vdustr/yaml/rules' | 'vdustr/yaml/sort-keys/rules'
|
|
103
103
|
|
|
@@ -99,5 +99,5 @@ type StorybookNoUninstalledAddons = []|[{
|
|
|
99
99
|
[k: string]: unknown | undefined
|
|
100
100
|
}]
|
|
101
101
|
// Names of all the configs
|
|
102
|
-
export type ConfigNames = 'vdustr/mdx/setup' | 'vdustr/mdx/processor' | 'vdustr/mdx/rules' | 'vdustr/mdx/code-blocks' | 'vdustr/prettier/rules' | 'vdustr/react/react-compiler/setup' | 'vdustr/react/react-compiler/rules' | 'vdustr/stroybook/setup' | 'vdustr/storybook/stories/rules' | 'vdustr/storybook/main/rules' | 'vdustr/
|
|
102
|
+
export type ConfigNames = 'vdustr/mdx/setup' | 'vdustr/mdx/processor' | 'vdustr/mdx/rules' | 'vdustr/mdx/code-blocks' | 'vdustr/prettier/rules' | 'vdustr/react/react-compiler/setup' | 'vdustr/react/react-compiler/rules' | 'vdustr/stroybook/setup' | 'vdustr/storybook/stories/rules' | 'vdustr/storybook/main/rules' | 'vdustr/imports/rules' | 'vdustr/imports/no-default-export/rules' | 'vdustr/javascript/rules' | 'vdustr/jsonc/rules' | 'vdustr/sort/json-keys' | 'vdustr/sort/json-array-values' | 'vdustr/react/rules' | 'vdustr/react/react-compiler/setup' | 'vdustr/react/react-compiler/rules' | 'vdustr/typescript/rules' | 'vdustr/yaml/rules' | 'vdustr/yaml/sort-keys/rules'
|
|
103
103
|
|
|
@@ -41,7 +41,9 @@ function extendsConfigInternal(composer, sourceOrIndex, config) {
|
|
|
41
41
|
const awaited = typeof config === "function" ? await config(source) : await config;
|
|
42
42
|
return Array.isArray(awaited) ? awaited : [awaited];
|
|
43
43
|
})();
|
|
44
|
-
|
|
44
|
+
const updatedItems = [...items];
|
|
45
|
+
updatedItems.splice(index, 1, ...newConfigs);
|
|
46
|
+
return updatedItems;
|
|
45
47
|
}
|
|
46
48
|
]);
|
|
47
49
|
}
|
|
@@ -2,7 +2,7 @@ import { omit } from "es-toolkit";
|
|
|
2
2
|
const objectMergeKeys = ["rules", "plugins"];
|
|
3
3
|
const mutableMergeKeys = ["files", "ignores"];
|
|
4
4
|
function mergeConfig(source, ...[def, ...defs]) {
|
|
5
|
-
const reversedDefs = [def, ...defs].
|
|
5
|
+
const reversedDefs = [def, ...defs].reverse();
|
|
6
6
|
const mergedDef = {
|
|
7
7
|
...Object.fromEntries(reversedDefs.flatMap((def2) => Object.entries(def2))),
|
|
8
8
|
...Object.fromEntries(
|
|
@@ -39,7 +39,9 @@ function extendsConfigInternal(composer, sourceOrIndex, config) {
|
|
|
39
39
|
const awaited = typeof config === "function" ? await config(source) : await config;
|
|
40
40
|
return Array.isArray(awaited) ? awaited : [awaited];
|
|
41
41
|
})();
|
|
42
|
-
|
|
42
|
+
const updatedItems = [...items];
|
|
43
|
+
updatedItems.splice(index, 1, ...newConfigs);
|
|
44
|
+
return updatedItems;
|
|
43
45
|
}]);
|
|
44
46
|
}
|
|
45
47
|
const extendsConfig = exports.extendsConfig = Object.assign(extendsConfigInternal, {
|
|
@@ -8,7 +8,7 @@ var _esToolkit = require("es-toolkit");
|
|
|
8
8
|
const objectMergeKeys = ["rules", "plugins"];
|
|
9
9
|
const mutableMergeKeys = ["files", "ignores"];
|
|
10
10
|
function mergeConfig(source, ...[def, ...defs]) {
|
|
11
|
-
const reversedDefs = [def, ...defs].
|
|
11
|
+
const reversedDefs = [def, ...defs].reverse();
|
|
12
12
|
const mergedDef = {
|
|
13
13
|
...Object.fromEntries(reversedDefs.flatMap(def2 => Object.entries(def2))),
|
|
14
14
|
...Object.fromEntries(objectMergeKeys.flatMap(key => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vp-tw/eslint-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "ViPro's ESLint configuration",
|
|
5
5
|
"homepage": "https://github.com/vdustr/eslint-config",
|
|
6
6
|
"author": {
|
|
@@ -40,23 +40,23 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@mui/types": "^7.2.21",
|
|
43
|
-
"es-toolkit": "^1.
|
|
44
|
-
"eslint-flat-config-utils": "^2.0.
|
|
45
|
-
"local-pkg": "^1.
|
|
43
|
+
"es-toolkit": "^1.32.0",
|
|
44
|
+
"eslint-flat-config-utils": "^2.0.1",
|
|
45
|
+
"local-pkg": "^1.1.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"eslint-typegen": "^
|
|
48
|
+
"eslint-typegen": "^2.0.0",
|
|
49
49
|
"unbuild": "^3.3.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@antfu/eslint-config": "^4.
|
|
52
|
+
"@antfu/eslint-config": "^4.3.0",
|
|
53
53
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
54
|
-
"eslint": "^9.
|
|
55
|
-
"eslint-config-prettier": "^10.0.
|
|
54
|
+
"eslint": "^9.21.0",
|
|
55
|
+
"eslint-config-prettier": "^10.0.2",
|
|
56
56
|
"eslint-plugin-mdx": "^3.1.5",
|
|
57
|
-
"eslint-plugin-package-json": "^0.
|
|
58
|
-
"eslint-plugin-react-compiler": "^19.0.0-beta-
|
|
59
|
-
"eslint-plugin-storybook": "^0.11.
|
|
57
|
+
"eslint-plugin-package-json": "^0.26.0",
|
|
58
|
+
"eslint-plugin-react-compiler": "^19.0.0-beta-e1e972c-20250221",
|
|
59
|
+
"eslint-plugin-storybook": "^0.11.3"
|
|
60
60
|
},
|
|
61
61
|
"peerDependenciesMeta": {
|
|
62
62
|
"@types/eslint-config-prettier": {
|