Skip to content

Commit e82974f

Browse files
authoredJun 6, 2024··
fix: hashbang + eslint v8 compat issue (#290)
fix: hashbang + eslint v8 compat issue
1 parent 6dca24c commit e82974f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/rules/hashbang.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function isNodeShebang(shebang, executableName) {
5050
* @returns {string}
5151
*/
5252
function getExpectedExecutableName(context) {
53-
const extension = path.extname(context.filename)
53+
const extension = path.extname(context.filename ?? context.getFilename())
5454
/** @type {{ executableMap: Record<string, string> }} */
5555
const { executableMap = {} } = context.options?.[0] ?? {}
5656

0 commit comments

Comments
 (0)
Please sign in to comment.