(Part 4. Config .eslintrc.json) Startup JavaScript Project with Webpack4, Vue2, Vue-Router, Vuex, Axios, ESLint, Babel, AirBnb


  • .eslintrc.json (DON'T use .eslintrc as file name. See here.)
.eslintrc.json
{
  "root": true,
  "parserOptions": {
    "parser": "babel-eslint",
    "ecmaVersion": 2017
  },
  "env": {
    "browser": true,
    "node": true,
    "es6": true
  },
  "extends": [
    "airbnb-base",  <-- We used airbnb coding style.
    "plugin:vue/essential"   <-- This setting is for Vue2.
  ],
  "plugins": [
    "vue"
  ],
  "settings": {
    "import/resolver": {
      "webpack": {
        "config": "webpack.common.js"  <-- This let us can used "import foo from '@/foo/foo';" instead of "import foo from '../../foo/foo';"
      }
    }
  }
}

Part 6. Config index.html

Part 5. Config .stylelintrc.json

Part 4. Config .eslintrc.json

Part 3. Config .babelrc

Part 2. Config Webpack4

Part 1. Install package.json

Github : Vue2-Starter-Kit