Skip to content

Instantly share code, notes, and snippets.

@rafaellincoln
Created April 5, 2018 17:35
Show Gist options
  • Select an option

  • Save rafaellincoln/67ec78623de91348919a19f8d0cbc9ac to your computer and use it in GitHub Desktop.

Select an option

Save rafaellincoln/67ec78623de91348919a19f8d0cbc9ac to your computer and use it in GitHub Desktop.
Tutorial instalação lint airbnb

Instalar os seguintes pacotes como dev.

- babel-eslint
- babel-plugin-transform-replace-object-assign
- babel-preset-airbnb
- babel-preset-react-native-stage-0
- eslint
- eslint-config-airbnb
- eslint-plugin-import
- eslint-plugin-jsx-a11y

Criar arquivo chamado .eslintrc e incluir o seguinte conteudo.

{
  "extends": "airbnb",
  "parser": "babel-eslint",
  "rules": {
    "semi": [2, "never"],
    "react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx"] }],
    "react/forbid-prop-types": ["error", { "forbid": [] }],
    "jsx-a11y/href-no-hash": "off",
    "jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }],
    "no-underscore-dangle": "off"
  },
  "globals": {
    "__DEV__": true,
    "it": true,
    "expect": true,
    "jest": true,
    "navigator": true,
    "fetch": true
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment