refactor: migrate command lint to oxlint
parent
46b4ce81e4
commit
55b54e24fe
|
|
@ -28,8 +28,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@vben/oxlint-config": "workspace:*",
|
||||
"eslint-config-turbo": "catalog:",
|
||||
"eslint-plugin-command": "catalog:"
|
||||
"eslint-config-turbo": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "catalog:",
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
import createCommand from 'eslint-plugin-command/config';
|
||||
|
||||
export async function command() {
|
||||
return [
|
||||
{
|
||||
...createCommand(),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
export * from './command';
|
||||
export * from './ignores';
|
||||
export * from './javascript';
|
||||
export * from './jsonc';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import type { Linter } from 'eslint';
|
||||
|
||||
import {
|
||||
command,
|
||||
ignores,
|
||||
javascript,
|
||||
jsonc,
|
||||
|
|
@ -34,7 +33,6 @@ async function defineConfig(config: FlatConfig[] = []) {
|
|||
node(),
|
||||
perfectionist(),
|
||||
unicorn(),
|
||||
command(),
|
||||
turbo(),
|
||||
yaml(),
|
||||
pnpm(),
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
"dependencies": {
|
||||
"@eslint-community/eslint-plugin-eslint-comments": "catalog:",
|
||||
"eslint-plugin-better-tailwindcss": "catalog:",
|
||||
"eslint-plugin-command": "catalog:",
|
||||
"oxlint": "catalog:"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
import type { OxlintConfig } from 'oxlint';
|
||||
|
||||
const command: OxlintConfig = {
|
||||
jsPlugins: [
|
||||
{
|
||||
name: 'command',
|
||||
specifier: 'eslint-plugin-command',
|
||||
},
|
||||
],
|
||||
rules: {
|
||||
'command/command': 'error',
|
||||
},
|
||||
};
|
||||
|
||||
export { command };
|
||||
|
|
@ -2,6 +2,7 @@ import type { OxlintConfig } from 'oxlint';
|
|||
|
||||
import { defineConfig as defineOxlintConfig } from 'oxlint';
|
||||
|
||||
import { command } from './command';
|
||||
import { comments } from './comments';
|
||||
import { ignores } from './ignores';
|
||||
import { importPluginConfig } from './import';
|
||||
|
|
@ -61,6 +62,7 @@ function mergeOxlintConfigs(...configs: OxlintConfig[]): OxlintConfig {
|
|||
const oxlintConfig = defineOxlintConfig(
|
||||
mergeOxlintConfigs(
|
||||
javascript,
|
||||
command,
|
||||
comments,
|
||||
ignores,
|
||||
plugins,
|
||||
|
|
@ -76,6 +78,7 @@ const oxlintConfig = defineOxlintConfig(
|
|||
);
|
||||
|
||||
export {
|
||||
command,
|
||||
comments,
|
||||
ignores,
|
||||
importPluginConfig,
|
||||
|
|
|
|||
Loading…
Reference in New Issue