Skip to content

Update stylelint and @primer/stylelint-config to latest versions #6174

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 6, 2025

This PR updates both stylelint and @primer/stylelint-config packages to their latest versions:

  • stylelint: 16.9.016.20.0
  • @primer/stylelint-config: 13.1.113.3.0

Changes Made

Dependencies

  • Updated version numbers in package.json
  • Regenerated package-lock.json with new dependency versions

Configuration Updates

  • Added rules to stylelint.config.mjs to handle new linting rules:
    • declaration-property-value-keyword-no-deprecated: null - allows existing usage of deprecated CSS keywords like break-word
    • declaration-property-value-no-unknown: null - allows existing usage of browser-specific or experimental CSS values

Code Changes

  • Added specific primer/colors disable comments in TooltipV2/Tooltip.module.css for component-specific CSS variables (--tooltip-fgColor and --tooltip-bgColor)

Validation

✅ CSS linting passes with npm run lint:css
✅ Build completes successfully with npm run build
✅ All tests pass with npm test

The updated stylelint versions include improved rule detection that caught some existing CSS patterns. The configuration changes ensure backward compatibility while allowing the project to benefit from the latest linting improvements.

Fixes #6173.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link

changeset-bot bot commented Jun 6, 2025

⚠️ No Changeset found

Latest commit: f565942

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@jonrohan jonrohan added the skip changeset This change does not need a changelog label Jun 6, 2025
@Copilot Copilot AI changed the title [WIP] We need to update stylelint and @primer/stylelint-config to the latest version Update stylelint and @primer/stylelint-config to latest versions Jun 6, 2025
@Copilot Copilot AI requested a review from jonrohan June 6, 2025 05:39
Copilot finished work on behalf of jonrohan June 6, 2025 05:40
@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jun 6, 2025
Copy link
Contributor

github-actions bot commented Jun 6, 2025

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

Copy link
Contributor

github-actions bot commented Jun 6, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 94.51 KB (0%)
packages/react/dist/browser.umd.js 94.64 KB (0%)

@github-actions github-actions bot requested a deployment to storybook-preview-6174 June 6, 2025 15:29 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6174 June 6, 2025 15:43 Inactive
@@ -13,6 +13,9 @@ export default {
message: '"%s" selector should be written in PascalCase or BEM format (e.g. block__element--modifier)',
},
],
// Allow existing patterns that are used in the codebase
'declaration-property-value-keyword-no-deprecated': null,
'declaration-property-value-no-unknown': null,
Copy link
Member

Choose a reason for hiding this comment

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

@copilot Instead of turning off the linters, can you add disable comments in the places it's failing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've replaced the global rule disables with specific inline disable comments in each affected CSS file. The linting now passes with targeted comments instead of turning off the rules globally. Changes in commit f565942.

Copilot finished work on behalf of jonrohan June 6, 2025 17:22
@anand11206
Copy link

can I work on this ? is it open?

@jonrohan
Copy link
Member

@copilot Can you run npm run vitest:update to update the snapshots and commit the result?

Copy link
Contributor Author

Copilot AI commented Jun 10, 2025

@copilot Can you run npm run vitest:update to update the snapshots and commit the result?

I've run npm run vitest:update as requested. The command completed successfully but no snapshots needed updating, so there are no new changes to commit.

Copilot finished work on behalf of jonrohan June 10, 2025 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We need to update stylelint and @primer/stylelint-config to the latest version
3 participants