Add --suggest-parser command line flag
See original GitHub issueThe --parser
flag tells prettier which parser to use, overriding the auto-detection mechanism.
Could you add a similar --suggest-parser
flag? This flag would tell prettier which parser to use if auto-detection fails.
I believe we need this for editor integration. The format-all plug-in for Emacs lets people format code in unsaved temporary buffers that have no filename. But in this case the plug-in knows which programming language mode is being used in Emacs for the temporary buffer, and can pass the information to prettier.
Related issue/PR:
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Custom command-line flags with flag.Func - Alex Edwards
This makes it much easier to define and use custom command-line flags in your application. For example, if you want to parse a...
Read more >Setting a flag using a command-line argument with Argparse4j
I am using argparse4j to parse command line arguments. I want to add an argument that when present, sets a boolean to true,...
Read more >How to specify command line flags - The Chromium Projects
How to specify command line flags. This page has been merged into the more complete: https://www.chromium.org/developers/how-tos/run-chromium-with-flags.
Read more >Command-Line Flags - Go by Example
Command -line flags are a common way to specify options for command-line programs. ... Go provides a flag package supporting basic command-line flag...
Read more >Declaring Arguments, Options, and Flags | Documentation
Declaring Arguments, Options, and Flags. Use the @Argument , @Option and @Flag property wrappers to declare the command-line interface for your command.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is this what you are looking for?
(Seems we missed this flag in docs, cc @kachkaev https://github.com/prettier/prettier/pull/4341)
Fair enough. Let’s go with
--file-info
.