learnwithsumit/think-in-a-react-way

Formatting not working on ".js", ".jsx" files.

Rafatlne opened this issue · 0 comments

If you are having trouble auto-format on code save in VSCode, you might have to change some settings.

  • Add below the line on the package.json script section
"lint": "yarn add -D prettier && yarn add -D @babel/eslint-parser && npx install-peerdeps --dev eslint-config-airbnb && yarn add -D eslint-config-prettier eslint-plugin-prettier"
  • Add the below line on .eslintrc.
  "parser": "@babel/eslint-parser",
  "parserOptions": {
    "ecmaVersion": 8,
    "requireConfigFile": false,
    "babelOptions": {
      "presets": ["@babel/preset-react"]
    }
  },