@sanity/prettier-config
Version:
Sanity.io Prettier shared configuration
1 lines • 1.45 kB
Source Map (JSON)
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import type {Config} from 'prettier'\n\n/**\n * Some of Prettier's defaults can be overridden by an EditorConfig file. We\n * define those here to ensure that doesn't happen.\n *\n * See: https://github.com/prettier/prettier/blob/main/docs/configuration.md#editorconfig\n */\nconst overridableDefaults = {\n endOfLine: 'lf',\n tabWidth: 2 as const,\n useTabs: false,\n} satisfies Config\n\nconst config = {\n ...overridableDefaults,\n printWidth: 100 as const,\n semi: false,\n singleQuote: true,\n quoteProps: 'consistent',\n bracketSpacing: false,\n plugins: ['prettier-plugin-packagejson'] as const,\n overrides: [\n {\n files: ['*.json5'] as const,\n options: {\n quoteProps: 'preserve',\n singleQuote: false,\n },\n },\n {\n files: ['*.yml'] as const,\n options: {\n singleQuote: false,\n },\n },\n ],\n} satisfies Config\n\nexport default config\n"],"names":[],"mappings":";AAQA,MAAM,sBAAsB;AAAA,EAC1B,WAAW;AAAA,EACX,UAAU;AAAA,EACV,SAAS;AACX,GAEM,SAAS;AAAA,EACb,GAAG;AAAA,EACH,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,SAAS,CAAC,6BAA6B;AAAA,EACvC,WAAW;AAAA,IACT;AAAA,MACE,OAAO,CAAC,SAAS;AAAA,MACjB,SAAS;AAAA,QACP,YAAY;AAAA,QACZ,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO,CAAC,OAAO;AAAA,MACf,SAAS;AAAA,QACP,aAAa;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACF;;"}