This package provides @rodogir's personal prettier configuration as a ready to use package.
yarn add -D @rodogir/prettier-config prettier@2
Then, create a .prettierrc.js
file with the following content.
module.exports = {
...require("@rodogir/prettier-config")
};
(optional) Add a script to format your code in the package.json
{
"scripts": {
"format": "prettier --write \"**/*.{js,json,ts,tsx}\""
}
}
(optional) Add a .prettierignore
file
node_modules
.next