LoginSignup
0
0

More than 5 years have passed since last update.

JavaScript - Setup Airbnb ESLint for React

Last updated at Posted at 2017-10-25
# yarn add -D eslint babel-eslint
# yarn add -D eslint-config-airbnb eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y
# eslint.js --init
? How would you like to configure ESLint? Answer questions about your style
? Are you using ECMAScript 6 features? Yes
? Are you using ES6 modules? Yes
? Where will your code run? Browser, Node
? Do you use CommonJS? No
? Do you use JSX? Yes
? Do you use React? Yes
? What style of indentation do you use? Spaces
? What quotes do you use for strings? Single
? What line endings do you use? Unix
? Do you require semicolons? Yes
? What format do you want your config file to be in? JSON
.eslintrc.json
{
    ...
    "extends": "airbnb",
    ...
    "parser": "babel-eslint",
    ...
    "rules": {
        ...
        "strict": 0
        ...
    }
}

https://github.com/babel/babel-eslint
https://github.com/airbnb/javascript
https://denny.qollie.com/2016/07/11/eslint-fxcking-setup/
http://seans.tw/2016/eslint-with-airbnb/
http://le0zh.github.io/2016/06/21/eslint+in+react+babel+webpack/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0