@murshidazher/prettier-config

1.0.4 • Public • Published

@murshidazher/prettier-config npm

build: github workflow code style: prettier

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

contributors

Contributing

How to contribute to this open source library

License

Copyright © 2020-2021 Murshid Azher. This library is licensed under the MIT.

Package Sidebar

Install

npm i @murshidazher/prettier-config

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

128 kB

Total Files

9

Last publish

Collaborators

  • murshidazher