-
Notifications
You must be signed in to change notification settings - Fork 0
Replace gulp-sass-lint with gulp-postcss / stylelint #105
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull request overview
This PR replaces the unmaintained gulp-sass-lint package with a modern stylelint-based linting solution using gulp-postcss and stylelint. The change includes a default configuration that disables many rules to maintain compatibility with existing projects while allowing individual plugins to override settings via their own .stylelintrc.json files.
Changes:
- Removed dependency on deprecated
gulp-sass-lintand addedstylelint,postcss-scss, and related packages - Updated the SCSS linting task to use postcss pipeline with stylelint
- Added a default stylelint configuration with many rules disabled for backward compatibility
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tasks/lint.js | Updated lintScssTask to use postcss/stylelint instead of gulp-sass-lint, with support for custom config files |
| package.json | Removed gulp-sass-lint dependency and added stylelint, postcss-scss, and stylelint-config-standard-scss |
| lib/lintfiles/.stylelintrc.json | Added default stylelint configuration extending standard SCSS config with many rules disabled |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Issue: https://godaddy-corp.atlassian.net/browse/MWC-17960
Summary
This replaces the unmaintained
gulp-sass-lintwithgulp-postcss/stylelint. It also adds a lint config, which disables a ton of rules just to avoid suddenly switching to this method and ending up with a ton of warnings you didn't have before. IMO it's up to individual plugins to override these lint rules (supported).To override:
Create a new
.stylelintrc.jsonfile in plugin directory with desired rules.Update sake config:
QA
sake lint:scsssake compile:scss