We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a86ba06 commit 5c67f17Copy full SHA for 5c67f17
src/rules/dynamic-import-chunkname.js
@@ -42,7 +42,9 @@ module.exports = {
42
43
const sourceCode = context.getSourceCode()
44
const arg = node.arguments[0]
45
- const leadingComments = sourceCode.getComments(arg).leading
+ const leadingComments = sourceCode.getCommentsBefore
46
+ ? sourceCode.getCommentsBefore(arg) // This method is available in ESLint >= 4.
47
+ : sourceCode.getComments(arg).leading // This method is deprecated in ESLint 7.
48
49
if (!leadingComments || leadingComments.length === 0) {
50
context.report({
0 commit comments