Moon Light Box

Time is Money

JavaScript - Airbnb ESLint

| Comments

# 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
# vim .eslintrc.json
    "extends": "airbnb",
    "parser": "babel-eslint",
    "rules": {
        "strict": 0



comments powered by Disqus