From 9183705cadd8f0c7ee42d41c69f43ce63be77742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=9A=E8=B0=94=E7=9A=84=E7=8C=AB?= Date: Thu, 26 Oct 2017 00:14:36 +0800 Subject: [PATCH] Docs: fix some errors in rule example. --- docs/rules/prefer-replace-text.md | 4 ++-- docs/rules/test-case-property-ordering.md | 2 +- docs/rules/test-case-shorthand-strings.md | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/rules/prefer-replace-text.md b/docs/rules/prefer-replace-text.md index 48688d8a..fb8263d3 100644 --- a/docs/rules/prefer-replace-text.md +++ b/docs/rules/prefer-replace-text.md @@ -7,7 +7,7 @@ The rule reports an error if `replaceTextRange`'s first argument is an array of Examples of **incorrect** code for this rule: ```js -/* eslint eslint-plugin/prefer-text-range: error */ +/* eslint eslint-plugin/prefer-replace-text: error */ module.exports = { create(context) { context.report({ @@ -23,7 +23,7 @@ module.exports = { Examples of **correct** code for this rule: ```js -/* eslint eslint-plugin/prefer-text-range: error */ +/* eslint eslint-plugin/prefer-replace-text: error */ module.exports = { create(context) { context.report({ diff --git a/docs/rules/test-case-property-ordering.md b/docs/rules/test-case-property-ordering.md index 7172b6bb..40acd2d4 100644 --- a/docs/rules/test-case-property-ordering.md +++ b/docs/rules/test-case-property-ordering.md @@ -31,7 +31,7 @@ Examples of **incorrect** code for this rule: // invalid; extra properties should need to be placed afterwards. { code: "foo", - env: { es6: true } + env: { es6: true }, output: "bar", options: ["baz"], } diff --git a/docs/rules/test-case-shorthand-strings.md b/docs/rules/test-case-shorthand-strings.md index cdff39a5..ecbaeff5 100644 --- a/docs/rules/test-case-shorthand-strings.md +++ b/docs/rules/test-case-shorthand-strings.md @@ -139,7 +139,7 @@ ruleTester.run('example-rule', rule, { }, { code: 'anotherValidTestCase' - } + }, { code: 'testCaseWithOption', options: ["foo"] @@ -150,7 +150,7 @@ ruleTester.run('example-rule', rule, { ruleTester.run('example-rule', rule, { valid: [ - 'validTestCase;' + 'validTestCase;', 'anotherValidTestCase' ], invalid: [] @@ -218,7 +218,7 @@ Examples of **correct** code for this rule with the `consistent-as-needed` optio ruleTester.run('example-rule', rule, { valid: [ - 'validTestCase;' + 'validTestCase;', 'anotherValidTestCase;' ], invalid: []