prettier-package-json icon indicating copy to clipboard operation
prettier-package-json copied to clipboard

Respect editorconfig instead needing to use `--use-tabs`

Open allejo opened this issue 3 years ago • 3 comments

Instead of relying on the user to manually use --use-tabs or useTabs, can this tool respect an existing .editorconfig's configuration as prettier itself, does?

allejo avatar Aug 03 '20 00:08 allejo

Good idea. Is there a package that will parse prettier and editorconfig files that can be used?

cameronhunter avatar May 06 '21 02:05 cameronhunter

Prettier uses cosmiconfig for configuration file support.

Source: https://prettier.io/docs/en/configuration.html

There doesn't seem to be a "one package fits all" for this scenario. Prettier uses a combination of cosmiconfig for its own configuration file and editorconfig for its handling of .editorconfig files.

allejo avatar May 10 '21 04:05 allejo

I recently added cosmiconfig, I can look into editorconfig. Of course, contributions are welcome too!

cameronhunter avatar May 10 '21 04:05 cameronhunter