@next-vibe/checker 1.0.12 → 1.0.13
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/bin/vibe-runtime.js +25 -12
- package/.dist/bin/vibe-runtime.js.map +5 -5
- package/.dist/oxlint-plugins/i18n.js +4 -0
- package/.dist/oxlint-plugins/i18n.js.map +1 -0
- package/.dist/oxlint-plugins/jsx-capitalization.js +4 -0
- package/.dist/oxlint-plugins/jsx-capitalization.js.map +1 -0
- package/.dist/oxlint-plugins/restricted-syntax.js +4 -0
- package/.dist/oxlint-plugins/restricted-syntax.js.map +1 -0
- package/check.config.ts +3 -11
- package/package.json +1 -1
- package/src/app/api/[locale]/system/builder/enum.ts +1 -0
- package/src/app/api/[locale]/system/check/config/repository.ts +79 -12
- package/src/app/api/[locale]/system/check/oxlint/repository.ts +1 -1
- package/src/app/api/[locale]/system/check/test-project/bun.lock +158 -75
- package/src/app/api/[locale]/system/check/test-project/check.config.ts +3 -11
- package/src/app/api/[locale]/system/check/test-project/package.json +4 -12
- package/src/app/api/[locale]/system/check/test-project/tsconfig.json +1 -5
- package/src/app/api/[locale]/system/check/test-project/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-capitalization.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restricted-syntax.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/check.config.ts
CHANGED
|
@@ -123,20 +123,12 @@ const oxlint: CheckConfig["oxlint"] = {
|
|
|
123
123
|
],
|
|
124
124
|
jsPlugins: [
|
|
125
125
|
...(features.restrictedSyntax
|
|
126
|
-
? [
|
|
127
|
-
"@next-vibe/checker/src/app/api/[locale]/system/check/oxlint/plugins/restricted-syntax/src/index.ts",
|
|
128
|
-
]
|
|
126
|
+
? ["@next-vibe/checker/oxlint-plugins/restricted-syntax.ts"]
|
|
129
127
|
: []),
|
|
130
128
|
...(features.jsxCapitalization
|
|
131
|
-
? [
|
|
132
|
-
"@next-vibe/checker/src/app/api/[locale]/system/check/oxlint/plugins/jsx-capitalization/src/index.ts",
|
|
133
|
-
]
|
|
134
|
-
: []),
|
|
135
|
-
...(features.i18n
|
|
136
|
-
? [
|
|
137
|
-
"@next-vibe/checker/src/app/api/[locale]/system/check/oxlint/plugins/i18n/src/index.ts",
|
|
138
|
-
]
|
|
129
|
+
? ["@next-vibe/checker/oxlint-plugins/jsx-capitalization.ts"]
|
|
139
130
|
: []),
|
|
131
|
+
...(features.i18n ? ["@next-vibe/checker/oxlint-plugins/i18n.ts"] : []),
|
|
140
132
|
],
|
|
141
133
|
categories: {
|
|
142
134
|
correctness: "error",
|
package/package.json
CHANGED
|
@@ -82,19 +82,79 @@ export class ConfigRepositoryImpl implements ConfigRepositoryInterface {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
private static resolveJsPluginPath(pluginPath: string): string {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if (
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
// Pattern: @next-vibe/checker/oxlint-plugins/restricted-syntax.ts or .js
|
|
86
|
+
if (pluginPath.startsWith("@next-vibe/checker/oxlint-plugins/")) {
|
|
87
|
+
const fileName = pluginPath.slice("@next-vibe/checker/oxlint-plugins/".length);
|
|
88
|
+
const baseName = fileName.replace(/\.(ts|js)$/, "");
|
|
89
|
+
const extension = fileName.endsWith(".ts") ? "ts" : "js";
|
|
90
|
+
|
|
91
|
+
if (extension === "ts") {
|
|
92
|
+
// Local development: .ts -> source files
|
|
93
|
+
const sourcePath = resolve(
|
|
94
|
+
process.cwd(),
|
|
95
|
+
"src",
|
|
96
|
+
"app",
|
|
97
|
+
"api",
|
|
98
|
+
"[locale]",
|
|
99
|
+
"system",
|
|
100
|
+
"check",
|
|
101
|
+
"oxlint",
|
|
102
|
+
"plugins",
|
|
103
|
+
baseName,
|
|
104
|
+
"src",
|
|
105
|
+
"index.ts",
|
|
106
|
+
);
|
|
107
|
+
if (existsSync(sourcePath)) {
|
|
108
|
+
return sourcePath;
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
// Installed package: .js -> compiled files
|
|
112
|
+
const compiledPath = resolve(
|
|
113
|
+
process.cwd(),
|
|
114
|
+
"node_modules",
|
|
115
|
+
"@next-vibe",
|
|
116
|
+
"checker",
|
|
117
|
+
"oxlint-plugins",
|
|
118
|
+
fileName,
|
|
119
|
+
);
|
|
120
|
+
if (existsSync(compiledPath)) {
|
|
121
|
+
return compiledPath;
|
|
122
|
+
}
|
|
94
123
|
}
|
|
95
|
-
}
|
|
96
124
|
|
|
97
|
-
|
|
125
|
+
// Fallback: return expected path
|
|
126
|
+
return extension === "ts"
|
|
127
|
+
? resolve(
|
|
128
|
+
process.cwd(),
|
|
129
|
+
"src",
|
|
130
|
+
"app",
|
|
131
|
+
"api",
|
|
132
|
+
"[locale]",
|
|
133
|
+
"system",
|
|
134
|
+
"check",
|
|
135
|
+
"oxlint",
|
|
136
|
+
"plugins",
|
|
137
|
+
baseName,
|
|
138
|
+
"src",
|
|
139
|
+
"index.ts",
|
|
140
|
+
)
|
|
141
|
+
: resolve(
|
|
142
|
+
process.cwd(),
|
|
143
|
+
"node_modules",
|
|
144
|
+
"@next-vibe",
|
|
145
|
+
"checker",
|
|
146
|
+
"oxlint-plugins",
|
|
147
|
+
fileName,
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// If no prefix matched, return absolute path if it exists, otherwise as-is
|
|
152
|
+
if (pluginPath.startsWith("/")) {
|
|
153
|
+
return pluginPath;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const absolutePath = resolve(process.cwd(), pluginPath);
|
|
157
|
+
return existsSync(absolutePath) ? absolutePath : pluginPath;
|
|
98
158
|
}
|
|
99
159
|
|
|
100
160
|
private static resolveJsPlugins(
|
|
@@ -580,7 +640,14 @@ export default checkConfig.eslint?.buildFlatConfig?.(
|
|
|
580
640
|
};
|
|
581
641
|
}
|
|
582
642
|
|
|
583
|
-
|
|
643
|
+
let templateContent = await fs.readFile(templatePath, "utf8");
|
|
644
|
+
|
|
645
|
+
// Replace .ts extensions with .js for installed package usage
|
|
646
|
+
templateContent = templateContent.replace(
|
|
647
|
+
/@next-vibe\/checker\/oxlint-plugins\/([^"']+)\.ts/g,
|
|
648
|
+
"@next-vibe/checker/oxlint-plugins/$1.js",
|
|
649
|
+
);
|
|
650
|
+
|
|
584
651
|
await fs.writeFile(configPath, templateContent, "utf8");
|
|
585
652
|
|
|
586
653
|
logger.info("Created check.config.ts from template", {
|