@nekoyasuii/config 0.1.7 → 0.1.8
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.
|
@@ -1,37 +1,27 @@
|
|
|
1
1
|
// tools/oxlint/config/js-plugins/index.ts
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
|
-
import
|
|
3
|
+
import path from "node:path";
|
|
4
4
|
import { defineConfig } from "oxlint";
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
new URL("tools/oxlint/config/vendors/anti-slop.js", import.meta.url)
|
|
13
|
-
];
|
|
14
|
-
var antiSlopPluginSpecifier = fileURLToPath(antiSlopPluginCandidates.find((candidate) => existsSync(candidate)) ?? antiSlopPluginCandidates[0]);
|
|
15
|
-
var noCommentSlopPluginCandidates = [
|
|
16
|
-
new URL("../config/vendors/no-comment-slop.js", import.meta.url),
|
|
17
|
-
new URL("tools/oxlint/config/vendors/no-comment-slop.js", import.meta.url)
|
|
18
|
-
];
|
|
19
|
-
var noCommentSlopPluginSpecifier = fileURLToPath(noCommentSlopPluginCandidates.find((candidate) => existsSync(candidate)) ?? noCommentSlopPluginCandidates[0]);
|
|
20
|
-
var shadcnLintPluginCandidates = [
|
|
21
|
-
new URL("../config/vendors/shadcn.js", import.meta.url),
|
|
22
|
-
new URL("tools/oxlint/config/vendors/shadcn.js", import.meta.url)
|
|
23
|
-
];
|
|
24
|
-
var shadcnLintPluginSpecifier = fileURLToPath(shadcnLintPluginCandidates.find((candidate) => existsSync(candidate)) ?? shadcnLintPluginCandidates[0]);
|
|
5
|
+
var packageRoot = (() => {
|
|
6
|
+
let dir = import.meta.dirname;
|
|
7
|
+
while (!existsSync(path.join(dir, "tools", "oxlint")) && dir !== path.dirname(dir))
|
|
8
|
+
dir = path.dirname(dir);
|
|
9
|
+
return dir;
|
|
10
|
+
})();
|
|
11
|
+
var localPlugin = (relative) => path.join(packageRoot, relative);
|
|
25
12
|
var reactDoctorRules = await import("oxlint-plugin-react-doctor").then(({ ALL_REACT_DOCTOR_RULES }) => ALL_REACT_DOCTOR_RULES).catch(() => null);
|
|
26
13
|
var jsPluginEntries = [
|
|
27
14
|
{ name: "github", specifier: "eslint-plugin-github" },
|
|
28
15
|
{ name: "sonarjs", specifier: "eslint-plugin-sonarjs" },
|
|
29
16
|
{ name: "react-doctor", specifier: "oxlint-plugin-react-doctor" },
|
|
30
17
|
{ name: "tailwindcss", specifier: "oxlint-tailwindcss" },
|
|
31
|
-
{ name: "anti-slop", specifier:
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
{ name: "anti-slop", specifier: localPlugin("tools/oxlint/config/vendors/anti-slop.js") },
|
|
19
|
+
{
|
|
20
|
+
name: "no-comment-slop",
|
|
21
|
+
specifier: localPlugin("tools/oxlint/config/vendors/no-comment-slop.js")
|
|
22
|
+
},
|
|
23
|
+
{ name: "shadcn", specifier: localPlugin("tools/oxlint/config/vendors/shadcn.js") },
|
|
24
|
+
{ name: "lazuee", specifier: localPlugin("tools/oxlint/rules/index.js") }
|
|
35
25
|
];
|
|
36
26
|
var jsPluginSettings2 = {
|
|
37
27
|
"react-doctor": {
|