Skip to content

Commit

Permalink
Update lib/util/is-typescript.js
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Good <[email protected]>
  • Loading branch information
aladdin-add and scagood authored Nov 27, 2023
1 parent 968349e commit d6659ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/is-typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const typescriptExtensions = [".ts", ".tsx", ".cts", ".mts"]
*/
module.exports = function isTypescript(context) {
const sourceFileExt = path.extname(
context.getPhysicalFilename() ?? context.physicalFilename
context.physicalFilename ?? context.getPhysicalFilename()
)
return typescriptExtensions.includes(sourceFileExt)
}

0 comments on commit d6659ee

Please sign in to comment.