Skip to content

chore(typescript-eslint): add rule-performance agent skill#12436

Open
zaewc wants to merge 7 commits into
typescript-eslint:mainfrom
zaewc:repo/skills
Open

chore(typescript-eslint): add rule-performance agent skill#12436
zaewc wants to merge 7 commits into
typescript-eslint:mainfrom
zaewc:repo/skills

Conversation

@zaewc

@zaewc zaewc commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

Overview

Adds a skills/ directory holding SKILL.md files in the portable frontmatter format (Vercel skills / Claude Code) + the first skill: rule-performance

The skill captures the "defer type checks behind cheap AST guards" preference from #12296 , checking node types/operators/flags before calling the type checker, so expensive type lookups are skipped for nodes a syntactic guard already rejects.

This is the kind of preference that's impractical to enforce with a lint rule of our own, which makes it a good fit for a skill. It explains how to spot candidates and how to reorder without changing behavior and what to verify before claiming a win.

Kept intentionally small (one skill) so we can see how it does on real issues and PRs before adding more, per the phased plan in the issue 💖

@typescript-eslint

Copy link
Copy Markdown
Contributor

Thanks for the PR, @zaewc!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

@netlify

netlify Bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit c8ba2f9
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/6a45d3b8db0cdc000815d9ca
😎 Deploy Preview https://deploy-preview-12436--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (no change from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 90 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud

nx-cloud Bot commented Jun 19, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 127283f

Command Status Duration Result
nx run-many -t lint --projects=eslint-plugin --... ✅ Succeeded 1m 1s View ↗
nx run-many -t lint --projects=typescript-estre... ✅ Succeeded 28s View ↗
nx run-many -t lint --projects=parser,type-util... ✅ Succeeded 26s View ↗
nx run-many -t lint --projects=ast-spec,utils,s... ✅ Succeeded 24s View ↗
nx run-many -t typecheck:tsgo ✅ Succeeded 15s View ↗
nx run types:build ✅ Succeeded 3s View ↗
nx run-many -t typecheck ✅ Succeeded 9s View ↗
nx run generate-configs ✅ Succeeded 4s View ↗
Additional runs (2) ✅ Succeeded ... View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-02 03:01:03 UTC

@zaewc zaewc changed the title chore(repo): add rule-performance agent skill chore(typescript-eslint): add rule-performance agent skill Jun 19, 2026

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks! 🙌 Just one formatting question and a removal suggestion.

Note that I edited the OP: this doesn't fix adding in all the skills we'd want, just one of them very nicely.

Comment thread skills/rule-performance/SKILL.md Outdated
Comment thread skills/rule-performance/SKILL.md Outdated
Comment on lines +8 to +9
Type-aware rules are the main source of lint slowdowns, because calls into
TypeScript's checker (`getTypeAtLocation`, `getConstrainedTypeAtLocation`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[Formatting] Question: why the aggressive line length split like this?

Suggested change
Type-aware rules are the main source of lint slowdowns, because calls into
TypeScript's checker (`getTypeAtLocation`, `getConstrainedTypeAtLocation`,
Type-aware rules are the main source of lint slowdowns, because calls into TypeScript's checker (`getTypeAtLocation`, `getConstrainedTypeAtLocation`,

@zaewc zaewc Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I applied your suggestion!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@zaewc you did in one place, not all over.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh good catch, reflowed the rest of the file so no prose is hard-wrapped anymore, not just that one paragraph

@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Jun 29, 2026
Co-authored-by: Josh Goldberg ✨ <github@joshuakgoldberg.com>
@JoshuaKGoldberg JoshuaKGoldberg added awaiting response Issues waiting for a reply from the OP or another party and removed 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labels Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting response Issues waiting for a reply from the OP or another party

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repo: Add agent AI skill for rule performance

2 participants