0.0.8 • Published 4 years ago
@r365/r365-prettier-config v0.0.8
R365 Prettier Config
This contains the javascript prettification configuration for Restaurant365.
Install
Run the following from the command line on the same level as your package.json:
npm install @r365/r365-prettier-config --save-dev
Use
Method 1: From .prettierrc.js (recommended)
Create a file called .prettierrc.js on the same level as your package.json, and add the following:
module.exports = {
...require("@r365/r365-prettier-config"),
};
This method is recommended as it can be extended as needed. For example:
module.exports = {
...require("@r365/r365-prettier-config"),
parser: "typescript",
};
Method 2: From package.json
In your package.json, add the following parameter:
{
"prettier": "@r365/r365-prettier-config",
}
This is not recommended as: 1. It cannot be extended 2. It can require additional setup to be recognized by plugins within certain text editors (eg: by the Prettier plugin in VSCode)