/** * Prettier Configuration * Shared across all projects in the workspace * * Usage in project: * Create .prettierrc.js with: * module.exports = require('../../../devtools/configs/prettier.config.js'); */ module.exports = { // Line width printWidth: 100, tabWidth: 2, useTabs: false, // Quotes singleQuote: true, jsxSingleQuote: false, // Semicolons semi: true, // Trailing commas trailingComma: 'es5', // Brackets bracketSpacing: true, bracketSameLine: false, // Arrow functions arrowParens: 'avoid', // End of line endOfLine: 'lf', // Prose wrap (for markdown) proseWrap: 'preserve', // HTML whitespace htmlWhitespaceSensitivity: 'css', // Embedded language formatting embeddedLanguageFormatting: 'auto', // Overrides for specific file types overrides: [ { files: '*.json', options: { printWidth: 80, }, }, { files: '*.md', options: { proseWrap: 'always', printWidth: 80, }, }, { files: ['*.yml', '*.yaml'], options: { tabWidth: 2, singleQuote: false, }, }, ], };