From 07f57b5b744b7ca28e2c8a25511339e8de0ba31d Mon Sep 17 00:00:00 2001 From: Ben Perlmutter <57849986+bpmutter@users.noreply.github.com> Date: Thu, 25 May 2023 22:20:04 -0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Milos Djermanovic --- docs/src/extend/custom-rule-tutorial.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/src/extend/custom-rule-tutorial.md b/docs/src/extend/custom-rule-tutorial.md index e9aa26a9290..f22473d9d85 100644 --- a/docs/src/extend/custom-rule-tutorial.md +++ b/docs/src/extend/custom-rule-tutorial.md @@ -291,7 +291,7 @@ module.exports = [ // Using the eslint-plugin-example plugin defined locally plugins: {"example": eslintPluginExample}, rules: { - "example/foo-bar": "error", + "example/enforce-foo-bar": "error", }, } ] @@ -309,7 +309,6 @@ Add the following code to `example.js`: ```javascript // example.js -/* eslint-disable no-unused-vars -- Disable other rule causing problem for this file */ function correctFooBar() { const foo = "bar"; @@ -332,7 +331,7 @@ This produces the following output in the terminal: ```text //eslint-custom-rule-example/example.js - 14:3 error Value other than "bar" assigned to `const foo`. Unexpected value: baz foo-bar/foo-bar + 9:11 error Value other than "bar" assigned to `const foo`. Unexpected value: baz example/enforce-foo-bar ✖ 1 problem (1 error, 0 warnings) 1 error and 0 warnings potentially fixable with the `--fix` option. @@ -375,7 +374,7 @@ A complete annotated example of what a plugin's `package.json` file should look "author": "", "license": "ISC", "devDependencies": { - "eslint": "^8.36.0", + "eslint": "^8.36.0" } } ``` @@ -418,7 +417,7 @@ This produces the following output in the terminal: ```text //eslint-custom-rule-example/example.js - 14:3 error Value other than "bar" assigned to `const foo`. Unexpected value: baz foo-bar/foo-bar + 9:11 error Value other than "bar" assigned to `const foo`. Unexpected value: baz example/enforce-foo-bar ✖ 1 problem (1 error, 0 warnings) 1 error and 0 warnings potentially fixable with the `--fix` option.