diff --git a/docs/src/rules/jsx-quotes.md b/docs/src/rules/jsx-quotes.md index 4f0d78ba78a..ddb20002b8a 100644 --- a/docs/src/rules/jsx-quotes.md +++ b/docs/src/rules/jsx-quotes.md @@ -37,9 +37,9 @@ This rule has a string option: Examples of **incorrect** code for this rule with the default `"prefer-double"` option: -:::incorrect +:::incorrect { "ecmaFeatures": { "jsx": true } } -```xml +```jsx /*eslint jsx-quotes: ["error", "prefer-double"]*/ @@ -49,9 +49,9 @@ Examples of **incorrect** code for this rule with the default `"prefer-double"` Examples of **correct** code for this rule with the default `"prefer-double"` option: -:::correct +:::correct { "ecmaFeatures": { "jsx": true } } -```xml +```jsx /*eslint jsx-quotes: ["error", "prefer-double"]*/ @@ -64,9 +64,9 @@ Examples of **correct** code for this rule with the default `"prefer-double"` op Examples of **incorrect** code for this rule with the `"prefer-single"` option: -:::incorrect +:::incorrect { "ecmaFeatures": { "jsx": true } } -```xml +```jsx /*eslint jsx-quotes: ["error", "prefer-single"]*/ @@ -76,9 +76,9 @@ Examples of **incorrect** code for this rule with the `"prefer-single"` option: Examples of **correct** code for this rule with the `"prefer-single"` option: -:::correct +:::correct { "ecmaFeatures": { "jsx": true } } -```xml +```jsx /*eslint jsx-quotes: ["error", "prefer-single"]*/ diff --git a/docs/src/rules/keyword-spacing.md b/docs/src/rules/keyword-spacing.md index a77e3ddc420..9c1ca55fc38 100644 --- a/docs/src/rules/keyword-spacing.md +++ b/docs/src/rules/keyword-spacing.md @@ -58,9 +58,9 @@ if (foo) { Examples of **correct** code for this rule with the default `{ "before": true }` option: -::: correct +::: correct { "ecmaFeatures": { "jsx": true } } -```js +```jsx /*eslint keyword-spacing: ["error", { "before": true }]*/ /*eslint-env es6*/ @@ -173,9 +173,9 @@ if(foo) { Examples of **correct** code for this rule with the default `{ "after": true }` option: -::: correct +::: correct { "ecmaFeatures": { "jsx": true } } -```js +```jsx /*eslint keyword-spacing: ["error", { "after": true }]*/ if (foo) { diff --git a/docs/src/rules/no-extra-parens.md b/docs/src/rules/no-extra-parens.md index 0476e628010..77bef24a728 100644 --- a/docs/src/rules/no-extra-parens.md +++ b/docs/src/rules/no-extra-parens.md @@ -214,9 +214,9 @@ foo ? bar : (baz || qux); Examples of **correct** code for this rule with the `all` and `{ "ignoreJSX": "all" }` options: -::: correct +::: correct { "ecmaFeatures": { "jsx": true } } -```js +```jsx /* eslint no-extra-parens: ["error", "all", { ignoreJSX: "all" }] */ const Component = (
) const Component = ( @@ -230,9 +230,9 @@ const Component = ( Examples of **incorrect** code for this rule with the `all` and `{ "ignoreJSX": "multi-line" }` options: -::: incorrect +::: incorrect { "ecmaFeatures": { "jsx": true } } -```js +```jsx /* eslint no-extra-parens: ["error", "all", { ignoreJSX: "multi-line" }] */ const Component = (
) const Component = (

) @@ -242,9 +242,9 @@ const Component = (

) Examples of **correct** code for this rule with the `all` and `{ "ignoreJSX": "multi-line" }` options: -::: correct +::: correct { "ecmaFeatures": { "jsx": true } } -```js +```jsx /* eslint no-extra-parens: ["error", "all", { ignoreJSX: "multi-line" }] */ const Component = (
@@ -262,9 +262,9 @@ const Component = ( Examples of **incorrect** code for this rule with the `all` and `{ "ignoreJSX": "single-line" }` options: -::: incorrect +::: incorrect { "ecmaFeatures": { "jsx": true } } -```js +```jsx /* eslint no-extra-parens: ["error", "all", { ignoreJSX: "single-line" }] */ const Component = (
@@ -282,9 +282,9 @@ const Component = ( Examples of **correct** code for this rule with the `all` and `{ "ignoreJSX": "single-line" }` options: -::: correct +::: correct { "ecmaFeatures": { "jsx": true } } -```js +```jsx /* eslint no-extra-parens: ["error", "all", { ignoreJSX: "single-line" }] */ const Component = (
) const Component = (

) diff --git a/docs/src/rules/no-inline-comments.md b/docs/src/rules/no-inline-comments.md index 687464e91c7..d6a32db4e47 100644 --- a/docs/src/rules/no-inline-comments.md +++ b/docs/src/rules/no-inline-comments.md @@ -54,9 +54,9 @@ Comments inside the curly braces in JSX are allowed to be on the same line as th Examples of **incorrect** code for this rule: -::: incorrect +::: incorrect { "ecmaFeatures": { "jsx": true } } -```js +```jsx /*eslint no-inline-comments: "error"*/ var foo =
{ /* On the same line with other code */ }

Some heading

; @@ -74,9 +74,9 @@ var bar = ( Examples of **correct** code for this rule: -::: correct +::: correct { "ecmaFeatures": { "jsx": true } } -```js +```jsx /*eslint no-inline-comments: "error"*/ var foo = ( diff --git a/docs/src/rules/no-irregular-whitespace.md b/docs/src/rules/no-irregular-whitespace.md index cb2c62bda58..137c588d9b1 100644 --- a/docs/src/rules/no-irregular-whitespace.md +++ b/docs/src/rules/no-irregular-whitespace.md @@ -197,9 +197,9 @@ function thing() { Examples of additional **correct** code for this rule with the `{ "skipJSXText": true }` option: -::: correct +::: correct { "ecmaFeatures": { "jsx": true } } -```js +```jsx /*eslint no-irregular-whitespace: ["error", { "skipJSXText": true }]*/ /*eslint-env es6*/ diff --git a/docs/src/rules/no-unused-expressions.md b/docs/src/rules/no-unused-expressions.md index c67a2a61706..614ea5b11b7 100644 --- a/docs/src/rules/no-unused-expressions.md +++ b/docs/src/rules/no-unused-expressions.md @@ -251,7 +251,7 @@ JSX is most-commonly used in the React ecosystem, where it is compiled to `React Examples of **incorrect** code for the `{ "enforceForJSX": true }` option: -::: incorrect +::: incorrect { "ecmaFeatures": { "jsx": true } } ```jsx /*eslint no-unused-expressions: ["error", { "enforceForJSX": true }]*/ @@ -265,7 +265,7 @@ Examples of **incorrect** code for the `{ "enforceForJSX": true }` option: Examples of **correct** code for the `{ "enforceForJSX": true }` option: -::: correct +::: correct { "ecmaFeatures": { "jsx": true } } ```jsx /*eslint no-unused-expressions: ["error", { "enforceForJSX": true }]*/