Open soleo opened 3 months ago
I'm not sure if I agree here. Don't get me wrong, I love TypeScript. But generated files should probably rather get ignored instead of linted (or formatted). Every user has a different lint configuration and there will probably always be a rule that is too strict for the generated file. I think it's not reasonable, or even possible, to write the output file in a way that every possible linting rule is happy. Maybe consider ignoring the generated files in your eslint config, instead.
For our organization use case, we usually generate the mocks by running
If we don't ingnore eslint for this file, we always end up with the following complaint.
I'd propose another new
option('-s, --typescript', 'Generate TypeScript code.')
for generating more strict typed mocks. If it is a good idea, I'd like to help get a PR done as well.