0.1.2 • Published 3 years ago

@shresthabijay/prettier-config v0.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

@shresthabijay/prettier-config

Bijay's personal prettier configuration.

Installation

yarn add -D @shresthabijay/prettier-config prettier

Usage

You can just reference in the package.json:

"prettier": "@shresthabijay/prettier-config"

Or you can also supported extensions to export a string in .prettierrc.json

"@shresthabijay/prettier-config"

Extending

Sometimes you may need to extend the configuration. You can do that using .prettierrc.js.

module.exports = {
	...require('@shresthabijay/prettier-config'),
	trailingComma: 'none',
}

Working with Eslint

You need to install eslint-plugin-prettier and eslint-config-prettier. Then you need to add plugin:prettier/recommended in your eslint configuration as the last extension. More about it on eslint-prettier-plugin.

{
	"extends": ["plugin:prettier/recommended"]
}

This will disable all the eslint rules that may conflict with prettier and then runs prettier and eslint rules on format.