prettier.ts 412 B

12345678910111213141516171819
  1. import type { Linter } from 'eslint';
  2. import { interopDefault } from '../util';
  3. export async function prettier(): Promise<Linter.Config[]> {
  4. const [pluginPrettier] = await Promise.all([
  5. interopDefault(import('eslint-plugin-prettier')),
  6. ] as const);
  7. return [
  8. {
  9. plugins: {
  10. prettier: pluginPrettier,
  11. },
  12. rules: {
  13. 'prettier/prettier': 'error',
  14. },
  15. },
  16. ];
  17. }