Skip to content

Commit

Permalink
fix: file-extension-in-import eslint v8 compat issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed Jun 6, 2024
1 parent 6dca24c commit f256ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/hashbang.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function isNodeShebang(shebang, executableName) {
* @returns {string}
*/
function getExpectedExecutableName(context) {
const extension = path.extname(context.filename)
const extension = path.extname(context.filename ?? context.getFilename())
/** @type {{ executableMap: Record<string, string> }} */
const { executableMap = {} } = context.options?.[0] ?? {}

Expand Down

0 comments on commit f256ce0

Please sign in to comment.