Skip to content

Commit

Permalink
[Docs] jsx-newline, no-unsafe, static-property-placement: Fix c…
Browse files Browse the repository at this point in the history
…ode syntax highlighting
  • Loading branch information
nbsp1221 authored and ljharb committed Apr 22, 2023
1 parent f2d8d26 commit 13f5c19
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -20,7 +20,11 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
* [`display-name`], [`prop-types`]: when checking for a capitalized name, ignore underscores entirely ([#3560][] @ljharb)
* [`no-unused-state`]: avoid crashing on a class field function with destructured state ([#3568][] @ljharb)

### Changed
* [Docs] [`jsx-newline`], [`no-unsafe`], [`static-property-placement`]: Fix code syntax highlighting ([#3563][] @nbsp1221)

[#3568]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3568
[#3563]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3563
[#3560]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3560
[#3555]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3555
[#3548]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3548
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/jsx-newline.md
Expand Up @@ -10,7 +10,7 @@ This is a stylistic rule intended to make JSX code more readable by requiring or

## Rule Options

```json
```json5
...
"react/jsx-newline": [<enabled>, { "prevent": <boolean>, "allowMultilines": <boolean> }]
...
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-unsafe.md
Expand Up @@ -56,7 +56,7 @@ const Foo = bar({

## Rule Options

```json
```json5
...
"react/no-unsafe": [<enabled>, { "checkAliases": <boolean> }]
...
Expand Down
8 changes: 4 additions & 4 deletions docs/rules/static-property-placement.md
Expand Up @@ -127,23 +127,23 @@ MyComponent.propTypes = { /*...*/ };

## Rule Options

```json
```json5
...
"react/static-property-placement": [<enabled>] // `static public field` enabled
...
```

or alternatively:

```json
```json5
...
"react/static-property-placement": [<enabled>, <string>]
...
```

or alternatively:

```json
```json5
...
"react/static-property-placement": [<enabled>, <string>, {
childContextTypes: <string>,
Expand All @@ -168,7 +168,7 @@ The `options` schema defined above allows you to specify different rules for the

_This is only an example, we do not recommend this as a configuration._

```json
```json5
...
"react/static-property-placement": ["warn", "property assignment", {
childContextTypes: "static getter",
Expand Down

0 comments on commit 13f5c19

Please sign in to comment.