Skip to content

Commit 8a3c5bf

Browse files
committed
fix: and style js scripts
1 parent 2f28008 commit 8a3c5bf

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/categories/js/commitlint.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ export const commitlint = async () => {
1717

1818
await installDevelopmentDependencies('@commitlint/cli', rules);
1919
await addJsonFileToRoot('.commitlintrc.json', config);
20-
await addHook('commit-msg', 'npx --no -- commitlint --edit "$1"');
20+
await addHook('commit-msg', 'npx --no-install -- commitlint --edit "$1"');
2121
};

src/categories/js/eslint.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ const nodeTsConfig: Config = {
4747
},
4848
},
4949
scripts: [
50-
{ name: 'lint', script: 'eslint' },
51-
{ name: 'lint:fix', script: 'npm run lint "src/**/*.ts" -- --fix' },
50+
{ name: 'lint', script: 'eslint "src/**/*.ts"' },
51+
{ name: 'lint:fix', script: 'eslint "src/**/*.ts" --fix' },
5252
],
5353
};
5454

src/categories/js/lint-staged.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ interface Config {
88

99
const defaultConfig: Config = {
1010
config: {
11-
'*.{js,json,yml,md}': 'npm run format -- --write',
11+
'*.{js,json,yml,md}': 'prettier --write',
1212
},
1313
};
1414

1515
const nodeTsConfig: Config = {
1616
config: {
17-
'*.ts': 'npm run lint -- --fix',
17+
'*.ts': 'eslint --fix',
1818
...defaultConfig.config,
1919
},
2020
};

src/categories/js/prettier.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const defaultConfig = {
2020
},
2121
ignore: ['dist', 'node_modules', 'public', '.husky', 'package-lock.json'],
2222
scripts: [
23-
{ name: 'format', script: 'prettier' },
23+
{ name: 'format', script: 'prettier .' },
2424
{ name: 'format:fix', script: 'prettier --write .' },
2525
],
2626
};

src/categories/js/standard-verstion.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const defaultConfig = {
1414
{ type: 'perf', hidden: true },
1515
{ type: 'test', hidden: true },
1616
],
17-
commitUrlFormat: `${repositoryUrl}/commits/{{hash}}`,
17+
commitUrlFormat: `${repositoryUrl}/commit/{{hash}}`,
1818
compareUrlFormat: `${repositoryUrl}/compare/{{previousTag}}...{{currentTag}}`,
1919
}),
2020
packageJsonConfig: {
@@ -38,7 +38,7 @@ export const standardVersion = async () => {
3838
await installDevelopmentDependencies('standard-version');
3939

4040
const packageJson = await getPackageJson();
41-
const repositoryUrl = packageJson.homepage?.replace('#home', '') ?? '<repository url>';
41+
const repositoryUrl = packageJson.homepage?.replace(/#.+$/, '') ?? '<repository url>';
4242
const config = createConfig(repositoryUrl);
4343

4444
await addJsonFileToRoot('.versionrc.json', config);

0 commit comments

Comments
 (0)