pob 38.6.0 → 38.7.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.
|
@@ -163,6 +163,7 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
163
163
|
: babelEnvs.length > 0;
|
|
164
164
|
const useTypescript = this.options.typescript;
|
|
165
165
|
const hasReact = useTypescript && packageUtils.hasReact(pkg);
|
|
166
|
+
const useAppConfig = hasReact && this.options.isApp;
|
|
166
167
|
const useNode = !useBabel || babelEnvs.some((env) => env.target === "node");
|
|
167
168
|
const useNodeOnly =
|
|
168
169
|
(!useBabel && !useTypescript) ||
|
|
@@ -414,7 +415,7 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
414
415
|
|
|
415
416
|
return [
|
|
416
417
|
useNode ? "...pobConfig.configs.node" : "...pobConfig.configs.base",
|
|
417
|
-
|
|
418
|
+
useAppConfig && "...pobConfig.configs.app",
|
|
418
419
|
pkg.dependencies?.["react-native-web"] &&
|
|
419
420
|
'...pobTypescriptConfigReact.configs["react-native-web"]',
|
|
420
421
|
];
|
|
@@ -532,14 +533,37 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
532
533
|
// ignorePatterns are fully owned by the generator: merging with existing
|
|
533
534
|
// ones would never remove stale patterns
|
|
534
535
|
const oxlintConfig = this.fs.readJSON(oxlintConfigPath, {});
|
|
536
|
+
const oxlintExtends = oxlintConfig.extends || [];
|
|
537
|
+
const pobOxlintConfigPath = (name) =>
|
|
538
|
+
`./node_modules/@pob/eslint-config/oxlint/${name}.json`;
|
|
535
539
|
await writeAndFormatJson(this.fs, oxlintConfigPath, {
|
|
536
540
|
...oxlintConfig,
|
|
537
541
|
extends: [
|
|
538
|
-
"
|
|
539
|
-
|
|
542
|
+
pobOxlintConfigPath("base"),
|
|
543
|
+
// type-aware rules: oxlint fails without tsgolint, even in a
|
|
544
|
+
// project without TypeScript files
|
|
545
|
+
useTypescript && pobOxlintConfigPath("typescript"),
|
|
546
|
+
// overrides of typescript.json, like the matching eslint configs
|
|
547
|
+
// (configs.app, configs.allowUnsafe, ...). Only app is known here:
|
|
548
|
+
// the others are kept when added by hand.
|
|
549
|
+
...(useTypescript
|
|
550
|
+
? [
|
|
551
|
+
"app",
|
|
552
|
+
"allow-implicit-return-type",
|
|
553
|
+
"allow-unsafe",
|
|
554
|
+
"allow-unsafe-as-warn",
|
|
555
|
+
]
|
|
556
|
+
.filter(
|
|
557
|
+
(name) =>
|
|
558
|
+
(name === "app" && useAppConfig) ||
|
|
559
|
+
oxlintExtends.includes(pobOxlintConfigPath(name)),
|
|
560
|
+
)
|
|
561
|
+
.map(pobOxlintConfigPath)
|
|
562
|
+
: []),
|
|
563
|
+
...oxlintExtends.filter(
|
|
540
564
|
(value) => !value.includes("@pob/eslint-config/"),
|
|
541
565
|
),
|
|
542
|
-
],
|
|
566
|
+
].filter(Boolean),
|
|
543
567
|
ignorePatterns: [
|
|
544
568
|
...new Set([...oxlintBaseIgnorePatterns, ...ignorePatterns]),
|
|
545
569
|
],
|
|
@@ -558,8 +582,8 @@ export default class CommonFormatLintGenerator extends Generator {
|
|
|
558
582
|
? `${packageManagerExecWithCwd(this.options.packageManager, "../..", "eslint")} ${args} ${quoteArg(path.relative("../..", "."))}`
|
|
559
583
|
: `eslint ${args} .`,
|
|
560
584
|
"lint:oxlint": globalEslint
|
|
561
|
-
? `${packageManagerExecWithCwd(this.options.packageManager, "../..", "oxlint")} ${quoteArg(path.relative("../..", "."))}`
|
|
562
|
-
:
|
|
585
|
+
? `${packageManagerExecWithCwd(this.options.packageManager, "../..", "oxlint")} ${args} ${quoteArg(path.relative("../..", "."))}`
|
|
586
|
+
: `oxlint ${args}`,
|
|
563
587
|
lint: `${packageManagerRun(this.options.packageManager, "lint:oxlint")} && ${
|
|
564
588
|
useTypescript && !composite ? "tsc && " : ""
|
|
565
589
|
}${packageManagerRun(this.options.packageManager, "lint:eslint")}`,
|
|
@@ -99,7 +99,8 @@ export default class MonorepoWorkspacesGenerator extends Generator {
|
|
|
99
99
|
lint: `${packageManager} run format && ${packageManager} run lint:oxlint && ${packageManager} run lint:eslint`,
|
|
100
100
|
format: "oxfmt",
|
|
101
101
|
"format:check": "oxfmt --check .",
|
|
102
|
-
"lint:oxlint":
|
|
102
|
+
"lint:oxlint":
|
|
103
|
+
monorepoConfig && monorepoConfig.eslint && "oxlint --quiet",
|
|
103
104
|
"lint:eslint":
|
|
104
105
|
monorepoConfig &&
|
|
105
106
|
monorepoConfig.eslint &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pob",
|
|
3
|
-
"version": "38.
|
|
3
|
+
"version": "38.7.0",
|
|
4
4
|
"description": "Pile of bones, library generator with git/babel/typescript/typedoc/readme/vitest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skeleton"
|
|
@@ -48,17 +48,17 @@
|
|
|
48
48
|
"validate-npm-package-name": "^8.0.0",
|
|
49
49
|
"yeoman-environment": "6.1.0",
|
|
50
50
|
"yeoman-generator": "8.2.2",
|
|
51
|
-
"@pob/eslint-config": "67.
|
|
52
|
-
"@pob/
|
|
53
|
-
"@pob/
|
|
54
|
-
"
|
|
55
|
-
"pob-
|
|
51
|
+
"@pob/eslint-config": "67.6.0",
|
|
52
|
+
"@pob/eslint-config-typescript-react": "67.6.0",
|
|
53
|
+
"@pob/sort-pkg": "13.2.0",
|
|
54
|
+
"pob-dependencies": "27.6.0",
|
|
55
|
+
"@pob/sort-object": "11.2.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/node": "24.13.3",
|
|
59
59
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
60
60
|
"@yeoman/types": "1.11.1",
|
|
61
|
-
"@pob/root": "27.
|
|
61
|
+
"@pob/root": "27.7.0"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
|
64
64
|
"node": ">=22.18.0"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"build:definitions": "tsc -p tsconfig.json",
|
|
72
72
|
"lint": "pnpm run lint:oxlint && pnpm run lint:eslint",
|
|
73
73
|
"lint:eslint": "pnpm --dir '../..' exec eslint --quiet 'packages/pob'",
|
|
74
|
-
"lint:oxlint": "pnpm --dir '../..' exec oxlint 'packages/pob'",
|
|
74
|
+
"lint:oxlint": "pnpm --dir '../..' exec oxlint --quiet 'packages/pob'",
|
|
75
75
|
"tsc": "tsc"
|
|
76
76
|
},
|
|
77
77
|
"bin": {
|