@oxlint/migrate 0.0.2 → 0.0.3
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.
|
@@ -4,12 +4,16 @@ import { getAutodetectedEslintConfigName } from "./autoDetectConfigFile.mjs";
|
|
|
4
4
|
import { existsSync, renameSync, writeFileSync } from "fs";
|
|
5
5
|
import main from "../src/index.mjs";
|
|
6
6
|
import path from "path";
|
|
7
|
-
|
|
7
|
+
import packageJson from "../package.json.mjs";
|
|
8
|
+
program.name("oxlint-migrate").version(packageJson.version).argument("<eslint-config>", "The path to the eslint v9 config file", "");
|
|
8
9
|
program.parse();
|
|
9
10
|
let [filePath] = program.args;
|
|
10
11
|
let cwd = process.cwd();
|
|
11
12
|
if (filePath === "") {
|
|
12
13
|
filePath = getAutodetectedEslintConfigName(cwd) ?? "";
|
|
14
|
+
if (filePath === "") {
|
|
15
|
+
program.error(`could not autodetect eslint config file`);
|
|
16
|
+
}
|
|
13
17
|
} else {
|
|
14
18
|
filePath = path.join(cwd, filePath);
|
|
15
19
|
}
|