Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upFeature request: Node API for 'standard --fix' #640
Comments
feross
closed this
in
5abf020
Sep 26, 2016
This comment has been minimized.
This comment has been minimized.
|
This is already supported! Just pass a |
This comment has been minimized.
This comment has been minimized.
|
I just discovered this 30s ago |
This comment has been minimized.
This comment has been minimized.
|
Sure thing. Also, note that |
This comment has been minimized.
This comment has been minimized.
|
Ah, good to know. I see |
This comment has been minimized.
This comment has been minimized.
|
Oh, I guess you're right! Sorry -- I was speaking from memory. The docs are correct. |
This comment has been minimized.
This comment has been minimized.
|
Just updated the |
stephenkubovic commentedSep 26, 2016
Are there any plans to expose 'standard --fix' in the Node API, something like
standard.fixText()andstandard.fixFilesto go along withlintText()andlintFiles()?I'm currently trying to support
standard --fixin the Atom plugin for standard formatter. Currently the plugin uses the programatic API from standard-format module, but it's sounding likestandard --fixis the way forward so I would like to support this as well (tracking here: standard/atom-standard-formatter#39)Based on the existing functionality of
standard, my approach right now is to--stdinoption in combination with--fixin a child process and handle the transformation that way. Obviously a programatic way would be more intuitive.Let me know your thoughts on this feature (I'd be willing to take a crack at a PR, maybe with a nudge in the right direction and/or agreed API spec).