Skip to content

murshidazher/prettier-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

27 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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.

About

๐Ÿ“ฆ ๐Ÿ’… shareable prettier configuration.

Topics

Resources

License

Contributing

Stars

Watchers

Forks