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.

Setting to specify what .prettierrc to use

See original GitHub issue

We share a .prettierrc between multiple repos by publishing it as an npm module, running prettier with

prettier --config ./node_modules/@sourcegraph/prettierc/.prettierrc

prettier-vscode currently does not have a way to configure that, it will not detect any config for the repo, so we have to duplicate the settings, which defeats the purpose of sharing the config. It would be nice to have a setting "prettier.configPath" like "prettier.ignorePath". I know you don’t like new settings but this one is to avoid having to use the other settings 😉

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
azzcommented, Nov 5, 2017

Workaround, create a .prettierrc with:

module.exports = require('@sourcegraph/prettierc');
1reaction
kutyelcommented, Dec 4, 2017

I don’t know what is the correct behaviour (cause I am biased) but for me is kinda counter-intuitive that prettier itself allows those formats (without changing the extension of the file) and the vscode-extension itself doesn’t. BTW: apart from that, the plugin works perfectly and thanks very much guys for creating it for VSCode! ❤️

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration File - Prettier
Prettier uses cosmiconfig for configuration file support. This means you can configure Prettier via (in order of precedence):.
Read more >
How to configure Prettier and VSCode - Gleb Bahmutov
You can configure JavaScript code auto-formatting with Prettier to work per-project. This allows you to get a consistent formatting without ...
Read more >
visual studio code - prettier settings for vscode - Stack Overflow
7 Answers 7 · Go to FILE -> PREFERENCES -> SETTINGS. (VS Code Menus) · Settings window should open. Above (Top) there is...
Read more >
Prettier setup | Mashup Garage Playbook
How to set up Prettier ... Save a file called .prettierrc in your project's root path. ... Eslint: Use eslint-config-prettier, and add {...
Read more >
How to Add Prettier to a Project - Bits and Pieces
1. Install Prettier · 2. Create a .prettierrc file and add the following · 3. Set up Prettier to ignore certain files ·...
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