ArmandFrvr
ArmandFrvr

Reputation: 127

Should package.json be included in .prettierignore file?

Configuring Prettier for the first time and I understand that things like build/deploy files and node_modules (obviously) should be ignored, as well as auto-generated files like package-lock.json. What about package.json? It's partially auto generated but people also go in and edit it manually, so I think there is value in running Prettier on it. Any other best practices for what to include/not include in the ignore file? I'm assuming submodules should be left in once Prettier has been run on the submodule.

Upvotes: 1

Views: 1313

Answers (1)

Dallas Baker
Dallas Baker

Reputation: 376

I would recommended to allow prettier and other linters to read/lint package.json.

You want to keep things tidy and consistent. Rule of thumb is if it's not autogenerated then go ahead.

Upvotes: 4

Related Questions