Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Rafatlne opened this issue Apr 30, 2022 · 0 comments
Open

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

Rafatlne opened this issue Apr 30, 2022 · 0 comments

Comments

@Rafatlne
Copy link

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"]
    }
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant