File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 38
38
- os : ubuntu-latest
39
39
node : " 18.18.0"
40
40
eslint : " 8.x"
41
+ - os : ubuntu-latest
42
+ node : " 18.18.0"
43
+ eslint : " 8.39.0"
41
44
- os : ubuntu-latest
42
45
node : " 20.9.0"
43
46
eslint : " 8.x"
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