From 5f893e5fe8ba64aff1a29e5b45055d08be29b66e Mon Sep 17 00:00:00 2001 From: Adam Lancaster Date: Wed, 12 Apr 2017 13:08:32 +0100 Subject: [PATCH] corrects all the .eslintrc examples in the docs directory --- docs/rules/display-name.md | 2 +- docs/rules/forbid-component-props.md | 2 +- docs/rules/forbid-elements.md | 2 +- docs/rules/jsx-closing-bracket-location.md | 6 +++--- docs/rules/jsx-curly-spacing.md | 6 +++--- docs/rules/jsx-equals-spacing.md | 2 +- docs/rules/jsx-handler-names.md | 2 +- docs/rules/jsx-indent-props.md | 2 +- docs/rules/jsx-max-props-per-line.md | 2 +- docs/rules/jsx-no-bind.md | 2 +- docs/rules/jsx-no-duplicate-props.md | 2 +- docs/rules/jsx-pascal-case.md | 2 +- docs/rules/jsx-sort-props.md | 2 +- docs/rules/no-did-mount-set-state.md | 2 +- docs/rules/no-did-update-set-state.md | 2 +- docs/rules/no-multi-comp.md | 2 +- docs/rules/no-unknown-property.md | 2 +- docs/rules/no-will-update-set-state.md | 2 +- docs/rules/prefer-es6-class.md | 2 +- docs/rules/prefer-stateless-function.md | 2 +- docs/rules/require-optimization.md | 4 ++-- docs/rules/self-closing-comp.md | 2 +- docs/rules/sort-prop-types.md | 2 +- 23 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/rules/display-name.md b/docs/rules/display-name.md index 49cfcf3c9d..de56ba1615 100644 --- a/docs/rules/display-name.md +++ b/docs/rules/display-name.md @@ -29,7 +29,7 @@ var Hello = React.createClass({ ```js ... -"display-name": [, { "ignoreTranspilerName": }] +"react/display-name": [, { "ignoreTranspilerName": }] ... ``` diff --git a/docs/rules/forbid-component-props.md b/docs/rules/forbid-component-props.md index 924cbe6aaf..737f58ecf2 100644 --- a/docs/rules/forbid-component-props.md +++ b/docs/rules/forbid-component-props.md @@ -35,7 +35,7 @@ The following patterns are not considered warnings: ```js ... -"forbid-component-props": [, { "forbid": [] }] +"react/forbid-component-props": [, { "forbid": [] }] ... ``` diff --git a/docs/rules/forbid-elements.md b/docs/rules/forbid-elements.md index 16c4c62ddd..9be67e56ed 100644 --- a/docs/rules/forbid-elements.md +++ b/docs/rules/forbid-elements.md @@ -10,7 +10,7 @@ This rule checks all JSX elements and `React.createElement` calls and verifies t ```js ... -"forbid-elements": [, { "forbid": [] }] +"react/forbid-elements": [, { "forbid": [] }] ... ``` diff --git a/docs/rules/jsx-closing-bracket-location.md b/docs/rules/jsx-closing-bracket-location.md index 2181b9a408..67d3dd5687 100644 --- a/docs/rules/jsx-closing-bracket-location.md +++ b/docs/rules/jsx-closing-bracket-location.md @@ -39,14 +39,14 @@ There are two ways to configure this rule. The first form is a string shortcut corresponding to the `location` values specified below. If omitted, it defaults to `"tag-aligned"`. ```js -"jsx-closing-bracket-location": // -> [, "tag-aligned"] -"jsx-closing-bracket-location": [, ""] +"react/jsx-closing-bracket-location": // -> [, "tag-aligned"] +"react/jsx-closing-bracket-location": [, ""] ``` The second form allows you to distinguish between non-empty and self-closing tags. Both properties are optional, and both default to `"tag-aligned"`. You can also disable the rule for one particular type of tag by setting the value to `false`. ```js -"jsx-closing-bracket-location": [, { +"react/jsx-closing-bracket-location": [, { "nonEmpty": "" || false, "selfClosing": "" || false }] diff --git a/docs/rules/jsx-curly-spacing.md b/docs/rules/jsx-curly-spacing.md index 3f5b2761f1..6dd65d4731 100644 --- a/docs/rules/jsx-curly-spacing.md +++ b/docs/rules/jsx-curly-spacing.md @@ -20,7 +20,7 @@ There are two main options for the rule: Depending on your coding conventions, you can choose either option by specifying it in your configuration: ```json -"jsx-curly-spacing": [2, "always"] +"react/jsx-curly-spacing": [2, "always"] ``` #### never @@ -68,7 +68,7 @@ The following patterns are not warnings: By default, braces spanning multiple lines are allowed with either setting. If you want to disallow them you can specify an additional `allowMultiline` property with the value `false`: ```json -"jsx-curly-spacing": [2, "never", {"allowMultiline": false}] +"react/jsx-curly-spacing": [2, "never", {"allowMultiline": false}] ``` When `"never"` is used and `allowMultiline` is `false`, the following patterns are considered warnings: @@ -112,7 +112,7 @@ The following patterns are not warnings: You can specify an additional `spacing` property that is an object with the following possible values: ```json -"jsx-curly-spacing": [2, "always", {"spacing": { +"react/jsx-curly-spacing": [2, "always", {"spacing": { "objectLiterals": "never" }}] ``` diff --git a/docs/rules/jsx-equals-spacing.md b/docs/rules/jsx-equals-spacing.md index a07ea54aa6..fd66cf6a91 100644 --- a/docs/rules/jsx-equals-spacing.md +++ b/docs/rules/jsx-equals-spacing.md @@ -18,7 +18,7 @@ There are two options for the rule: Depending on your coding conventions, you can choose either option by specifying it in your configuration: ```json -"jsx-equals-spacing": [2, "always"] +"react/jsx-equals-spacing": [2, "always"] ``` #### never diff --git a/docs/rules/jsx-handler-names.md b/docs/rules/jsx-handler-names.md index ef6aa192ae..12dcdcbde9 100644 --- a/docs/rules/jsx-handler-names.md +++ b/docs/rules/jsx-handler-names.md @@ -28,7 +28,7 @@ The following patterns are not considered warnings: ```js ... -"jsx-handler-names": [, { +"react/jsx-handler-names": [, { "eventHandlerPrefix": , "eventHandlerPropPrefix": }] diff --git a/docs/rules/jsx-indent-props.md b/docs/rules/jsx-indent-props.md index af2ea453ac..ee6d77d94a 100644 --- a/docs/rules/jsx-indent-props.md +++ b/docs/rules/jsx-indent-props.md @@ -33,7 +33,7 @@ It takes an option as the second parameter which can be `"tab"` for tab-based in ```js ... -"jsx-indent-props": [, 'tab'|] +"react/jsx-indent-props": [, 'tab'|] ... ``` diff --git a/docs/rules/jsx-max-props-per-line.md b/docs/rules/jsx-max-props-per-line.md index 490b50e0f1..4baaf90e14 100644 --- a/docs/rules/jsx-max-props-per-line.md +++ b/docs/rules/jsx-max-props-per-line.md @@ -35,7 +35,7 @@ The following patterns are not considered warnings: ```js ... -"jsx-max-props-per-line": [, { "maximum": , "when": }] +"react/jsx-max-props-per-line": [, { "maximum": , "when": }] ... ``` diff --git a/docs/rules/jsx-no-bind.md b/docs/rules/jsx-no-bind.md index 3baa143c47..ef8258b212 100644 --- a/docs/rules/jsx-no-bind.md +++ b/docs/rules/jsx-no-bind.md @@ -21,7 +21,7 @@ The following patterns are not considered warnings: ## Rule Options ```js -"jsx-no-bind": [, { +"react/jsx-no-bind": [, { "ignoreRefs": || false, "allowArrowFunctions": || false, "allowBind": || false diff --git a/docs/rules/jsx-no-duplicate-props.md b/docs/rules/jsx-no-duplicate-props.md index 729ad39f57..52e4dd7dd2 100644 --- a/docs/rules/jsx-no-duplicate-props.md +++ b/docs/rules/jsx-no-duplicate-props.md @@ -20,7 +20,7 @@ The following patterns are not considered warnings: ```js ... -"jsx-no-duplicate-props": [, { "ignoreCase": }] +"react/jsx-no-duplicate-props": [, { "ignoreCase": }] ... ``` diff --git a/docs/rules/jsx-pascal-case.md b/docs/rules/jsx-pascal-case.md index 077378018a..08dcb3a996 100644 --- a/docs/rules/jsx-pascal-case.md +++ b/docs/rules/jsx-pascal-case.md @@ -40,7 +40,7 @@ The following patterns are not considered warnings: ```js ... -"jsx-pascal-case": [, { allowAllCaps: , ignore: }] +"react/jsx-pascal-case": [, { allowAllCaps: , ignore: }] ... ``` diff --git a/docs/rules/jsx-sort-props.md b/docs/rules/jsx-sort-props.md index 81d1a7bfdf..7429d5deb9 100644 --- a/docs/rules/jsx-sort-props.md +++ b/docs/rules/jsx-sort-props.md @@ -23,7 +23,7 @@ The following patterns are considered okay and do not cause warnings: ```js ... -"jsx-sort-props": [, { +"react/jsx-sort-props": [, { "callbacksLast": , "shorthandFirst": , "shorthandLast": , diff --git a/docs/rules/no-did-mount-set-state.md b/docs/rules/no-did-mount-set-state.md index ce6f78b9a8..45d243054a 100644 --- a/docs/rules/no-did-mount-set-state.md +++ b/docs/rules/no-did-mount-set-state.md @@ -53,7 +53,7 @@ var Hello = React.createClass({ ```js ... -"no-did-mount-set-state": [, ] +"react/no-did-mount-set-state": [, ] ... ``` diff --git a/docs/rules/no-did-update-set-state.md b/docs/rules/no-did-update-set-state.md index fb40e34637..74d7af0b50 100644 --- a/docs/rules/no-did-update-set-state.md +++ b/docs/rules/no-did-update-set-state.md @@ -51,7 +51,7 @@ var Hello = React.createClass({ ```js ... -"no-did-update-set-state": [, ] +"react/no-did-update-set-state": [, ] ... ``` diff --git a/docs/rules/no-multi-comp.md b/docs/rules/no-multi-comp.md index 6122dc602c..a5303004dc 100644 --- a/docs/rules/no-multi-comp.md +++ b/docs/rules/no-multi-comp.md @@ -36,7 +36,7 @@ var HelloJohn = React.createClass({ ```js ... -"no-multi-comp": [, { "ignoreStateless": }] +"react/no-multi-comp": [, { "ignoreStateless": }] ... ``` diff --git a/docs/rules/no-unknown-property.md b/docs/rules/no-unknown-property.md index 772898d78d..6e54499242 100644 --- a/docs/rules/no-unknown-property.md +++ b/docs/rules/no-unknown-property.md @@ -26,7 +26,7 @@ var Hello =
Hello World
; ```js ... -"no-unknown-property": [, { ignore: }] +"react/no-unknown-property": [, { ignore: }] ... ``` diff --git a/docs/rules/no-will-update-set-state.md b/docs/rules/no-will-update-set-state.md index e3dddee237..fca0ac2c0b 100644 --- a/docs/rules/no-will-update-set-state.md +++ b/docs/rules/no-will-update-set-state.md @@ -51,7 +51,7 @@ var Hello = React.createClass({ ```js ... -"no-will-update-set-state": [, ] +"react/no-will-update-set-state": [, ] ... ``` diff --git a/docs/rules/prefer-es6-class.md b/docs/rules/prefer-es6-class.md index 371272feeb..47d7c1b30f 100644 --- a/docs/rules/prefer-es6-class.md +++ b/docs/rules/prefer-es6-class.md @@ -6,7 +6,7 @@ React offers you two way to create traditional components: using the ES5 `React. ```js ... -"prefer-es6-class": [, ] +"react/prefer-es6-class": [, ] ... ``` diff --git a/docs/rules/prefer-stateless-function.md b/docs/rules/prefer-stateless-function.md index 0eaf88d92a..da76b7bd98 100644 --- a/docs/rules/prefer-stateless-function.md +++ b/docs/rules/prefer-stateless-function.md @@ -54,7 +54,7 @@ class Foo extends React.Component { ```js ... -"prefer-stateless-function": [, { "ignorePureComponents": }] +"react/prefer-stateless-function": [, { "ignorePureComponents": }] ... ``` diff --git a/docs/rules/require-optimization.md b/docs/rules/require-optimization.md index 4758e7a574..69bebda6f8 100644 --- a/docs/rules/require-optimization.md +++ b/docs/rules/require-optimization.md @@ -52,7 +52,7 @@ React.createClass({ ```js ... -"require-optimization": [, { allowDecorators: [] }] +"react/require-optimization": [, { allowDecorators: [] }] ... ``` @@ -76,6 +76,6 @@ class Hello extends React.Component {} ```js ... -"require-optimization": [2, {allowDecorators: ['customDecorators']}] +"react/require-optimization": [2, {allowDecorators: ['customDecorators']}] ... ``` diff --git a/docs/rules/self-closing-comp.md b/docs/rules/self-closing-comp.md index 156c9cbdca..2913c5ef3c 100644 --- a/docs/rules/self-closing-comp.md +++ b/docs/rules/self-closing-comp.md @@ -32,7 +32,7 @@ The rule can take one argument to select types of tags, which should be self-clo ```js ... -"self-closing-comp": ["error", { +"react/self-closing-comp": ["error", { "component": true, "html": true }] diff --git a/docs/rules/sort-prop-types.md b/docs/rules/sort-prop-types.md index e569af8847..f8210b9160 100644 --- a/docs/rules/sort-prop-types.md +++ b/docs/rules/sort-prop-types.md @@ -76,7 +76,7 @@ class Component extends React.Component { ```js ... -"sort-prop-types": [, { +"react/sort-prop-types": [, { "callbacksLast": , "ignoreCase": , "requiredFirst": ,