Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"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