Configs> Prettier

Following command installs 2 npm packages that are used in the Prettier config below:

npm i --save-dev prettier-plugin-tailwindcss @trivago/prettier-plugin-sort-imports

Prettier config

1
module.exports = {
2
printWidth: 80,
3
tabWidth: 2,
4
useTabs: false,
5
semi: true,
6
singleQuote: true,
7
trailingComma: 'all',
8
bracketSpacing: true,
9
arrowParens: 'avoid',
10
plugins: ['prettier-plugin-tailwindcss'],
11
importOrder: [
12
'<THIRD_PARTY_MODULES>',
13
'^@/(.*)$',
14
'^[./]'
15
],
16
importOrderSeparation: true,
17
importOrderSortSpecifiers: true,
18
importOrderGroupNamespaceSpecifiers: true,
19
};