Babel

https://btholt.github.io/complete-intro-to-react-v6/babel

$ npm install -D @babel/[email protected] @babel/[email protected]


.babelrc


{
  "presets": [
    [
      "@babel/preset-react",
      {
        "runtime": "automatic"
      }
    ]
  ]
}


$ npm install --save-dev babel-eslint


.eslintrc

"parser": "babel-eslint",


Additional Class Properties (If needed)

https://btholt.github.io/complete-intro-to-react-v6/class-properties


$ npm install -D @babel/plugin-proposal-class-properties @babel/preset-env @babel/eslint-parser


.babelrc

{
  "presets": [
    [
      "@babel/preset-react",
      {
        "runtime": "automatic"
      }
    ],
    "@babel/preset-env"
  ],
  "plugins": ["@babel/plugin-proposal-class-properties"]
}


.eslintrc.json

{
  …
  "parser": "@babel/eslint-parser",
  …
}