Wire antd CLI lint into npm lint scripts#8036
Merged
Merged
Conversation
Adds @ant-design/cli as a devDep in admin-ui, privacy-center, and fidesui, and a 'lint:antd' script in each that runs the antd CLI lint. The 'lint' and 'lint:ci' scripts now run eslint then antd lint in sequence. CI sees both layers without anyone needing to remember the extra command, and local 'npm run lint' covers both for free. Flag choices per package: - admin-ui and privacy-center: '--antd-alias fidesui' so the lint recognizes fidesui imports as antd. Without this, the rules silently no-op for our codebase (which never imports antd directly). - fidesui: no alias (it consumes antd directly). - All three: full ruleset (no '--only deprecated') so a11y, usage, and performance warnings surface alongside deprecations. The antd CLI exits 0 even when issues are present, so CI won't break on pre-existing tech debt; warnings are visible but non-blocking. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned Files
|
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8ec6316 to
6549d85
Compare
lucanovera
approved these changes
Apr 28, 2026
Contributor
lucanovera
left a comment
There was a problem hiding this comment.
Great initiative with the antd linting, this will catch a lot of things as we upgrade antd versions. I ran it and it found 2 additional issues in admin-ui.
Contributor
Author
|
@lucanovera I've submitted a bug report for those 2 and they've already fixed it 😄 we just need to wait for their next release. ant-design/ant-design-cli#91 |
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
Adds
@ant-design/clias a devDep in admin-ui, privacy-center, and fidesui, plus alint:antdscript in each. The package-levellintandlint:ciscripts now run ESLint then antd lint in sequence, sonpm run lintcovers both layers without anyone needing to remember the extra command.Why: earlier this week, several deprecated antd v6 props (
<Alert message=...>,Button iconPosition) shipped to a feature branch undetected because the antd CLI was only available globally and not wired into the standard lint flow. Wiring it into the npm scripts means CI surfaces the issues automatically going forward.Flag choices per package:
--antd-alias fidesuiso the lint recognizes fidesui imports as antd. Without this, the rules silently no-op for our codebase (which rarely imports antd directly).Non-blocking: the antd CLI exits 0 even when issues are present, so CI won't break on pre-existing tech debt. Warnings are visible but non-blocking; we can tighten this later if desired.
What
npm run lintfinds today (fixed in this PR)Select filterOptioninSelectInline.tsx).Test plan
npm run lintin each of the three packages and confirm ESLint passes and antd lint surfaces the warnings shown above.npm run lint:ciin each and confirm exit code 0 (warnings non-blocking).