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

build: use stylelint #1836

Open
wants to merge 4 commits into
base: gh-pages
Choose a base branch
from
Open

build: use stylelint #1836

wants to merge 4 commits into from

Conversation

bjohansebas
Copy link
Member

I would like to propose using Stylelint to have a linter for CSS. This would be part of #1596.

What do you think, @expressjs/docs-wg, @ShubhamOulkar, @ipreencekmr?

@bjohansebas bjohansebas requested review from a team as code owners March 15, 2025 21:34
Copy link

socket-security bot commented Mar 15, 2025

New and updated dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] None +1 14.9 kB jeddy3
npm/[email protected] Transitive: environment, filesystem +5 532 kB hudochenkov
npm/[email protected] Transitive: environment, eval, filesystem, unsafe +112 9.34 MB hudochenkov, jeddy3, mattxwang, ...4 more

View full report↗︎

Copy link

netlify bot commented Mar 15, 2025

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 3402dab
🔍 Latest deploy log https://app.netlify.com/sites/expressjscom-preview/deploys/67dd63f2a2e4260008682efb
😎 Deploy Preview https://deploy-preview-1836--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@bjohansebas bjohansebas force-pushed the stylelint branch 2 times, most recently from 3caad8c to 3542b46 Compare March 15, 2025 21:37
'no-descending-specificity': null,
// Disables the Level-4 Media Queries; Since they're more exotic and less known
'media-feature-range-notation': 'prefix',
},
Copy link
Contributor

Choose a reason for hiding this comment

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

consider adding following plugins
https://www.npmjs.com/package/stylelint-high-performance-animation
https://www.npmjs.com/package/stylelint-declaration-block-no-ignored-properties

Also plugin "plugin/use-defensive-css": [true, { "severity": "warning" , "accidental-hover": true, "background-repeat": true }] is useful in our code.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool, that will help us maintain better CSS in this repository

Copy link
Contributor

Choose a reason for hiding this comment

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

looks good to me, can we also implement a commit lint along with style lint to maintain a consistent commit message format.

Copy link
Member Author

Choose a reason for hiding this comment

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

The commit lint not yet, there's no consensus on that since there are limitations in the configuration (see expressjs/discussions#293 (comment), which mentions part of that, and I'm sure there are more issues and PRs that have tried to implement it).

Step by step.

@bjohansebas
Copy link
Member Author

Next week, I will look into integrating the suggestions and merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants