Skip to content

Instantly share code, notes, and snippets.

@lideo
Last active May 5, 2020 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lideo/1efc342f86a55ce708eace93a6e09094 to your computer and use it in GitHub Desktop.
Save lideo/1efc342f86a55ce708eace93a6e09094 to your computer and use it in GitHub Desktop.
Configure ESlint + Prettier per project.
{
"extends": [
"airbnb",
"prettier"
],
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": [
"error"
]
}
}
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 70
}
yarn add -D prettier eslint eslint-config-prettier eslint-plugin-prettier

Install the Airbnb configuration package.

This package provides Airbnb's .eslintrc as an extensible shared config. It means you can add "prettier" to the list of "extends" in your .eslintrc.

It will detect your are using yarn.

npx install-peerdeps --dev eslint-config-airbnb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment