# eslint-plugin/no-deprecated-report-api 📝 Disallow the version of `context.report()` with multiple arguments. 💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/eslint-community/eslint-plugin-eslint-plugin#presets). 🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). ESLint has two APIs that rules can use to report problems. - The [deprecated API](https://eslint.org/docs/latest/extend/custom-rules-deprecated) accepts multiple arguments: `context.report(node, [loc], message)`. - The ["new API"](https://eslint.org/docs/latest/extend/custom-rules#reporting-problems) accepts a single argument: an object containing information about the reported problem. It is recommended that all rules use the new API. ## Rule Details This rule aims to disallow use of the deprecated `context.report(node, [loc], message)` API. Examples of **incorrect** code for this rule: ```js module.exports = { create(context) { context.report(node, 'This node is bad.'); }, }; ``` Examples of **correct** code for this rule: ```js module.exports = { create(context) { context.report({ node, message: 'This node is bad.' }); context.report({ node, loc, message: 'This node is bad.' }); }, }; ``` ## Further Reading - [ESLint rule docs: Reporting Problems](https://eslint.org/docs/latest/extend/custom-rules#reporting-problems)