Skip to content

feat(skills): add lint skills#110133

Merged
natemoo-re merged 7 commits intomasterfrom
scraps/lint-skill
Mar 10, 2026
Merged

feat(skills): add lint skills#110133
natemoo-re merged 7 commits intomasterfrom
scraps/lint-skill

Conversation

@natemoo-re
Copy link
Member

Adds /lint-new and /lint-fix skills.

/lint-new provides guidance for creating a new custom ESLint rule in the eslintPluginScraps directory, writing tests, and managing common patterns.

/lint-fix provides guidance for fixing specific lint violations. Because of the size of our codebase, agents often begin fixes without realizing the scale demands an alternative strategy, so this rule bakes in some heuristics that guide agents towards manual, batched, or automated fixes.

@natemoo-re natemoo-re requested review from a team and JoshuaKGoldberg March 6, 2026 18:33
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Love this!! 😍


- The transformation alters control flow or runtime behavior
- Multiple valid fixes exist and the right choice requires human judgment
- The fix requires type information not available from the AST alone
Copy link
Member

Choose a reason for hiding this comment

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

Ooh, interesting! How come?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice flag, that requires a bit more nuance! We can leverage type-aware rules, but we don't run them in precommit for performance reasons.

| `decomposeValue` | `src/ast/extractor/value-decomposer.ts` | Breaking complex expressions into all possible values |
| Theme tracker | `src/ast/extractor/theme.ts` | Tracking `useTheme()` and callback theme bindings |

If another rule already detects the same pattern, extract the shared logic into `src/ast/utils/` and reuse it.
Copy link
Member

Choose a reason for hiding this comment

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

[Praise] This section is great! +1

Copy link
Member Author

Choose a reason for hiding this comment

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

After some testing, in practice this unfortunately didn't provide strong enough guidance to prevent duplicate patterns! I'm going to push an iteration with better guardrails.


## Coordinating Large Changes

- Split PRs to **~50 changed files** based on ownership rules in @.github/CODEOWNERS.
Copy link
Member

Choose a reason for hiding this comment

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

[Praise] Smart!

Co-authored-by: Josh Goldberg ✨ <github@joshuakgoldberg.com>
Co-authored-by: Josh Goldberg ✨ <github@joshuakgoldberg.com>
@natemoo-re natemoo-re marked this pull request as ready for review March 10, 2026 17:32
@natemoo-re natemoo-re merged commit 5df098f into master Mar 10, 2026
42 of 43 checks passed
@natemoo-re natemoo-re deleted the scraps/lint-skill branch March 10, 2026 17:34
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