Skip to content

Instantly share code, notes, and snippets.

@vitalbone
Last active June 28, 2018 17:20
Show Gist options
  • Save vitalbone/f58f87c1d9e276f0239d to your computer and use it in GitHub Desktop.
Save vitalbone/f58f87c1d9e276f0239d to your computer and use it in GitHub Desktop.
Configuring eslint for Atom

Configuring eslint for Atom

Dan Abramov does a really good job explaining why and how in 'Lint Like It’s 2015'

For the tl;dr version

// install atom's linter && linter-eslint
apm install linter
apm install linter-eslint

// uninstall the global if you have it
npm uninstall -g eslint

// in your local directory
npm i --save-dev eslint@latest
npm i --save-dev babel-eslint@latest
npm i --save-dev eslint-plugin-react

package.json

...
"scripts": {
    "lint": "eslint src"
  },
  "devDependencies": {
    "babel-eslint": "^4.0.5",
    "eslint": "^1.0.0",
    "eslint-plugin-react": "^3.2.0"
  },
  "plugins": [
    "react"
  ]
  ...

.eslintrc

{
  "parser": "babel-eslint",
  "rules": {
    "strict": 0,
    "no-unused-vars": [2, {"vars": "all", "args": "after-used"}]
  }
}

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