Skip to content

fix(indent): correctly ignore JSXText and TS nodes#785

Merged
antfu merged 17 commits intoeslint-stylistic:mainfrom
9romise:refactor/indent
Jun 8, 2025
Merged

fix(indent): correctly ignore JSXText and TS nodes#785
antfu merged 17 commits intoeslint-stylistic:mainfrom
9romise:refactor/indent

Conversation

@9romise
Copy link
Copy Markdown
Member

@9romise 9romise commented May 17, 2025

Warning

Some TS nodes used to be wrongly ignored by following ignoreNodes option.
If you still want to ignore them, please pay attention.
Here are the nodes:

Correct(now) Wrong(prev)
TSAsExpression BinaryExpression
TSConditionalType ConditionalExpression
TSEnumDeclaration ObjectExpression
TSTypeLiteral ObjectExpression
TSImportEqualsDeclaration VariableDeclaration
TSIndexedAccessType MemberExpression
TSInterfaceBody ClassBody
TSInterfaceDeclaration ClassDeclaration
TSMappedType ObjectExpression
TSModuleBlock BlockStatement
TSQualifiedName MemberExpression
TSTupleType ArrayExpression
TSTypeParameterDeclaration JSXOpeningElement
TSTypeParameterInstantiation JSXOpeningElement

Description

Move JSXText and TS nodes into baseOffsetListeners so that they can be ignored correctly by the ignoredNodes option.

Linked Issues

fixes #754

Additional context

@9romise 9romise mentioned this pull request May 17, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.68%. Comparing base (7d21d8a) to head (a849d00).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #785      +/-   ##
==========================================
+ Coverage   99.67%   99.68%   +0.01%     
==========================================
  Files          95       95              
  Lines       18220    18075     -145     
  Branches     4659     4663       +4     
==========================================
- Hits        18160    18018     -142     
+ Misses         60       57       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@9romise 9romise force-pushed the refactor/indent branch from adfa659 to bda43ae Compare May 29, 2025 06:59
@9romise 9romise marked this pull request as ready for review June 7, 2025 14:22
@antfu antfu added this pull request to the merge queue Jun 8, 2025
Merged via the queue into eslint-stylistic:main with commit b0b4218 Jun 8, 2025
11 checks passed
@9romise 9romise deleted the refactor/indent branch June 8, 2025 01:21
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.

@stylistic/indent: ignoredNodes does not ignore nodes

2 participants