diff --git a/scripts/eslint_rules/lib/check_license_header.js b/scripts/eslint_rules/lib/check_license_header.js index 24ddb927d27..577242bcc99 100644 --- a/scripts/eslint_rules/lib/check_license_header.js +++ b/scripts/eslint_rules/lib/check_license_header.js @@ -187,7 +187,7 @@ module.exports = { return; } - const {leading: comments} = context.getComments(node.body[0]); + const comments = context.getSourceCode().getCommentsBefore(node.body[0]); if (!comments || comments.length === 0) { context.report({