Replies: 2 comments 6 replies
-
I'm open to this, although this is not really validating the output file, but more like just diffing an emitted file w/ what we're able to extract from the source code. Maybe |
Beta Was this translation helpful? Give feedback.
-
@longlho I've had a discussion with our team to get the go-ahead to do this work. We're doing an MFE kind of system, and we don't want to force developers to use formatjs validate <files> --in-file <file> [--format <format>] [--throws] The validation behaviour would be,
In each of the fail cases, we could print a diff-like message, and the program will exit with a non-zero status if any of these are printed. Does this sound reasonable? |
Beta Was this translation helpful? Give feedback.
-
Some workflows may wish to commit English translations to git. It would be useful to have a
validate
mode - like when linting, running Prettier, or TypeScript's--noEmit
option.What are your thoughts on a
--validate
option, which would be used in conjunction with--out-file
. When both are used, the outfile will be read, and if there are any changes with the new translation set and the existing, the CLI will exit with a non-zero error code, and possibly show differences.We are happy to implement this feature.
Beta Was this translation helpful? Give feedback.
All reactions