DEV Community

Cover image for Python - A beautiful language without prettier!
Bek Brace
Bek Brace

Posted on

Python - A beautiful language without prettier!

Prettier is an opinionated code formatter and ensures that the code I was working on is as hellish as it was not originally intended to be.

If you are working in a big team and want consistent code formatting without manual intervention(code reviews), I might recommend Prettier, but if you are working alone like myself then I wouldn't.

Prettier is available as VSCode extension which can be enabled and it automatically take cares of formatting. You could even set preference when to format the file i.e. on file save or when you paste text etc.

Now the first option is to disable the VSCode extension. I am sure this is not what you are looking for as it is pain to enable and disable the extensions every time you switch projects.

Other option is to enable Prettier only when a configuration file is present in the project. To enable this option open VSCode settings

On Windows/Linux - File > Preferences > Settings
On macOS - Code > Preferences > Settings
Search for Prettier:Require Config and make sure it is checked

Prettier:Require Config

Top comments (0)