Skip to content

Wire antd CLI lint into npm lint scripts#8036

Merged
gilluminate merged 2 commits into
mainfrom
gill/lint/integrate-antd-cli
Apr 28, 2026
Merged

Wire antd CLI lint into npm lint scripts#8036
gilluminate merged 2 commits into
mainfrom
gill/lint/integrate-antd-cli

Conversation

@gilluminate
Copy link
Copy Markdown
Contributor

@gilluminate gilluminate commented Apr 27, 2026

Summary

Adds @ant-design/cli as a devDep in admin-ui, privacy-center, and fidesui, plus a lint:antd script in each. The package-level lint and lint:ci scripts now run ESLint then antd lint in sequence, so npm run lint covers 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:

  • 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 rarely imports antd directly).
  • fidesui: no alias (it consumes antd directly).
  • All three: a11y, usage, and performance warnings surface.

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 lint finds today (fixed in this PR)

  • admin-ui: 5 deprecated, 2 usage, 1 performance.
  • fidesui: 1 deprecated (Select filterOption in SelectInline.tsx).
  • privacy-center: clean.

Test plan

  • Run npm run lint in each of the three packages and confirm ESLint passes and antd lint surfaces the warnings shown above.
  • Run npm run lint:ci in each and confirm exit code 0 (warnings non-blocking).

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>
@gilluminate gilluminate requested a review from a team as a code owner April 27, 2026 16:57
@gilluminate gilluminate requested review from jpople and removed request for a team April 27, 2026 16:57
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fides-plus-nightly Ready Ready Preview, Comment Apr 27, 2026 5:19pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored Apr 27, 2026 5:19pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 27, 2026

Dependency Review

✅ No vulnerabilities found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 6549d85.
Ensure 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

  • clients/admin-ui/package.json
  • clients/fidesui/package.json
  • clients/package-lock.json
  • clients/privacy-center/package.json

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 27, 2026

Title Lines Statements Branches Functions
admin-ui Coverage: 8%
6.31% (2799/44303) 5.55% (1402/25225) 4.41% (579/13105)
fides-js Coverage: 78%
79.39% (2011/2533) 65.99% (1240/1879) 73.09% (345/472)
privacy-center Coverage: 88%
85.97% (331/385) 81.36% (179/220) 78.87% (56/71)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@lucanovera lucanovera left a comment

Choose a reason for hiding this comment

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

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.

@gilluminate
Copy link
Copy Markdown
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

@gilluminate gilluminate added this pull request to the merge queue Apr 28, 2026
Merged via the queue into main with commit 7379397 Apr 28, 2026
55 of 57 checks passed
@gilluminate gilluminate deleted the gill/lint/integrate-antd-cli branch April 28, 2026 17:10
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.

2 participants