We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
eslint
Learn more about funding links in repositories.
Report abuse
1 parent 6dca24c commit e82974fCopy full SHA for e82974f
lib/rules/hashbang.js
@@ -50,7 +50,7 @@ function isNodeShebang(shebang, executableName) {
50
* @returns {string}
51
*/
52
function getExpectedExecutableName(context) {
53
- const extension = path.extname(context.filename)
+ const extension = path.extname(context.filename ?? context.getFilename())
54
/** @type {{ executableMap: Record<string, string> }} */
55
const { executableMap = {} } = context.options?.[0] ?? {}
56
0 commit comments