chore(@vant/cli): no longer provide stylelint (#10844)

This commit is contained in:
neverland
2022-07-23 21:41:38 +08:00
committed by GitHub
parent 537e629d7d
commit 11dbde14f6
18 changed files with 136 additions and 707 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ program
program
.command('lint')
.description('Run eslint and stylelint')
.description('Run ESLint')
.action(async () => {
const { lint } = await import('./commands/lint.js');
return lint();
+1 -14
View File
@@ -44,23 +44,10 @@ function eslint() {
);
}
function stylelint() {
return runCommand(
'stylelint',
['src/**/*.css', 'src/**/*.vue', 'src/**/*.less', 'src/**/*.sass', '--fix'],
{
start: 'Running stylelint...',
succeed: 'Stylelint Passed.',
failed: 'Stylelint failed!',
}
);
}
export async function lint() {
const eslintPassed = await eslint();
const stylelintPassed = await stylelint();
if (!eslintPassed || !stylelintPassed) {
if (!eslintPassed) {
process.exit(1);
}
}