1

I would like to configure Prettier within the WebIDE, so far without success.

In my package.json file, I have the following settings:

"scripts": {
    "format": "prettier --write \"webapp/**/*.{js,css,json}\""
},
"devDependencies": {
  "prettier": "^1.14.3",
  "eslint": "^5.7.0",
  "eslint-plugin-prettier": "^3.0.0",
  "eslint-config-prettier": "^3.1.0" //Here I get ESLint error cannot find module
}

Then, in my .eslintrc.json file:

"extends": ["eslint:recommended", "prettier"]

This is not really working, my goal is to format according to Prettier when I save a file (similar to the "beautify code" option in the web IDE code editor settings, which is now switched off).

I tried cleaning the npm folder and building again, but nothing happens.

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170

0 Answers0