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 environment variable PRETTIERD_DEFAULT_CONFIG doesn't appear to do anything

See original GitHub issue

.prettierrc.json

{
    "tabWidth": 4,
    "overrides": [
        {
            "files": [
                "*.yaml",
                "*.yml"
            ],
            "options": {
                "tabWidth": 2
            }
        }
    ]
}

Running cat /tmp/test.yaml | prettierd test.yaml (PRETTIERD_DEFAULT_CONFIG environment variable set to where .prettierrc.json is located) doesn’t work but when test.yaml is in same directory as .prettierrc.json it works

Also doesn’t work when I use the same config as https://github.com/fsouza/prettierd#editor-integration for efm-langserver + neovim lsp

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
zeitchefcommented, Jun 24, 2021

Thanks for the tip @petertriho - that seemed to fix it. @fsouza Thanks so much for all your help and hard work on this great project!

2reactions
petertrihocommented, Jun 23, 2021

@zeitchef You probably need to restart the prettierd process

ps aux | grep prettierd
kill <process number>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Prettier vscode extension ignoring config files - Stack Overflow
In VS Code press Ctrl + shift + p to open command palette then chose. Preferences: Open Settings(JSON) and add the line among...
Read more >
How to configure Prettier and VSCode - Gleb Bahmutov
This blog post shows how to configure Prettier to work from command line, from VSCode and from Git hooks. You can find the...
Read more >
Is there a way to set global configuration? · Issue #98 · prettier ...
Just put it to PATH and use prettier-config instead of prettier and it will read cli options from the project's .prettieropts file. The...
Read more >
Options - Prettier
Ensure Prettier's endOfLine option is set to lf (this is a default value since v2.0.0) · Configure a pre-commit hook that will run...
Read more >
How can I change the prettier settings?
If you have prettier installed locally in your project, it must be your project package.json (or prettier config file - https://prettier.io/docs ...
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