Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Workday/canvas-kit
|
||||||||||||||||||||||||||||||||||||||||
| Project |
Workday/canvas-kit
|
| Branch Review |
feat-4143-eslint-rules
|
| Run status |
|
| Run duration | 02m 31s |
| Commit |
|
| Committer | Alex Zajac |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
17
|
|
|
0
|
|
|
830
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
19.37%
|
|
|---|---|
|
|
1567
|
|
|
374
|
Accessibility
99.06%
|
|
|---|---|
|
|
5 critical
5 serious
3 moderate
2 minor
|
|
|
76
|
Author
|
retarget #4167 from |
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.
Summary
Resolves #4143
Adds
eslint-plugin-canvas-kit, a publishable ESLint plugin for enforcing Canvas Kit styling and token conventions.The plugin provides rules that:
stylepropscssVar()when system tokens are used increateStylesThe goal is earlier, clearer feedback while writing styles, so token, theming, and responsive-design mistakes are caught before review or release.
The repository’s ESLint configuration now enables the plugin’s recommended rules for TypeScript and JSX source files.
Scope and rollout
The rules are enabled for source files, but existing violations remain—primarily in stories and examples. This PR adds the plugin and establishes its initial coverage without bundling a broad cleanup of existing example code.
Some valid edge cases may still need a targeted ESLint disable, particularly when integrating with third-party libraries that require runtime inline positioning or dimensions.
Release Category
Infrastructure
Release Note
Adds
eslint-plugin-canvas-kit, with recommended rules for enforcing Canvas Kit styling and design-token conventions.Breaking Changes
None for package consumers adopting the plugin voluntarily.
Within this repository, contributors may see new lint failures when adding or changing TypeScript/JSX styles that do not follow the enforced Canvas styling conventions.
Testing
yarn test modules/eslint-plugin-canvas-kitReviewer starting points
eslint.config.js— enables the plugin’s recommended rulesmodules/eslint-plugin-canvas-kit/index.js— plugin and recommended-config registrationmodules/eslint-plugin-canvas-kit/rules/— rule implementationsmodules/eslint-plugin-canvas-kit/spec/— RuleTester coverageFeedback requested
Please focus on: