Created
June 25, 2017 01:29
-
-
Save kwokhou/ff8251160121c4b85773752c118b5b14 to your computer and use it in GitHub Desktop.
Basic Eslint config for React using Airbnb style rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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