chore: lint config
parent
ffee62e940
commit
748f60c7bb
3
.npmrc
3
.npmrc
|
|
@ -1,7 +1,8 @@
|
||||||
registry=https://registry.npmmirror.com
|
registry=https://registry.npmmirror.com
|
||||||
public-hoist-pattern[]=lefthook
|
public-hoist-pattern[]=lefthook
|
||||||
public-hoist-pattern[]=eslint
|
public-hoist-pattern[]=eslint
|
||||||
public-hoist-pattern[]=prettier
|
public-hoist-pattern[]=oxfmt
|
||||||
|
public-hoist-pattern[]=oxlint
|
||||||
public-hoist-pattern[]=stylelint
|
public-hoist-pattern[]=stylelint
|
||||||
public-hoist-pattern[]=*postcss*
|
public-hoist-pattern[]=*postcss*
|
||||||
public-hoist-pattern[]=@commitlint/*
|
public-hoist-pattern[]=@commitlint/*
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,7 @@
|
||||||
"dev:tdesign": "pnpm -F @vben/web-tdesign run dev",
|
"dev:tdesign": "pnpm -F @vben/web-tdesign run dev",
|
||||||
"dev:play": "pnpm -F @vben/playground run dev",
|
"dev:play": "pnpm -F @vben/playground run dev",
|
||||||
"format": "vsh lint --format",
|
"format": "vsh lint --format",
|
||||||
"lint": "pnpm run lint:oxc && pnpm run lint:eslint",
|
"lint": "vsh lint",
|
||||||
"lint:eslint": "vsh lint",
|
|
||||||
"lint:oxc": "oxlint .",
|
|
||||||
"postinstall": "pnpm -r run stub --if-present",
|
"postinstall": "pnpm -r run stub --if-present",
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
"preview": "turbo-run preview",
|
"preview": "turbo-run preview",
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,13 @@ async function runLint({ format }: LintCommandOptions) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
execaCommand(`eslint . --cache`, {
|
execaCommand(`oxfmt --check .`, {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
}),
|
}),
|
||||||
execaCommand(`oxfmt --check .`, {
|
execaCommand(`oxlint . --fix`, {
|
||||||
|
stdio: 'inherit',
|
||||||
|
}),
|
||||||
|
execaCommand(`eslint . --cache`, {
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
}),
|
}),
|
||||||
execaCommand(`stylelint "**/*.{vue,css,less,scss}" --cache`, {
|
execaCommand(`stylelint "**/*.{vue,css,less,scss}" --cache`, {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ export default defineConfig({
|
||||||
'**/.{idea,git,cache,output,temp}/**',
|
'**/.{idea,git,cache,output,temp}/**',
|
||||||
'**/node_modules/**',
|
'**/node_modules/**',
|
||||||
'**/{stylelint,eslint}.config.*',
|
'**/{stylelint,eslint}.config.*',
|
||||||
'oxfmt.config.ts',
|
'**/{oxfmt,oxlint}.config.*',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue