8000 feat(ui): expand TypeScript and Angular ESLint rules based on PR review audit by VLukiantsev · Pull Request #723 · google/xmc · GitHub
[go: up one dir, main page]

Skip to content

feat(ui): expand TypeScript and Angular ESLint rules based on PR review audit - #723

Merged
VLukiantsev merged 2 commits into
mainfrom
feat/expand-ts-linter-rules
Sep 1, 2026
Merged

VLukiantsev merged 2 commits into
mainfrom
feat/expand-ts-linter-rules

Conversation

@VLukiantsev
Copy link
Copy Markdown
Collaborator

Summary

Expands TypeScript and Angular ESLint rules in cmd/ui/eslint.config.js based on an empirical audit of 88 frontend PRs and 700+ review comments. These rules enforce strict equality, default immutability (const), console statement bans, Angular component lifecycle hygiene, and HTML template accessibility directly during local pre-commit hooks and CI.

Motivation & Context

During reviews on TypeScript and Angular PRs, automated review bots (Gemini Code Assist) and peer reviewers frequently flag recurring anti-patterns (such as loose equality comparisons, mutable variable declarations, leftover console.log statements in production code, empty lifecycle hooks, and template accessibility omissions). Enabling these rulesets in ESLint catches these issues automatically before PR submission, reducing review round-trips.

Key Changes

Verification & Testing

  • Commands Executed:
    • npm run lint (in cmd/ui) $\rightarrow$ Passed (0 errors across 240+ files).
    • npm run format:check (in cmd/ui) $\rightarrow$ Passed (All files formatted with Prettier).
    • python3 -m unittest discover -s tools -p "*_test.py" $\rightarrow$ Passed (371 tests in 2.56s).
    • ./.githooks/pre-commit $\rightarrow$ Passed all checks (Buildifier, gofmt, golangci-lint, addlicense).
    • ./tools/analyze_diff_size.py --base-ref origin/main... $\rightarrow$ Sizing within limits (should_trigger_split_verifier: false).
  • Coverage & Test Status: All frontend linters, formatters, and unit tests passed cleanly.

Related Issues / Bugs

N/A

TAG=agy
CONV=e17b6ae9-1abb-4195-8dc6-49742ae7d2d7

…ew audit

Expands static analysis rules in cmd/ui/eslint.config.js based on an empirical audit of 88 TypeScript/Angular PRs and 700+ review comments. Enforces strict equality, default immutability, console bans, Angular component lifecycle hygiene, and template accessibility across the UI codebase.

TAG=agy
CONV=e17b6ae9-1abb-4195-8dc6-49742ae7d2d7
@gemini-code-assist gemini-code-assist Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the ESLint configuration in cmd/ui/eslint.config.js to enforce several new rules for JavaScript/TypeScript quality, TypeScript-specific checks, Angular component/lifecycle methods, and Angular templates. The review feedback suggests simplifying the @angular-eslint/directive-class-suffix rule by removing redundant default options and recommends adding @angular-eslint/component-class-suffix to enforce standard Angular naming conventions.

Comment thread cmd/ui/eslint.config.js Resolved
@VLukiantsev
VLukiantsev marked this pull request as ready for review September 1, 2026 15:53
@github-actions
github-actions Bot requested a review from AntonTyb September 1, 2026 15:54
@VLukiantsev
VLukiantsev added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 7df5d48 Sep 1, 2026
12 checks passed
@VLukiantsev
VLukiantsev deleted the feat/expand-ts-linter-rules branch September 1, 2026 15:57
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

0