Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Fix code syntax highlighting #3563

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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