@pob/root 27.6.0 → 27.8.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.
package/bin/oxlint.js
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { createRequire } from "node:module";
|
|
3
4
|
import pkg from "oxlint/package.json" with { type: "json" };
|
|
4
5
|
|
|
6
|
+
// oxlint looks for tsgolint (type-aware rules) in the project's
|
|
7
|
+
// node_modules/.bin, which does not contain the bins of @pob/root dependencies
|
|
8
|
+
if (!process.env.OXLINT_TSGOLINT_PATH) {
|
|
9
|
+
const require = createRequire(
|
|
10
|
+
import.meta.resolve("oxlint-tsgolint/package.json"),
|
|
11
|
+
);
|
|
12
|
+
try {
|
|
13
|
+
process.env.OXLINT_TSGOLINT_PATH = require.resolve(
|
|
14
|
+
`@oxlint-tsgolint/${process.platform}-${process.arch}/tsgolint${process.platform === "win32" ? ".exe" : ""}`,
|
|
15
|
+
);
|
|
16
|
+
} catch {
|
|
17
|
+
// unsupported platform: oxlint reports the missing tsgolint when needed
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
5
21
|
await import(
|
|
6
22
|
new URL(
|
|
7
23
|
typeof pkg.bin === "string" ? pkg.bin : pkg.bin.oxlint,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import lintStaged from "lint-staged";
|
|
4
4
|
|
|
5
|
+
// oxlint-disable-next-line unicorn/prefer-top-level-await
|
|
5
6
|
lintStaged({
|
|
6
7
|
concurrent: true,
|
|
7
8
|
relative: true,
|
|
@@ -9,7 +10,6 @@ lintStaged({
|
|
|
9
10
|
.then((passed) => {
|
|
10
11
|
process.exitCode = passed ? 0 : 1;
|
|
11
12
|
})
|
|
12
|
-
// eslint-disable-next-line unicorn/prefer-top-level-await
|
|
13
13
|
.catch((error) => {
|
|
14
14
|
console.error(error);
|
|
15
15
|
process.exitCode = 1;
|
|
@@ -57,7 +57,7 @@ export default async function installVscodeTasks({ pkg }) {
|
|
|
57
57
|
type: "shell",
|
|
58
58
|
command: "git main",
|
|
59
59
|
group: { kind: "none" },
|
|
60
|
-
//
|
|
60
|
+
// oxlint-disable-next-line no-template-curly-in-string
|
|
61
61
|
options: { cwd: "${workspaceFolder}" },
|
|
62
62
|
presentation: { close: true, panel: "dedicated" },
|
|
63
63
|
problemMatcher: [],
|
|
@@ -67,7 +67,7 @@ const OXFMT = "oxfmt --no-error-on-unmatched-pattern";
|
|
|
67
67
|
// Above this many files, commands run on the whole project instead.
|
|
68
68
|
const MAX_FILENAMES = 100;
|
|
69
69
|
const ESLINT_FIX = "eslint --fix --quiet";
|
|
70
|
-
const OXLINT_FIX = "oxlint --fix --no-error-on-unmatched-pattern";
|
|
70
|
+
const OXLINT_FIX = "oxlint --fix --quiet --no-error-on-unmatched-pattern";
|
|
71
71
|
|
|
72
72
|
// projects not yet migrated by pob have no oxlint config
|
|
73
73
|
const hasOxlint = fs.existsSync(path.resolve(".oxlintrc.json"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/root",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.8.0",
|
|
4
4
|
"description": "root package",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/christophehurpeau/pob",
|
|
@@ -72,10 +72,11 @@
|
|
|
72
72
|
"lint-staged": "17.4.1",
|
|
73
73
|
"oxfmt": "0.54.0",
|
|
74
74
|
"oxlint": "1.85.0",
|
|
75
|
+
"oxlint-tsgolint": "7.0.2002",
|
|
75
76
|
"picomatch": "^4.0.7",
|
|
76
77
|
"semver": "^7.7.3",
|
|
77
|
-
"
|
|
78
|
-
"pob
|
|
78
|
+
"pob-dependencies": "27.7.0",
|
|
79
|
+
"@pob/version": "6.3.0"
|
|
79
80
|
},
|
|
80
81
|
"engines": {
|
|
81
82
|
"node": ">=22.18.0"
|
|
@@ -84,6 +85,6 @@
|
|
|
84
85
|
"scripts": {
|
|
85
86
|
"lint": "pnpm run lint:oxlint && pnpm run lint:eslint",
|
|
86
87
|
"lint:eslint": "pnpm --dir '../..' exec eslint --quiet '@pob/root'",
|
|
87
|
-
"lint:oxlint": "pnpm --dir '../..' exec oxlint '@pob/root'"
|
|
88
|
+
"lint:oxlint": "pnpm --dir '../..' exec oxlint --quiet '@pob/root'"
|
|
88
89
|
}
|
|
89
90
|
}
|