Add prettier to docs/ (#4628)

This commit is contained in:
Patrick Schratz
2024-12-28 15:36:23 +01:00
committed by GitHub
parent bf751199c3
commit 3663993dcb
46 changed files with 365 additions and 187 deletions

16
docs/.prettierrc.js Normal file
View File

@@ -0,0 +1,16 @@
import { readFile } from 'node:fs/promises';
// eslint-disable-next-line antfu/no-top-level-await
const config = JSON.parse(await readFile(new URL('../.prettierrc.json', import.meta.url)));
export default {
...config,
plugins: ['@ianvs/prettier-plugin-sort-imports'],
importOrder: [
'<THIRD_PARTY_MODULES>', // Imports not matched by other special words or groups.
'', // Empty string will match any import not matched by other special words or groups.
'^(#|@|~|\\$)(/.*)$',
'',
'^[./]',
],
};