aboutsummaryrefslogtreecommitdiff
path: root/.prettierrc.js
blob: 4e9bb3ff2d105278e589624a7f4c6e188578afde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// @ts-check

/**
 * @type {import('prettier').Config}
 */
export default {
  plugins: ['prettier-plugin-organize-imports', 'prettier-plugin-pkg'],
  singleQuote: true,
  trailingComma: 'es5',
  overrides: [
    {
      files: '*.json5',
      options: {
        parser: 'json5',
        quoteProps: 'preserve',
        singleQuote: false,
        trailingComma: 'none',
      },
    },
    {
      files: '*.md',
      options: {
        // @ts-expect-error: known property
        organizeImportsSkipDestructiveCodeActions: true,
      },
    },
    {
      files: 'package.json',
      options: {
        packageSortOrderPreset: 'npm-plus',
        packageSortOrder: ['name', 'version', 'description', 'scripts'],
        packageIgnoreSort: ['scripts'],
      },
    },
  ],
};