fix: 调整lint执行顺序
使用核心 no-nested-ternary 规则替代 Unicorn 自动修复,避免嵌套三元表达式被错误加括号 调整 oxlint、oxfmt、eslint 和 stylelint 的执行顺序,保证commit与format流程一致
This commit is contained in:
@@ -112,17 +112,17 @@ async function runLint({ format, threads }: LintCommandOptions) {
|
||||
|
||||
if (format) {
|
||||
await runSerial([
|
||||
['stylelint', ['**/*.{vue,css,less,scss}', '--cache', '--fix']],
|
||||
['oxfmt', [threadsArg]],
|
||||
['oxlint', ['--fix', '--type-aware', threadsArg]],
|
||||
['oxfmt', [threadsArg]],
|
||||
['eslint', ['.', '--cache', '--fix']],
|
||||
['stylelint', ['**/*.{vue,css,less,scss}', '--cache', '--fix']],
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
const commands: Command[] = [
|
||||
['oxfmt', ['--check', threadsArg]],
|
||||
['oxlint', ['--type-aware', threadsArg]],
|
||||
['oxfmt', ['--check', threadsArg]],
|
||||
['eslint', ['.', '--cache']],
|
||||
['stylelint', ['**/*.{vue,css,less,scss}', '--cache']],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user