Skip to content

Angel-Studios/prettier-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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"
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published