Skip to content

Instantly share code, notes, and snippets.

@yingray
Created April 3, 2018 09:11
Show Gist options
  • Save yingray/8a94861e0abdda7c5f226ad7d330f33f to your computer and use it in GitHub Desktop.
Save yingray/8a94861e0abdda7c5f226ad7d330f33f to your computer and use it in GitHub Desktop.
Airbnb ESlint configuration
{
"extends": ["eslint:recommended", "airbnb"],
"env": {
"browser": true,
"node": true,
"es6": true,
"mocha": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": 0,
"no-cond-assign": ["error", "always"],
"no-console": "off",
"object-curly-spacing": 0
}
}
yarn add -D eslint \
babel-eslint \
eslint-config-airbnb \
eslint-plugin-import \
eslint-plugin-jsx-a11y \
eslint-plugin-react
@yingray
Copy link
Author

yingray commented Apr 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment