Open
Conversation
arnavsurve
approved these changes
Feb 14, 2026
Contributor
arnavsurve
left a comment
There was a problem hiding this comment.
This is a clean, well-structured PR that follows the existing codebase conventions closely. The rule implementation is correct, the tests are thorough, and the documentation is properly updated.
What looks good:
- The AST traversal logic correctly identifies
style={{...}}(inline object expressions) while allowingstyle={variable}references, which is the right behavior. - Test coverage is solid: positive cases (single element, different elements, multiple violations), negative cases (className, variable reference, no style prop).
- README table, rule detail section, rule count bump, and test count bump are all updated consistently.
- Code style matches existing rules (e.g.,
no-tailwind-animation-classes) perfectly.
Minor observations (non-blocking):
- The
no-stylesheet-createrule's message says "Use inline styles instead of StyleSheet.create()", while this new rule says "Avoid inline styles. Use Tailwind CSS classes instead." Together they form a logical migration path (StyleSheet.create -> inline -> Tailwind), but theno-stylesheet-createmessage could be slightly confusing if both rules fire in the same codebase. This is pre-existing and outside the scope of this PR. - The rule will not flag
style={(() => ({ color: 'red' }))()}(IIFE returning an object) orstyle={{...someSpread}}(spread inside object literal -- this one actually would be caught since it's still an ObjectExpression). These edge cases are reasonable to not worry about since the common pattern is what matters. - The README intro section still says "all 31 rules" in the config section, but the Available Rules heading correctly says 34. This is also pre-existing.
LGTM!
🤖 Generated with Claude Code
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
no-inline-stylesrule that flagsstyle={{...}}JSX attributes and suggests using Tailwind CSS classes insteadstyle={dynamicStyle})Test plan