-
Notifications
You must be signed in to change notification settings - Fork 132
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
Migrate stylelint to latest version #2292 #2425
Migrate stylelint to latest version #2292 #2425
Conversation
Add dependency "stylelint-config-recommended-vue" Fix syntax to obey new rules
Looks correct on my end. For the indentation rule can you check on whether we can get a replacement?
I dun think so? We still run
I agree that if you can fix and ensure that this new style is standardised in current code base then it is good to go.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2425 +/- ##
=======================================
Coverage 48.92% 48.92%
=======================================
Files 124 124
Lines 5245 5245
Branches 1110 1110
=======================================
Hits 2566 2566
Misses 2371 2371
Partials 308 308 ☔ View full report in Codecov by Sentry. |
@@ -27,8 +27,7 @@ pre.hljs > code { | |||
background: none; | |||
} | |||
|
|||
pre > code.hljs { |
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.
Most of these lint changes look like lint changes -> but this one confuses me, because it seems to just remove the -webkit-background-clip ? Any idea of the reason for this?
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.
...Answered my own question: here are the links to read about it:
Stylelint removes vendor prefixes
this is a danger for specific properties... eg background-clip: text ... but this particular case doesn't seem to be an issue
Background reading on vendor prefixing: Is vendor prefixing dead?
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.
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.
The understanding I have is that when this code was written, the browsers required prefixing for these due to not supporting the properties unprefixed. Stylelint relies on autoprefixer, an open source project that automatically adds prefixes when needed.
The implication here is that the prefixes are no longer needed due to them being supported by the browser at this point, though they were not supported in the past.
Hence, assuming there is no change in behaviour, I think we should keep the rule and change the CSS.
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.
Oh! However do remove the comments "for safari" / references to other browsers, as these are no longer relevant.
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.
Oh I think you are right, for now since browsers do not require vendor prefixes, I think the line background-clip: padding-box
would be enough to accommodate all browsers.
I have removed the unnecessary comments.
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.
LGTM - I don't love how many changes there are, but I suppose it is somewhat expected with a linting tool. Will wait before merging in case I've missed something.
Would you also add "Fixes #2292" to the PR description? This allows us to auto-close the issue and links the issue in the body so it easier for the reviewers! |
Added! |
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.
Hi @LamJiuFong thank you very much for the good work!
One minor nit and one issue with the tooltip styling
@@ -71,9 +71,9 @@ export default { | |||
</script> | |||
|
|||
<style> | |||
.v-popper--theme-tooltip .v-popper__inner { | |||
.v-popper-theme-tooltip .v-popper-inner { |
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.
This seems to be having unexpected effects - the styling doesn't apply to the tooltip anymore.
You can try modifying the font size to something huge and then removing the one of the dashes, you realise the font change doesn't apply.
Can we keep the old version? Will it automatically change every time the linter is run?
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.
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.
LGTM! Thanks for the work @LamJiuFong :)
What is the purpose of this pull request?
Fixes #2292
Overview of changes:
Migrate stylelint to latest version ^16.0.0
Add devdependency "stylelint-config-recommended-vue"
Add plugin @stylistic/stylelint-plugin
Add dependency postcss@^8.4.35
Fix syntax to obey new rules
Anything you'd like to highlight/discuss:
Added a comment below
Testing instructions:
Proposed commit message: (wrap lines at 72 characters)
Migrate stylelint to v16.0.0
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major
,r.Minor
,r.Patch
.Breaking change release note preparation (if applicable):