Skip to content

Instantly share code, notes, and snippets.

@raivieiraadriano92
Last active March 12, 2018 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raivieiraadriano92/2b3cd36bc4553801fa956cc896e6beb2 to your computer and use it in GitHub Desktop.
Save raivieiraadriano92/2b3cd36bc4553801fa956cc896e6beb2 to your computer and use it in GitHub Desktop.
{
"parser": "babel-eslint",
"env": {
"browser": true,
"jest": true
},
"plugins": [
"react-native",
"jsx-a11y",
"import"
],
"extends": [
"airbnb",
"plugin:react-native/all"
],
"rules": {
"react/jsx-filename-extension": [
"error",
{
"extensions": [
".js",
".jsx"
]
}
],
"global-require": "off",
"no-console": "off",
"import/prefer-default-export": "off",
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}
]
},
"settings": {
"import/resolver": {
"babel-module": {}
}
},
"globals": {
"__DEV__": true
}
}
# run
$ yarn add global eslint
# run
$ npm info "eslint-config-airbnb@latest" peerDependencies
# copy the dependencies that appeared on your terminal and paste them into "devDependencies" in your package.json file
# {
# "eslint": "^4.9.0",
# "eslint-plugin-import": "^2.7.0",
# "eslint-plugin-jsx-a11y": "^6.0.2",
# "eslint-plugin-react": "^7.4.0"
# }
# run
$ yarn
# run
$ yarn add --dev babel-eslint eslint-config-airbnb eslint-plugin-react-native
# create the .eslintrc file as what is attached
# install eslint extension in your editor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment