Skip to content
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

Sass: remove redundant stylelint inline suppressions. #29427

Merged
merged 1 commit into from Sep 26, 2019

Conversation

XhmikosR
Copy link
Member

selector-max-universal is set to 1 in our stylelint config upstream BTW.

-rd works fine as long as one clears the local cache folder. But perhaps we should enable it anyway?

@XhmikosR XhmikosR requested a review from a team as a code owner September 20, 2019 13:01
@XhmikosR XhmikosR added this to Inbox in v5 via automation Sep 20, 2019
@MartijnCuppens
Copy link
Member

What is -rd?

@XhmikosR
Copy link
Member Author

XhmikosR commented Sep 20, 2019

--report-needless-disables, --rd

  Also report errors for stylelint-disable comments that are not blocking a lint warning.
  The process will exit with code 2 if needless disables are found.

--report-invalid-scope-disables, --risd

  Report stylelint-disable comments that used for rules that don't exist within the configuration object.
  The process will exit with code 2 if invalid scope disables are found.

@MartijnCuppens
Copy link
Member

selector-max-universal is set to 1 in our stylelint config upstream BTW.

Any idea why stylelint isn't failing with the current scss than? We do have more than one universal selector.

@XhmikosR
Copy link
Member Author

XhmikosR commented Sep 21, 2019

We do have more than one universal selector.

In the same selector?

@MartijnCuppens
Copy link
Member

Ok, never mind, the documentation states:

Limit the number of universal selectors in a selector.

I thought it was about the global number of universal selectors, now I get it why that statement was moot.

-rd works fine as long as one clears the local cache folder.

What happens if the local cache folder isn't cleared? Can we get false results?

@XhmikosR
Copy link
Member Author

Yeah, I definitely get false results. I mean, stuff that can be removed but are not flagged as such. But on CI this will fail properly.

package.json Outdated
@@ -24,7 +24,7 @@
"css": "npm-run-all css-compile css-prefix css-minify",
"css-compile": "node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist/css/",
"css-lint": "npm-run-all --continue-on-error --parallel css-lint-*",
"css-lint-stylelint": "stylelint \"**/*.{css,scss}\" --cache --cache-location .cache/.stylelintcache",
"css-lint-stylelint": "stylelint \"**/*.{css,scss}\" --cache --cache-location .cache/.stylelintcache--report-needless-disables",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't a space necessary before the --report-needless-disables?

I tried run npm run lint after fix this and remove my .cache folder, but stylelint reported a lot of errors:

image
and more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops, the space should be there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But yeah, I see now the issue, hence why i hadn't enabled it before :)

I'll drop it for now.

@XhmikosR XhmikosR force-pushed the master-xmr-stylelint-rd branch 2 times, most recently from 91b6ac6 to 770db73 Compare September 26, 2019 16:21
v5 automation moved this from Inbox to Approved Sep 26, 2019
@XhmikosR XhmikosR merged commit de3a373 into master Sep 26, 2019
v5 automation moved this from Approved to Shipped Sep 26, 2019
@XhmikosR XhmikosR deleted the master-xmr-stylelint-rd branch September 26, 2019 18:50
lucanos pushed a commit to lucanos/bootstrap that referenced this pull request Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v5
  
Shipped
Development

Successfully merging this pull request may close these issues.

None yet

3 participants