Prettier config for MSKCC projects
A prettier shareable config for mskcc projects.
``js`
npm install --save-dev prettier // Actual prettier
npm install --save-dev @mskcc/prettier-config // configuration file
_This is only a shareable configuration. It does not install Prettier or any other part of the tool chain._
Reference it in package.json using the prettier property:
`json`
{
"name": "my-projects-name",
"prettier": "@mskcc/prettier-config",
"devDependencies" : {
"@mskcc/prettier-config": "^0.7.0"
}
}
If you don't want to use package.json, you can use any of the supported
extensions to export a string:
`json`
// .prettierrc.json
"@mskcc/prettier-config"
`js
// prettier.config.js or .prettierrc.js
module.exports = '@mskcc/prettier-config';
`
1. Create a JavaScript configuration file .prettierrc.js.
2. Import the configuration file.
3. Export the modified configuration
`javascript
// .prettierrc.js
const prettierConfig = require('@mskcc/prettier-config');
module.exports = {
...prettierConfig,
printWidth: 100
};
``