mirror of
https://github.com/imdap/ruoyi-plus-vben5.git
synced 2026-05-10 20:52:10 +08:00
build: migrate formatting pipeline to oxfmt
This commit is contained in:
22
internal/lint-configs/oxfmt-config/src/index.ts
Normal file
22
internal/lint-configs/oxfmt-config/src/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { defineConfig as defineOxfmtConfig } from 'oxfmt';
|
||||
|
||||
type OxfmtConfig = Parameters<typeof defineOxfmtConfig>[0];
|
||||
|
||||
const oxfmtConfig = defineOxfmtConfig({
|
||||
printWidth: 80,
|
||||
proseWrap: 'never',
|
||||
semi: true,
|
||||
singleQuote: true,
|
||||
sortPackageJson: false,
|
||||
trailingComma: 'all',
|
||||
});
|
||||
|
||||
function defineConfig(config: OxfmtConfig = {}) {
|
||||
return defineOxfmtConfig({
|
||||
...oxfmtConfig,
|
||||
...config,
|
||||
});
|
||||
}
|
||||
|
||||
export { defineConfig, oxfmtConfig };
|
||||
export type { OxfmtConfig };
|
||||
Reference in New Issue
Block a user