eslint-plugin-eslint-comments
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -31,3 +31,4 @@ /** | ||
create(context) { | ||
const originalReport = context.eslint.report | ||
const linter = context.eslint || context._linter | ||
const originalReport = linter.report | ||
const sourceCode = context.getSourceCode() | ||
@@ -37,3 +38,3 @@ const disabledArea = DisabledArea.get(sourceCode) | ||
// Override `report` method to mark disabled-area as reported. | ||
context.eslint.report = function(ruleId, _severity, node, locationArg) { | ||
linter.report = function(ruleId, _severity, node, locationArg) { | ||
const location = (typeof locationArg === "string") | ||
@@ -69,3 +70,3 @@ ? node.loc.start | ||
// Restore | ||
context.eslint.report = originalReport | ||
linter.report = originalReport | ||
} | ||
@@ -77,6 +78,9 @@ | ||
// even if this rule was initialized before other rules. | ||
context.eslint.on("Program:exit", report) | ||
linter.on("Program:exit", report) | ||
}, | ||
"Program:exit"() { | ||
// Ensure that at least one Program:exit listener exists so that the report listener will be called. | ||
}, | ||
} | ||
}, | ||
} |
{ | ||
"name": "eslint-plugin-eslint-comments", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Additional ESLint rules for directive comments of ESLint.", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30217
646