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.

"editorconfig" configuration prints an "Ignored unknown option" warning

See original GitHub issue

Adding { "editorconfig": true } to the configuration file, although it works, but prints [warn] Ignored unknown option { editorconfig: true }. (multiple times).

Environments:

  • Prettier Version: 2.7.1
  • Running Prettier via: CLI
  • Runtime: Node.js v16.14.2
  • Operating System: Ubuntu 20.04.4
  • Prettier plugins (if any): –

Steps to reproduce: Add { "editorconfig": true } to .prettierrc.json and run prettier.

Expected behavior: No warn message is printed.

Actual behavior: This message is printed (multiple times): [warn] Ignored unknown option { editorconfig: true }.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
danielpzacommented, Nov 30, 2022

That’s an option of Prettier CLI, not something specified in a config file.

Is there any reason it cannot be specified in the config file? It actually recognizes the option if placed there.

The docs makes no mention of this either https://prettier.io/docs/en/configuration.html#editorconfig

1reaction
thorn0commented, Oct 3, 2022

Indeed, it shouldn’t be there unless I’m missing something. Need to investigate. Thanks for noticing this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignored unknown option { editorconfig: true } #6176 - GitHub
When using the CLI, Prettier always reads .editorconfig if it exists. There is no option. The API function prettier.resolveConfig has an ...
Read more >
invalid -w option ignored: unknown warning category ... - You.com
1 Answer. Module yaml is provided by PyYAML package, so do a pip install PyYAML. However, look at your setup.py, dependencies should be...
Read more >
CLI - Prettier
If a config file is found will evaluate it and ignore other CLI options. If no config file is found, CLI options will...
Read more >
VSCode single to double quote automatic replace
A part a green warning ( Unknown configuration setting ) the single quotes are no more ... this will ignore your .editorconfig file...
Read more >
How to configure Prettier and VSCode - Gleb Bahmutov
Run Prettier from ESLint ... Notice in the screenshot below how ESLint warnings in VSCode editor include style errors from Prettier. ... If...
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