3.1.2 • Published 4 days ago

@leukeleu/prettier-config v3.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

Leukeleu Prettier configuration

Installing this package

If you already had Prettier installed in your project you can delete this first with npm uninstall prettier.

Then install this package as a development dependency npm i -D @leukeleu/prettier-config.

Adding the config

In your .prettierrc.js add:

module.exports = require('@leukeleu/prettier-config')

Add script commands to package.json

To run Prettier on your code, add the following script to your package.json:

"scripts": {
  "prettier": "prettier . --cache",
  "lint:prettier": "npm run prettier -- --check",
  "lintfix:prettier": "npm run prettier -- --write",
}

Adding an ignore file

By default prettier will lint specific filetypes. If you want to ignore files you can create a file named .prettierignore in the root and add ignored file(types) to it.

Running the check

Now you can run the Prettier check using npm run lint:prettier or npm run lintfix:prettier to auto fix.

Extending/ changing config

This is not recommended as the goal is have similar settings in all projects, but if for some reason you need to add or change the config it's possible. The config is in JavaScript, so you can make use of the spread operator to extend the config.

module.exports = {
  ...require('@leukeleu/prettier-config'),
  semi: true,
}

Contributing

To learn how to local test and publish this package, please refer to the instructions in the CONTRIBUTORS.md file.

3.1.2

4 days ago

3.1.0

4 months ago

3.0.0

4 months ago

2.1.0

5 months ago

2.0.1

8 months ago

2.0.0

10 months ago

1.4.0

11 months ago

1.3.1

11 months ago

1.3.0

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago