Skip to content

Commit

Permalink
docs: update prettier docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Willem-Jaap committed Dec 13, 2023
1 parent d49b91b commit e31c57f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,22 @@ This package also includes a complementing Prettier config, you can use it by ad

If you want to customize properties of the Prettier config, you can do so by adding a configuration file to your project root. You can find more information about this [here](https://prettier.io/docs/en/configuration.html).

We recommend installing the following plugins for Prettier:

- [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss)
- [@ianvs/prettier-plugin-sort-imports](https://github.com/IanVS/prettier-plugin-sort-imports)

```js
module.exports = {
...require('eslint-config-pixel/prettier'),
...require('eslint-config-pixel/prettier/base'),
// Specifies the order of imports and sorts them automatically.
// Great for usage with Typescript absolute paths.
plugins: ['@ianvs/prettier-plugin-sort-imports', 'prettier-plugin-tailwindcss'],
importOrder: [
'^react$',
'^next$',
'<THIRD_PARTY_MODULES>',
'',
'^~components/(.*)$',
'^~hooks/(.*)$',
'^~styles/(.*)$',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
"eslintConfig": {
"extends": "./eslintrc.js"
},
"prettier": "./prettier.js"
"prettier": "./prettier"
}

0 comments on commit e31c57f

Please sign in to comment.