2024-05-19 21:20:42 +08:00
|
|
|
import type { Linter } from 'eslint';
|
|
|
|
|
2024-08-02 22:18:46 +08:00
|
|
|
import { interopDefault } from '../util';
|
|
|
|
|
|
|
|
export async function prettier(): Promise<Linter.Config[]> {
|
2024-05-19 21:20:42 +08:00
|
|
|
const [pluginPrettier] = await Promise.all([
|
2024-08-02 22:18:46 +08:00
|
|
|
interopDefault(import('eslint-plugin-prettier')),
|
2024-05-19 21:20:42 +08:00
|
|
|
] as const);
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
plugins: {
|
|
|
|
prettier: pluginPrettier,
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
'prettier/prettier': 'error',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|