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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Omit severity
for removing the warning from prettier
#10
Omit severity
for removing the warning from prettier
#10
Conversation
Thanks for spotting this. In retrospect, What I really should have is done is have the prettierrc config as a key in those secondary options, rather than treating the whole block as options to pass to prettier. As it currently stands I've backed myself into a corner and made it impossible to add additional options, along with causing the headache having to extract out the built-in options you've spotted. Changing the config like below is easily fixable but will review a major version bump as it'll be a breaking change. Current (problematic as it requires extracting severity and message from the prettier options):
Future (better as you don't need to extract their builtins):
In the mean time lets go with your solution of extracting out those common options. I've got a few requested changes:
|
Hi! thanks for the reply 馃樃
You're right. Sounds better 馃憤
Right. I'll fix that too 馃樃
Sure, my bad that it wasn't there in the first place 馃憤
Yup. That was the first thing I tried, but unfortunately the stylelint-prettier/package.json Lines 47 to 49 in 0782dce
This can be changed as well, but probably should be considered as a breaking change too |
}, | ||
}); | ||
|
||
return linted.then(() => { |
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.
no native async await in Node 6 as well 馃
Thanks again @Schniz. I've published this as v1.0.4. |
Hey! Thanks for this package 馃樃
Right now, all options are passed automatically right from the
stylelint-prettier
rule into prettier itself.That causes a warning if you pass something that is related to stylelint only, like
severity
, So the following line actually raises a warning:This warning can be avoided, so this PR fixes it by omitting
severity
. Figuring out which keys should be allowed may be problematic if Prettier will change its API, but I guess thatseverity
is something that won't be there anyway because it's not a linter.What do you think?
馃樃