@murshidazher/prettier-config
v1.0.4
Published
Prettier config
Downloads
3
Maintainers
Readme
@murshidazher/prettier-config
An opinionated prettier configuration to make linting a 🌬️. Accepting PRs
Quickly format your JavaScript files with this easy to install and use Prettier configuration.
Table of Contents
Purpose
prettier is an opinionated code formatter easy to configure and integrate with Code Editors. This configuration aims to quickly install and config JavaScript projects for consistent code style standards.
This package can be used as a stand-alone config or integrated with any linter.
Installation
npm install -D prettier @murshidazher/prettier-config
If you use yarn as the package manager,
yarn add -D prettier @murshidazher/prettier-config
How to use
In your package.json
add:
"prettier": "@murshidazher/prettier-config"
Under script objects
"format": "prettier --write \"{,!(node_modules)/**/}*.js\""
Extending
This configuration is not intended to be changed, but if you have a setup where modification is required, it is possible. Prettier does not offer an "extends" mechanism as you might be familiar from tools such as ESLint.
To extend a configuration you will need to create either .prettierrc.js
or prettier.config.js
file:
// .prettierrc.js
module.exports = {
...require('@murshidazher/prettier-config'),
semi: false
// more configuration options goes here!
};
Contributors
Contributing
How to contribute to this open source library
License
Copyright © 2020-2021 Murshid Azher. This library is licensed under the MIT.