-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fmt: respect prettierrc and prettierignore #3346
Conversation
break; | ||
case ".yml": | ||
case ".yaml": | ||
// TODO: Unimplemented loading yaml / yml configuration file yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are currently no libraries for yml parser in std.
/cc @ry I think it is ready for review. |
try { | ||
const output = await import( | ||
// TODO: Remove platform condition | ||
// after https://github.com/denoland/deno/issues/3355 fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref #3355
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
A small headsup for people ending up here while searching for a way to modify deno fmt behaviour. Prettier seems to no longer be used: #3820 |
close #3276
Docs
https://prettier.io/docs/en/configuration.html
https://prettier.io/docs/en/ignore.html
Goal
.prettierrc.yaml.prettierrc.yml./target/release/deno fmt *.ts --prettierrc=./path/to/.prettierrc.json
./target/release/deno fmt *.ts --ignore-path=./path/to/.prettierignore
What's new?
1. add
--prettierrc
flag fordeno fmt
with optional value:
auto/disable/filepath
.auto: Auto detect prettier configuration file in current working dir.
disable: Disable load configuration file.
filepath: Load specified prettier configuration file. support .json/.toml/.js/.ts file
Defaults to auto
2. add
--ignore-path
flag fordeno fmt
with optional value:
auto/disable/filepath
.auto: Auto detect .pretierignore file in current working dir.
disable: Disable load .prettierignore file.
filepath: Load specified prettier ignore file.
Defaults to auto
Current
deno fmt --help
output