-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
Description
I think you're currently relying on VS Code settings instead of having the prettier config set for the project. Consider adding a file like this one as prettier.config.js to the root of your project:
module.exports = {
plugins: ['@ianvs/prettier-plugin-sort-imports', 'prettier-plugin-tailwindcss'],
tailwindConfig: './tailwind.config.js',
importOrder: [
'^(react/(.*)$)|^(react$)|^(react-native(.*)$)',
'^(next/(.*)$)|^(next$)',
'^(expo(.*)$)|^(expo$)',
'<THIRD_PARTY_MODULES>',
'',
'',
'^@/(.*)$',
'',
'^~/',
'^[../]',
'^[./]',
],
importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'],
importOrderTypeScriptVersion: '5.2.2',
semi: false,
tabWidth: 2,
singleQuote: true,
bracketSpacing: true,
bracketSameLine: true,
singleAttributePerLine: true,
printWidth: 160,
}
this one requires you to install @ianvs/prettier-plugin-sort-imports and prettier-plugin-tailwindcss