Skip to content

Instantly share code, notes, and snippets.

@edygar
Last active November 21, 2017 11:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edygar/4d5e0b5c0f54ec42a52e70171d0024cb to your computer and use it in GitHub Desktop.
Save edygar/4d5e0b5c0f54ec42a52e70171d0024cb to your computer and use it in GitHub Desktop.
Eslint + Prettier

Usage

Install dependencies locally

npm install -D eslint eslint-config-airbnb eslint-config-prettier eslint-plugin-import prettier eslint-plugin-prettier eslint-plugin-jsx-a11y eslint-plugin-react flow-bin 
{
"eslintConfig": {
"extends": [
"airbnb",
"prettier",
"prettier/flowtype",
"prettier/react"
],
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": [
"error",
{
"semi": false,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"parser": "flow"
}
],
"react/prop-types": 2,
"react/jsx-filename-extension": 0,
"react/prefer-stateless-function": 1
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment