@angel-studios/prettier-config
v1.0.8
Published
Angel Studios Prettier config
Downloads
919
Readme
@Angel-Studios/prettier-config
Angel Studios Prettier config.
Caution
If you are importing global styles, create one file that imports all of the others in the preferred order so that the order sorting plugin doesn't put them in the incorrect order.
Usage
Install:
$ npm install -D prettier @angel-studios/prettier-config @trivago/prettier-plugin-sort-imports
or
$ yarn add --dev prettier @angel-studios/prettier-config @trivago/prettier-plugin-sort-imports
Edit package.json
:
{
// ...
"prettier": "@angel-studios/prettier-config"
}
Configuring with eslint
$ npm install -D eslint-config-prettier eslint-plugin-prettier
or
$ yarn add --dev eslint-config-prettier eslint-plugin-prettier
Edit eslintrc.js
:
{
// ...
"extends": [
// ...
'prettier'
],
"plugins": [
// ...
'prettier':
],
"rules": [
// ...
'prettier/prettier': 'error'
]
}
Setup lint-stages / husky
Follow the steps below to setup lint-staged / husky and enable prettier running on every commit!
https://github.com/okonet/lint-staged
Edit package.json
{
// ...
"lint-staged": {
"*.js": [
"eslint --cache --fix"
],
"*.{js,css,md}": "prettier --write"
}
}