CLI: add a `recursive` option
See original GitHub issueEnvironments:
- Prettier Version: 1.19.1
- Running Prettier via: CLI
- Runtime: Node.js v12.5.0
- Operating System: macOS Cataline 10.15.1
Steps to reproduce:
My request is about a recursive
option.
$ prettier --write *
only fixes the first-level files and does not read any other files that are in sub-directories.
Expected behavior:
# Reads all sub-directories and first-level files and fixes them.
$ prettier --write --recursive *
Actual behavior:
$ prettier --write *
index.js 84ms
$ tree
.
├── index.js
├── app
│ ├── controllers
│ │ ├── authentication.js
│ │ ├── healthcheck.js
│ │ ├── index.js
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Add Recursive option in command line interface - Blueprints
This option improve the command line interface with file's selection in directories recursively. -r, --recursive. Select subdirectories ...
Read more >recursive or --all parameter to get files in nested folders · Issue ...
Complete the table below with the options used on this command. A short (single character) and long version of the option should be...
Read more >Why do we need to use the recursive option to remove or copy ...
rm -r : recursively remove subdirectories. The way the rm -r option was implemented at that time, when rm encountered a directory among...
Read more >Using high-level (s3) commands with the AWS CLI
Use the high-level Amazon S3 commands in the aws s3 namespace to manage buckets and objects using the AWS Command Line Interface (AWS...
Read more >Add files - Helix Core Command-Line (P4) Guide - Perforce
To add files recursively, use the Helix Server ... wildcard. A similar approach is to use the p4 reconcile -a * command. The...
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
@sregg I guess your shell expands the glob, not Prettier. Try adding quotes around the glob.
Your command only works for top- and second- level files (files located in a sub directory).