【React】AtomでESLintを使う

Lecture11の内容

$ yarn add eslint eslint-plugin-react

./node_modules/.bin/eslintにファイルが入っている

設定ファイルを作成。答え方は以下のように。

./node_modules/.bin/eslint --init
? How would you like to configure ESLint? Use a popular style guide
? Which style guide do you want to follow? Airbnb
? Do you use React? Yes
? What format do you want your config file to be in? JavaScript

Atom > Install Shell Commandsでapmコマンドを使えるようにする。

$ apm install es6-javascript intentions busy-signal linter-ui-default linter linter-eslint

「⌘+オプション+Ctrl+A」でリフレッシュしてESLintを有効化