miaoda-expo-devkit 0.1.1-beta.34 → 0.1.1-beta.35
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/dist/cli/lint.js +24 -12
- package/oxlint-config.json +15 -0
- package/package.json +1 -1
package/dist/cli/lint.js
CHANGED
|
@@ -9,15 +9,27 @@ var oxlintConfig = (0, import_node_path.join)(devkitRoot, "oxlint-config.json");
|
|
|
9
9
|
var biomeConfig = (0, import_node_path.join)(devkitRoot, "biome-config.json");
|
|
10
10
|
var targets = process.argv.slice(2);
|
|
11
11
|
var lintTargets = targets.length > 0 ? targets : ["."];
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
stdio: "inherit"
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
var results = [];
|
|
13
|
+
function run(name, cmd, args) {
|
|
14
|
+
const r = (0, import_node_child_process.spawnSync)(cmd, args, { stdio: "inherit" });
|
|
15
|
+
results.push({ name, ok: (r.status ?? 1) === 0 });
|
|
16
|
+
}
|
|
17
|
+
run("oxlint", "oxlint", ["--config", oxlintConfig, ...lintTargets]);
|
|
18
|
+
run("biome", "biome", ["lint", "--config-path", biomeConfig, ...lintTargets]);
|
|
19
|
+
run("tsc", "tsc", ["--noEmit"]);
|
|
20
|
+
var failed = results.filter((r) => !r.ok);
|
|
21
|
+
if (failed.length > 0) {
|
|
22
|
+
const names = failed.map((r) => r.name).join(", ");
|
|
23
|
+
console.error(`
|
|
24
|
+
${"\u2500".repeat(60)}`);
|
|
25
|
+
console.error(`RESULT: FAILED \u2014 Found errors in: ${names}`);
|
|
26
|
+
console.error(`Fix all errors above, then re-run 'npm run lint'.`);
|
|
27
|
+
console.error("\u2500".repeat(60));
|
|
28
|
+
process.exit(1);
|
|
29
|
+
} else {
|
|
30
|
+
console.log(`
|
|
31
|
+
${"\u2500".repeat(60)}`);
|
|
32
|
+
console.log("RESULT: PASSED \u2014 All checks passed.");
|
|
33
|
+
console.log("\u2500".repeat(60));
|
|
34
|
+
process.exit(0);
|
|
35
|
+
}
|
package/oxlint-config.json
CHANGED
|
@@ -40,6 +40,21 @@
|
|
|
40
40
|
"react/jsx-no-undef": "error"
|
|
41
41
|
},
|
|
42
42
|
|
|
43
|
+
"ignorePatterns": [
|
|
44
|
+
"metro.config.js",
|
|
45
|
+
"babel.config.js",
|
|
46
|
+
"output/**"
|
|
47
|
+
],
|
|
48
|
+
|
|
49
|
+
"overrides": [
|
|
50
|
+
{
|
|
51
|
+
"files": ["tailwind.config.js", "**/tailwind.config.js"],
|
|
52
|
+
"env": {
|
|
53
|
+
"node": true
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
|
|
43
58
|
"env": {
|
|
44
59
|
"browser": true
|
|
45
60
|
},
|