bolt.diy/.prettierrc.mjs
2025-03-06 10:23:56 +00:00

22 lines
911 B
JavaScript

const assetsSuffix = 'svg|png|css|scss';
export default {
singleQuote: true,
tabWidth: 2,
semi: true,
printWidth: 120,
importOrder: [
`^(?!(@\/)|(\\.)|(\\..)[a-z@]).(?!.*\\.(${assetsSuffix})$)`, // All imports from node_modules
`^@\/(?!.*\\.(${assetsSuffix})$)`, // All imports starts with "@/"
`^~\/(?!.*\\.(${assetsSuffix})$)`, // All imports starts with "~/"
`^\\\..(?!.*\\.(${assetsSuffix})$)|^\\\.$`, // All imports starts with "."
`^(?!(@\/)|(\\.)|(\\..)[a-z@]).*\\.(${assetsSuffix})$`, // All asserts imports from node_modules
`^@\/.*\\\.(${assetsSuffix})$`, // All assets imports starts with "@/"
`^~\/.*\\\.(${assetsSuffix})$`, // All assets imports starts with "~/"
`\\\.(${assetsSuffix})$`, // All assets imports starts with "."
],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
plugins: ['@trivago/prettier-plugin-sort-imports'],
};