Skip to content

Instantly share code, notes, and snippets.

@scroobius-pip
Forked from Pepeye/eslint.config.md
Created November 10, 2016 02:15
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 scroobius-pip/79d293df73d50d13ad0746f2a02cfbeb to your computer and use it in GitHub Desktop.
Save scroobius-pip/79d293df73d50d13ad0746f2a02cfbeb to your computer and use it in GitHub Desktop.
Setup ES6+Babel+JSX Linting with Atom/Nuclide

Setup ES6+Babel+JSX Linting with Atom/Nuclide

This sets up Atom to properly lint ES6+Babel+JSX using Airbnb's .eslintrc as a starting point.

Steps

  1. Download Atom and get these two packages: Linter and [Linter-ESLint)(https://atom.io/packages/linter-eslint)
  2. Run npm i -D eslint eslint-config-airbnb babel-eslint eslint-plugin-babel eslint-plugin-react eslint-plugin-react-native eslint-plugin-import eslint-plugin-jsx-a11y from your project root.
  3. Add "extends": "airbnb" to your .eslintrc and "plugins": [ "babel", "react", "react-native", "jsx-a11y" ]
  4. Run apm install linter-eslint this also installs linter which clashes with nuclide diagnostics
  5. Run apm disable linter to stop the linter clashing with nuclide

See Airbnb's Javascript styleguide and the ESlint config docs for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment