Skip to content

How to run prettier against changed files using jj fix #4291

Answered by bnjmnt4n
joefiorini asked this question in Q&A
Discussion options

You must be logged in to vote

Here's my Prettier setup:

fix.tools.prettier.command = ["npx", "prettier", "--stdin-filepath=$path"]
fix.tools.prettier.patterns = ["glob:'**/*.tsx'", "glob:'**/*.ts'", "glob:'**/*.jsx'", "glob:'**/*.js'", "glob:'**/*.css'", "glob:'**/*.html'"]

You can use $path, and Prettier should be able to infer the filetype from the pathname.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by joefiorini
Comment options

You must be logged in to vote
2 replies
@bnjmnt4n
Comment options

@joefiorini
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants