Prettier 配置
/** @type {import("prettier").Config} */module.exports = { /** 缩进 */ tabWidth: 2, /** 使用制表符 */ useTabs: false, /** 不使用分号 */ semi: false, /** 使用单引号 */ singleQuote: true, /** 在JSX中使用单引号 */ jsxSingleQuote: true, /** 使用尾随逗号 */ trailingComma: 'all', /** 对象内两边空格 */ bracketSpacing: true, /** 省略箭头函数括号 */ arrowParens: 'avoid',}
/** * @type {import('prettier').Config} */module.exports = { plugins: ['prettier-plugin-astro', 'prettier-plugin-tailwindcss'], overrides: [ { files: '*.astro', options: { parser: 'astro', }, }, ], printWidth: 120, tabWidth: 2, singleQuote: true, jsxSingleQuote: true, trailingComma: 'all', bracketSpacing: true, semi: false, useTabs: false, arrowParens: 'avoid',}