-
-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add autofix support for stdin input #2787
Conversation
@mahmost Thanks! |
Since maintainers seem busy at the moment .. I'm willing to add some more information to help reviewing the PR Here is what was done :
Other additions and consideration that was NOT done in this PR :
P.S. Closing the PR was by mistake (sorry for that) |
lib/standalone.js
Outdated
return prepareReturnValue([stylelintResult]); | ||
const returnValue = prepareReturnValue([stylelintResult]); | ||
const postcssResult = stylelintResult._postcssResult; | ||
// If we're fixing the output should be the fixed code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// If we're fixing, the output should be the fixed code
the added comma here helps readability
Thanks @mahmost, see the above for one change to the code comment and I'd like to see a few more tests added if you could please? I'm thinking in particular a test or two thats tests the output formatting when |
Good day |
@mahmost friendly ping |
i'm working on this now. |
@ntwb afaict there aren't |
@mahmost Thanks! |
@stylelint/core ping - sorry for the wide net, can anyone respond to the above comments? would love to get this going forward. |
As the autofixed rules are minimal for now and none of them affect things like line breaks, I recommend we merge with the single test and address any issues that crop up moving forward. Any thoughts @ntwb ? @modosc With stale PRs (and simple changes) I usually make them myself and push to the contributors branch (if possible) or open a new PR. In this case would you like to do the honours? |
Sorry for not giving this enough time, this commit addresses the requested comment change, and handles ignored files (by not returning anything if filename supplied via --stdin-filename is ignored) |
let's go ahead with this and once we start fixing newlines we can add appropriate tests (i understand the concern around the output in that case for sure). |
#2710
No, it's self explanatory.