Skip to content

Commit

Permalink
chore(cli): add prettier task
Browse files Browse the repository at this point in the history
affects: @varlet/cli
  • Loading branch information
haoziqaq committed Jul 15, 2021
1 parent 8ab48fb commit a27b49d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/varlet-cli/src/commands/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import { ESLINT_EXTENSIONS } from '../shared/constant'
export async function lint() {
let spinner: Ora
try {
spinner = ora('prettier starting...').start()
await execa('prettier', ['--write', '.'])
spinner.succeed('prettier success')

spinner = ora('stylelint starting...').start()
await execa('stylelint', ['./**/*.vue', './**/*.css', './**/*.less', '--fix'])
spinner.succeed('stylelint success')
Expand All @@ -22,9 +26,6 @@ export async function lint() {
ESLINT_EXTENSIONS.join(','),
])
spinner.succeed('eslint success')
// spinner = ora('prettier starting...').start()
// await execa('prettier', ['--write'])
// spinner.succeed('prettier success')
} catch (e) {
spinner!.fail(e.toString())
process.exit(1)
Expand Down

0 comments on commit a27b49d

Please sign in to comment.