es-toolkit/.prettierrc.cjs
2024-10-06 17:04:48 +09:00

27 lines
690 B
JavaScript

module.exports = {
arrowParens: 'avoid',
bracketSameLine: false,
bracketSpacing: true,
endOfLine: 'lf',
jsxSingleQuote: false,
printWidth: 120,
proseWrap: 'preserve',
quoteProps: 'as-needed',
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
plugins: [require.resolve('@trivago/prettier-plugin-sort-imports')],
importOrder: ['^vitest', '^es-toolkit', '<THIRD_PARTY_MODULES>', '^@(.*)$', '^[.]/', '^[.]{2,}/'],
importOrderSortSpecifiers: true,
importOrderCaseInsensitive: true,
overrides: [
{
files: 'src/**/index.ts',
options: {
plugins: [require.resolve('prettier-plugin-sort-re-exports')],
},
},
],
};