@subf/config 0.2.0 → 0.2.1
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/subf.js +27 -0
- package/dist/oxfmt.d.ts +1 -1
- package/dist/oxlint.d.ts +1 -1
- package/package.json +1 -1
package/bin/subf.js
CHANGED
|
@@ -141,4 +141,31 @@ if (depResult.changed) {
|
|
|
141
141
|
)
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
// If either oxfmt or oxlint aren't listed, hint how to install them
|
|
145
|
+
try {
|
|
146
|
+
const missingTools = []
|
|
147
|
+
const hasOxfmt = projectPkg.devDependencies?.oxfmt || projectPkg.dependencies?.oxfmt
|
|
148
|
+
const hasOxlint = projectPkg.devDependencies?.oxlint || projectPkg.dependencies?.oxlint
|
|
149
|
+
const hasTypescript =
|
|
150
|
+
projectPkg.devDependencies?.typescript || projectPkg.dependencies?.typescript
|
|
151
|
+
|
|
152
|
+
if (!hasOxfmt) {
|
|
153
|
+
missingTools.push('oxfmt')
|
|
154
|
+
}
|
|
155
|
+
if (!hasOxlint) {
|
|
156
|
+
missingTools.push('oxlint')
|
|
157
|
+
}
|
|
158
|
+
if (!hasTypescript) {
|
|
159
|
+
missingTools.push('typescript')
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (missingTools.length > 0) {
|
|
163
|
+
console.log(
|
|
164
|
+
`Hint: Install ${missingTools.join(' and ')} to use the generated configs. Example: npm install -D ${missingTools.join(
|
|
165
|
+
' ',
|
|
166
|
+
)}`,
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
} catch {}
|
|
170
|
+
|
|
144
171
|
process.exit(0)
|
package/dist/oxfmt.d.ts
CHANGED
package/dist/oxlint.d.ts
CHANGED
|
@@ -20,4 +20,4 @@ interface SubfOptions extends OxlintConfig {
|
|
|
20
20
|
}
|
|
21
21
|
declare function subfLint(options?: SubfOptions): OxlintConfig;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { CONFIG, CONFIG as default, FILES_TS_TSX, SubfOptions, baseConfig, baseRules, markdownOverrideConfig, overrides, solid, subfLint, ts, unocss, vitest };
|
|
23
|
+
export { CONFIG, CONFIG as default, FILES_TS_TSX, type OxlintConfig, type OxlintOverride, SubfOptions, baseConfig, baseRules, markdownOverrideConfig, overrides, solid, subfLint, ts, unocss, vitest };
|