Skip to content

Instantly share code, notes, and snippets.

@kwokhou
Created June 25, 2017 01:29
Show Gist options
  • Save kwokhou/ff8251160121c4b85773752c118b5b14 to your computer and use it in GitHub Desktop.
Save kwokhou/ff8251160121c4b85773752c118b5b14 to your computer and use it in GitHub Desktop.
Basic Eslint config for React using Airbnb style rules
{
"parser": "babel-eslint",
"env": {
"browser": true
},
"ecmaFeatures": {
"jsx": true
},
"extends": [
"airbnb"
],
"plugins": [
"react",
"jsx-a11y",
"import"
],
"rules": {
// allow both '.jsx' and '.js' for react component
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
// allow define styles at the botom of component (when using React Native)
"no-use-before-define": 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment