-2

I got an error in prettier. how to solve this issue?

Martin
  • 628
  • 1
  • 9
  • 28
user14646450
  • 1
  • 1
  • 3

1 Answers1

0

It looks like, for whatever reason, there is no configuration file for prettier in the place it is looking for it, namely your root folder.

I would check if a ~\.prettierrc.js file exists, by typing cd ~\ && dir /ah and see if .pretterrc.js shows up. If not, create that file and copy this:

module.exports = {
  trailingComma: "es5",
  tabWidth: 4,
  semi: false,
  singleQuote: true,
};

which is just the default configuration found here: https://prettier.io/docs/en/configuration.html

Qrow Saki
  • 932
  • 8
  • 19