Skip to content

Instantly share code, notes, and snippets.

@sjy
Last active April 17, 2017 05:44
Show Gist options
  • Save sjy/ae626338282c806a4ab60fc3a72ee294 to your computer and use it in GitHub Desktop.
Save sjy/ae626338282c806a4ab60fc3a72ee294 to your computer and use it in GitHub Desktop.
eslintrc template (react-native) , extends airbnb, [ref](https://www.npmjs.com/package/eslint-config-airbnb)
{
"parser": "babel-eslint",
"env": {
"es6": true,
"node": true,
"jest": true
},
"ecmaFeatures": {
"jsx": true,
"restParams": true,
"spread": true,
"experimentalObjectRestSpread": true
},
"plugins": [
"import",
"babel",
"react"
],
"globals": {
"fetch": true,
"__DEV__": true
},
"extends": "airbnb",
"rules": {
"indent": ["error", 4],
"import/prefer-default-export": 0,
"object-curly-spacing": 0,
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/jsx-filename-extension": [1, {
"extensions": [".js", ".jsx"]
}],
"react/prefer-stateless-function": 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment