question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configuration file support

See original GitHub issue

I think it would be valuable to support for some type of file that contains prettier’s config so that projects can check it in source control.

I can see 2 cases where this would be useful.

  • Allow tools to know that the project is using prettier. I’d like to enable thing like format on save but I don’t want to reformat everyfile I touch on a project that doesn’t use prettier.
  • Allow per project config to avoid the need to change options when changing projects or to have to create custom formating scripts.

Could be it’s own file (something like .editorconfig) or maybe part of package.json.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:69
  • Comments:26 (6 by maintainers)

github_iconTop GitHub Comments

35reactions
jlongstercommented, Jan 11, 2017

We aim to be zero-config. For now at least, I am against this. The few existing config options only exist to help applying to existing projects, and should only be used if you really need to. We will see what happens over time, but for now I’ll point you to https://github.com/jlongster/prettier/issues/40

19reactions
ljharbcommented, Jan 13, 2017

The problem is that not everyone will adopt a tool like this all at once, thus the “generic format” for text needs to match the project’s existing conventions. Disallowing config will mean that adopting prettier is an all-or-nothing approach, unless the project just happens to already comply with the convention prettier chooses, which - for the exact reasons you mention that the ecosystem could benefit from this tool - will prevent adoption of it, on any larger scale.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The 3 Best Config File Formats - Jonathan Hall
There are countless configuration file formats. Some are custom-designed for a ... Go's Viper package supports 6 distinct file formats.
Read more >
What is a configuration file? - Red Hat
A configuration (config) file is code on your computer that allows the selection of various features and settings. It can determine parameters, ...
Read more >
What is configuration file? | Definition from TechTarget
A configuration file, often shortened to config file, defines the parameters, options, settings and preferences applied to operating systems (OSes), ...
Read more >
Configuration file - Wikipedia
In computing, configuration files are files used to configure the parameters and initial settings for some computer programs.
Read more >
What is a config file? - Opensource.com
They allow you to customize how you interact with an application or how an application interacts with the rest of your system. It's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found