@cluerise/tools 5.3.4 → 5.3.6
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.
|
@@ -313,9 +313,8 @@ class ToolInitializer {
|
|
|
313
313
|
return toolNameSchema.options.map((option) => option.value);
|
|
314
314
|
}
|
|
315
315
|
async #initCommitlint() {
|
|
316
|
-
const
|
|
317
|
-
const
|
|
318
|
-
const configContent = `export { default } from '${this.#configPackage}/${configName}.js';
|
|
316
|
+
const configPath = "commitlint.config.ts";
|
|
317
|
+
const configContent = `export { default } from '${this.#configPackage}/${configPath}';
|
|
319
318
|
`;
|
|
320
319
|
await FileUtils.createFile(configPath, configContent);
|
|
321
320
|
}
|
|
@@ -358,7 +357,7 @@ class ToolInitializer {
|
|
|
358
357
|
}
|
|
359
358
|
async #initPnpm() {
|
|
360
359
|
const workspacePath = "pnpm-workspace.yaml";
|
|
361
|
-
const workspaceContent = "engineStrict: true\ngitChecks: false\n\npublicHoistPattern:\n - '@commitlint/cli'\n - eslint\n - lint-staged\n - prettier\n - prettier-plugin-sh\n";
|
|
360
|
+
const workspaceContent = "engineStrict: true\ngitChecks: false\nincludeWorkspaceRoot: true\n\npublicHoistPattern:\n - '@commitlint/cli'\n - eslint\n - lint-staged\n - prettier\n - prettier-plugin-sh\n";
|
|
362
361
|
await FileUtils.createFile(workspacePath, workspaceContent);
|
|
363
362
|
}
|
|
364
363
|
async #initPrettier() {
|
|
@@ -409,7 +408,7 @@ export default createReleaseConfig(${JsonUtils.prettify(configParams)});
|
|
|
409
408
|
}
|
|
410
409
|
async #initVSCode() {
|
|
411
410
|
const settingsPath = Path.join(".vscode", "settings.json");
|
|
412
|
-
const settingsContent = '{\n "editor.codeActionsOnSave": {\n "source.fixAll.eslint": "explicit"\n },\n "typescript.tsdk": "node_modules/typescript/lib"\n}\n';
|
|
411
|
+
const settingsContent = '{\n "editor.codeActionsOnSave": {\n "source.fixAll.eslint": "explicit"\n },\n "typescript.tsdk": "node_modules/typescript/lib",\n "javascript.preferences.importModuleSpecifier": "relative",\n "javascript.preferences.importModuleSpecifierEnding": "js",\n "typescript.preferences.importModuleSpecifier": "relative",\n "typescript.preferences.importModuleSpecifierEnding": "js",\n "typescript.preferences.preferTypeOnlyAutoImports": true\n}\n';
|
|
413
412
|
await FileUtils.createFile(settingsPath, settingsContent);
|
|
414
413
|
}
|
|
415
414
|
/**
|
|
@@ -498,20 +497,16 @@ class FileLinter {
|
|
|
498
497
|
return this.#eslint.isPathIgnored(path);
|
|
499
498
|
}
|
|
500
499
|
async #prettierLint(patterns) {
|
|
501
|
-
const configPath = await Prettier.resolveConfigFile();
|
|
502
|
-
if (!configPath) {
|
|
503
|
-
return [];
|
|
504
|
-
}
|
|
505
|
-
const config = await Prettier.resolveConfig(configPath);
|
|
506
|
-
if (!config) {
|
|
507
|
-
return [];
|
|
508
|
-
}
|
|
509
500
|
const paths = await glob(patterns, {
|
|
510
501
|
nodir: true,
|
|
511
502
|
ignore: "node_modules/**"
|
|
512
503
|
});
|
|
513
504
|
const results = await Promise.all(
|
|
514
505
|
paths.map(async (path) => {
|
|
506
|
+
const config = await Prettier.resolveConfig(path);
|
|
507
|
+
if (!config) {
|
|
508
|
+
return null;
|
|
509
|
+
}
|
|
515
510
|
if (await this.#isIgnoredByPrettier(path)) {
|
|
516
511
|
return null;
|
|
517
512
|
}
|
|
@@ -287,20 +287,16 @@ class FileLinter {
|
|
|
287
287
|
return this.#eslint.isPathIgnored(path);
|
|
288
288
|
}
|
|
289
289
|
async #prettierLint(patterns) {
|
|
290
|
-
const configPath = await Prettier.resolveConfigFile();
|
|
291
|
-
if (!configPath) {
|
|
292
|
-
return [];
|
|
293
|
-
}
|
|
294
|
-
const config = await Prettier.resolveConfig(configPath);
|
|
295
|
-
if (!config) {
|
|
296
|
-
return [];
|
|
297
|
-
}
|
|
298
290
|
const paths = await glob(patterns, {
|
|
299
291
|
nodir: true,
|
|
300
292
|
ignore: "node_modules/**"
|
|
301
293
|
});
|
|
302
294
|
const results = await Promise.all(
|
|
303
295
|
paths.map(async (path) => {
|
|
296
|
+
const config = await Prettier.resolveConfig(path);
|
|
297
|
+
if (!config) {
|
|
298
|
+
return null;
|
|
299
|
+
}
|
|
304
300
|
if (await this.#isIgnoredByPrettier(path)) {
|
|
305
301
|
return null;
|
|
306
302
|
}
|
|
@@ -237,20 +237,16 @@ class FileLinter {
|
|
|
237
237
|
return this.#eslint.isPathIgnored(path);
|
|
238
238
|
}
|
|
239
239
|
async #prettierLint(patterns) {
|
|
240
|
-
const configPath = await Prettier.resolveConfigFile();
|
|
241
|
-
if (!configPath) {
|
|
242
|
-
return [];
|
|
243
|
-
}
|
|
244
|
-
const config = await Prettier.resolveConfig(configPath);
|
|
245
|
-
if (!config) {
|
|
246
|
-
return [];
|
|
247
|
-
}
|
|
248
240
|
const paths = await glob(patterns, {
|
|
249
241
|
nodir: true,
|
|
250
242
|
ignore: "node_modules/**"
|
|
251
243
|
});
|
|
252
244
|
const results = await Promise.all(
|
|
253
245
|
paths.map(async (path) => {
|
|
246
|
+
const config = await Prettier.resolveConfig(path);
|
|
247
|
+
if (!config) {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
254
250
|
if (await this.#isIgnoredByPrettier(path)) {
|
|
255
251
|
return null;
|
|
256
252
|
}
|