sziir
sziir

Reputation: 41

Prettier extension is not working in vs code Require config set to true

Prettier extension is not working I set it by default and format on save he give me an error: "Require config set to true and no config present. Skipping file."

Upvotes: 3

Views: 5886

Answers (2)

Raydot
Raydot

Reputation: 1586

That disables the warning without solving the problem.

You're missing a Prettier configuration file.

There are a lot of ways to install one, but the simplest way is described in the Prettier Documentation, which suggests creating a file at root called .prettierrc.js with the following module inside:

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

There are a LOT more options to configure, and a Google search will show you existing templates like the one used by AirBnB.

Upvotes: 2

Kiron Paul
Kiron Paul

Reputation: 205

enter image description here

ctrl + , in vscode,then paste it Prettier: Require Config and unchecked the option.

Upvotes: 7

Related Questions