Skip to content

Commit

Permalink
fix: hashbang + eslint v8 compat issue (#290)
Browse files Browse the repository at this point in the history
fix: hashbang + eslint v8 compat issue
  • Loading branch information
aladdin-add authored Jun 6, 2024
1 parent 6dca24c commit e82974f
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 e82974f

Please sign in to comment.