feat: 初始化项目基础结构和配置
This commit is contained in:
19
internal/lint-configs/eslint-config/src/configs/prettier.ts
Normal file
19
internal/lint-configs/eslint-config/src/configs/prettier.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { Linter } from 'eslint';
|
||||
|
||||
import { interopDefault } from '../util';
|
||||
|
||||
export async function prettier(): Promise<Linter.Config[]> {
|
||||
const [pluginPrettier] = await Promise.all([
|
||||
interopDefault(import('eslint-plugin-prettier')),
|
||||
] as const);
|
||||
return [
|
||||
{
|
||||
plugins: {
|
||||
prettier: pluginPrettier,
|
||||
},
|
||||
rules: {
|
||||
'prettier/prettier': 'error',
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user