@gideon/prettier-config
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Gideon's prettier config

My personal prettier setup for javascript projects. Feel free to use it any way you like.

Installation

yarn add -D @gideon/prettier-config

Install required peerDependencies:

yarn add -D prettier

Import in package.json:

"prettier": "@gideon/prettier-config"

Add a format command to your package.json:

"format": "prettier --check 'src/**/*.{js,jsx,ts,tsx}'",
"format:fix": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'",

Enable format on save

Add the following to your .vscode/settings.json file:

"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,

Add/override rules

Instead of using package.json, you can also import this config in your .prettierrc.js file. Here you can add or override rules as follows:

module.exports = {
  ...require("@gideon/prettier-config"),
  semi: false,
};

Readme

Keywords

none

Package Sidebar

Install

npm i @gideon/prettier-config

Weekly Downloads

1

Version

1.0.3

License

WTFPL

Unpacked Size

1.67 kB

Total Files

4

Last publish

Collaborators

  • gideon