Skip to content

Commit 292afea

Browse files
Clean up import removal logic comments and clarify intended behavior
Co-authored-by: francinelucca <[email protected]>
1 parent 868bb29 commit 292afea

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/rules/no-deprecated-octicon.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,9 @@ module.exports = {
142142
yield fixer.removeRange([startPos, iconProp.range[1]])
143143
}
144144

145-
// Handle import removal if this is the last Octicon usage
146-
// Only check for last octicon after incrementing counter to ensure accurate count
145+
// Import removal: only enabled for single Octicon cases to prevent ESLint fix conflicts
146+
// For multiple Octicons, JSX transformation works but import remains (can be cleaned up manually)
147147
processedOcticonUsages++
148-
// Disable import removal for multiple Octicons to avoid fix conflicts (temporary fix)
149148
if (
150149
processedOcticonUsages === totalOcticonUsages &&
151150
totalOcticonUsages === 1 &&
@@ -220,7 +219,8 @@ module.exports = {
220219

221220
yield fixer.replaceText(node, replacement)
222221

223-
// Handle import removal if this is the last Octicon usage
222+
// Import removal: only enabled for single Octicon cases to prevent ESLint fix conflicts
223+
// For multiple Octicons, JSX transformation works but import remains (can be cleaned up manually)
224224
processedOcticonUsages++
225225
if (
226226
processedOcticonUsages === totalOcticonUsages &&
@@ -320,7 +320,8 @@ module.exports = {
320320

321321
yield fixer.replaceText(node, replacement)
322322

323-
// Handle import removal if this is the last Octicon usage
323+
// Import removal: only enabled for single Octicon cases to prevent ESLint fix conflicts
324+
// For multiple Octicons, JSX transformation works but import remains (can be cleaned up manually)
324325
processedOcticonUsages++
325326
if (
326327
processedOcticonUsages === totalOcticonUsages &&

0 commit comments

Comments
 (0)