jshint / fixmyjs

Automatically fix silly lint errors.
http://fixmyjs.com
Other
972 stars 78 forks source link

CLi option to output to a different file #119

Open mcdado opened 10 years ago

mcdado commented 10 years ago

When used from command line, fixmyjs always works in-place, overwriting the file passed to. While it's arguable if that's the right approach, how about just adding a flag like -o to specify the output file, something that tools like js-beautify do?

goatslacker commented 10 years ago

Sure, I'd merge a PR like that :)

You'd have to keep in mind that fixmyjs operates on files as well as directories and I believe it's recursive by default.

mcdado commented 10 years ago

I hope this contribution is good enough… https://github.com/jshint/fixmyjs/pull/120

goatslacker commented 9 years ago

this should probably operate on directories since that's how the cli currently works, it should use something like mkdirp to create directories if they don't exist.