1.1.0 • Published 1 month ago

@newlevelup/prettier-config v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 month ago

prettier-config Package version NPM version Github Package version

New Level Up shareable config for Prettier

Installation

💡 The purpose of the prettier is to format your code's style issues so that the developers conforms to your organizations code formatting norm. It automatically reformats your code to ensure consistent rules are being followed for indentation, spacing, semicolons, single quotes vs double quotes, etc.

Install Prettier and @newlevelup/prettier-config:

yarn add -D prettier @newlevelup/prettier-config

Usage

New Level Up Prettier rules come bundled in @newlevelup/prettier-config. To enable these rules, add a prettier property in your package.json. See the Prettier configuration docs for more details.

"prettier": "@newlevelup/prettier-config"

If you don't want to use package.json, you can use any of the supported extensions to export a string:

// `.prettierrc.json`
"@newlevelup/prettier-config"
// `prettier.config.js` or `.prettierrc.js`
module.exports = '@newlevelup/prettier-config';

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 use a prettier.config.js or .prettierrc.js file that exports an object:

module.exports = {
    ...require('@newlevelup/prettier-config'),
    semi: false
};
1.1.0

1 month ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago