Skip to content

Instantly share code, notes, and snippets.

@michaelerobertsjr
Last active February 12, 2017 19:03
Show Gist options
  • Save michaelerobertsjr/634dd2f37fa74bec83c10e6b6e9c86a6 to your computer and use it in GitHub Desktop.
Save michaelerobertsjr/634dd2f37fa74bec83c10e6b6e9c86a6 to your computer and use it in GitHub Desktop.
ESLint and Atom Installation and setup instructions

ESLint

ESLint is an open source project originally created by Nicholas C. Zakas in June 2013. Its goal is to provide a pluggable linting utility for JavaScript. Adding it to all your projects and setting up a linter plugin in your code editor may help you write more maintainable code.

Installation

"devDependencies": {
    "babel-eslint": "^7.1.1",
    "eslint": "^3.15.0",
    "eslint-config-airbnb": "^14.1.0",
    "eslint-plugin-import": "^2.2.0",
    "eslint-plugin-jsx-a11y": "^2.2.3",
    "eslint-plugin-react": "^6.9.0"
}
  • Install the dependencies:
npm install
  • In your project folder create a .eslintrc file. It is recommended that you follow the AirBnB style guide. When writing ES5 Javascript add the following:
{
  "extends": "airbnb/legacy",
  "rules": {
    "no-plusplus": 0
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment