File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -46,11 +46,12 @@ function isNodeShebang(shebang, executableName) {
46
46
}
47
47
48
48
/**
49
+ * @param {string } filePath
49
50
* @param {import('eslint').Rule.RuleContext } context The rule context.
50
51
* @returns {string }
51
52
*/
52
- function getExpectedExecutableName ( context ) {
53
- const extension = path . extname ( context . filename )
53
+ function getExpectedExecutableName ( filePath , context ) {
54
+ const extension = path . extname ( filePath )
54
55
/** @type {{ executableMap: Record<string, string> } } */
55
56
const { executableMap = { } } = context . options ?. [ 0 ] ?? { }
56
57
@@ -166,7 +167,7 @@ module.exports = {
166
167
const needsShebang =
167
168
isExecutable . ignored === true ||
168
169
isBinFile ( convertedAbsolutePath , packageJson ?. bin , packageDirectory )
169
- const executableName = getExpectedExecutableName ( context )
170
+ const executableName = getExpectedExecutableName ( filePath , context )
170
171
const info = getShebangInfo ( sourceCode )
171
172
172
173
return {
You can’t perform that action at this time.
0 commit comments