feat(stylelint-config): introduce stylelint config#107
Merged
Conversation
cf4cff7 to
189b732
Compare
189b732 to
a439e95
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new Stylelint configuration package with multiple subconfigs for common, SCSS, strict, and logical rules, along with matchers and concentric CSS ordering.
- Added a strict subconfig enforcing stricter naming and declaration rules.
- Added an SCSS-specific config with custom syntax and overrides based on common rules.
- Defined regex matchers and the concentric-css property ordering; updated package exports, metadata, and documentation.
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/stylelint-config/src/subconfigs/strict.js | New strict rules and custom matchers |
| packages/stylelint-config/src/subconfigs/scss.js | SCSS-specific config with syntax and rule overrides |
| packages/stylelint-config/src/subconfigs/matchers.js | Regex matchers for naming conventions |
| packages/stylelint-config/src/subconfigs/common.js | Core shared config, plugins, and property ordering |
| packages/stylelint-config/src/subconfigs/logical.js | Logical CSS properties plugin config |
| packages/stylelint-config/src/subconfigs/concentric-css.js | Concentric CSS property-order groups |
| packages/stylelint-config/src/*.js | Entry-point exports for each subconfig |
| packages/stylelint-config/package.json | Package metadata, dependencies, and publish settings |
| packages/stylelint-config/eslint.config.js | ESLint overrides for the config package |
| packages/stylelint-config/README.md | Documentation and usage examples |
| package.json (root) | Updated clear script to match new package layout |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
packages/stylelint-config/src/subconfigs/matchers.js:1
- Consider adding unit tests for these regex matchers to ensure they correctly accept and reject expected naming patterns, improving confidence when upgrading or refactoring.
/**
| plugins: ['stylelint-declaration-strict-value', 'stylelint-plugin-a11y'], | ||
| rules: { | ||
| 'scale-unlimited/declaration-strict-value': [ | ||
| ['font-family', '/color([^A-Z]|$)/'], |
There was a problem hiding this comment.
The regex is provided as a string literal. You should use a RegExp literal (without quotes), e.g. [/color([^A-Z]|$)/], so the rule correctly interprets it as a regex.
Suggested change
| ['font-family', '/color([^A-Z]|$)/'], | |
| ['font-family', /color([^A-Z]|$)/], |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.