feat: add eslint-plugin-turbo

This commit is contained in:
vince
2024-07-10 22:30:39 +08:00
parent 1f968723d5
commit 8952e947bf
8 changed files with 55 additions and 16 deletions

View File

@@ -27,6 +27,7 @@
}
},
"dependencies": {
"eslint-config-turbo": "^2.0.6",
"eslint-plugin-command": "^0.2.3"
},
"devDependencies": {

View File

@@ -11,6 +11,7 @@ export * from './perfectionist';
export * from './prettier';
export * from './regexp';
export * from './test';
export * from './turbo';
export * from './typescript';
export * from './unicorn';
export * from './vue';

View File

@@ -0,0 +1,16 @@
import type { Linter } from 'eslint';
export async function turbo(): Promise<Linter.FlatConfig[]> {
const [pluginTurbo] = await Promise.all([
// @ts-expect-error - no types
import('eslint-config-turbo'),
] as const);
return [
{
plugins: {
turbo: pluginTurbo,
},
},
];
}

View File

@@ -14,6 +14,7 @@ import {
prettier,
regexp,
test,
turbo,
typescript,
unicorn,
vue,
@@ -46,6 +47,7 @@ async function defineConfig(config: FlatConfig[] = []) {
test(),
regexp(),
command(),
turbo(),
...customConfig,
...config,
];

View File

@@ -37,6 +37,6 @@
"pkg-types": "^1.1.3",
"prettier": "^3.3.2",
"rimraf": "^6.0.0",
"zx": "^8.1.4"
"zx": "^7.2.3"
}
}