Skip to content

Commit 03c4f81

Browse files
[autofix.ci] apply automated fixes
1 parent c71d953 commit 03c4f81

File tree

1 file changed

+25
-16
lines changed

1 file changed

+25
-16
lines changed

src/rules/extensions.ts

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,10 @@ export default createRule<Options, MessageId>({
268268
if (overrideAction === 'ignore') return
269269

270270
// don't enforce anything on builtins
271-
if (!overrideAction && isBuiltIn(importPathWithQueryString, context.settings)) {
271+
if (
272+
!overrideAction &&
273+
isBuiltIn(importPathWithQueryString, context.settings)
274+
) {
272275
return
273276
}
274277

@@ -320,13 +323,15 @@ export default createRule<Options, MessageId>({
320323
},
321324
...(props.fix && extension
322325
? {
323-
fix(fixer) {
324-
return fixer.replaceText(
325-
source,
326-
JSON.stringify(`${importPathWithQueryString}.${extension}`),
327-
)
328-
},
329-
}
326+
fix(fixer) {
327+
return fixer.replaceText(
328+
source,
329+
JSON.stringify(
330+
`${importPathWithQueryString}.${extension}`,
331+
),
332+
)
333+
},
334+
}
330335
: {}),
331336
})
332337
}
@@ -344,16 +349,20 @@ export default createRule<Options, MessageId>({
344349
},
345350
...(props.fix
346351
? {
347-
fix(fixer) {
348-
return fixer.replaceText(
349-
source,
350-
JSON.stringify(importPath.slice(0, -(extension.length + 1))),
351-
)
352-
},
353-
}
352+
fix(fixer) {
353+
return fixer.replaceText(
354+
source,
355+
JSON.stringify(
356+
importPath.slice(0, -(extension.length + 1)),
357+
),
358+
)
359+
},
360+
}
354361
: {}),
355362
})
356363
}
357-
}, { commonjs: true })
364+
},
365+
{ commonjs: true },
366+
)
358367
},
359368
})

0 commit comments

Comments
 (0)