Skip to content

Commit 83c9903

Browse files
committed
style: reformat mdx
1 parent 1fd5be8 commit 83c9903

File tree

8 files changed

+126
-132
lines changed

8 files changed

+126
-132
lines changed

apps/website/content/docs/community.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: "Discover the growing community around ESLint React"
55

66
import { BskyPost } from "#/components/BskyPost";
77
import { GitHubRepoGrid } from "#/components/GitHubRepoGrid";
8-
import { projects, presets } from "./community.tsx"
8+
import { projects, presets } from "./community.tsx";
99

1010
## OSS Projects Using ESLint React
1111

apps/website/content/docs/configuration/configure-analyzer.mdx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ Example with `polymorphicPropName` set to `as`:
7272

7373
### `additionalComponents` (Experimental)
7474

75-
<Callout type="info">Consider using `polymorphicPropName` instead when possible, as it's simpler and more efficient.</Callout>
75+
<Callout type="info">
76+
Consider using `polymorphicPropName` instead when possible, as it's simpler and more efficient.
77+
</Callout>
7678

7779
<Callout type="warn">Experimental feature that may lack stability and documentation.</Callout>
7880

@@ -100,7 +102,9 @@ This makes `<EmbedContent src="https://eslint-react.xyz" />{:tsx}` evaluate as `
100102
### `additionalHooks` (Experimental)
101103

102104
<Callout type="warn">
103-
Intended for edge cases. We suggest to use this option **very sparingly, if at all**. Generally saying, we recommend most custom Hooks do not vary the built-in React Hooks, and instead provide a higher-level API that is more focused around a specific use case.
105+
Intended for edge cases. We suggest to use this option **very sparingly, if at all**. Generally saying, we recommend
106+
most custom Hooks do not vary the built-in React Hooks, and instead provide a higher-level API that is more focused
107+
around a specific use case.
104108
</Callout>
105109

106110
Alias variants to built-in React Hooks for rule compatibility:
@@ -130,26 +134,26 @@ export default [
130134
polymorphicPropName: "as",
131135
additionalHooks: {
132136
useEffect: ["useIsomorphicLayoutEffect"],
133-
useLayoutEffect: ["useIsomorphicLayoutEffect"]
137+
useLayoutEffect: ["useIsomorphicLayoutEffect"],
134138
},
135139
additionalComponents: [
136140
{
137141
name: "Link",
138142
as: "a",
139143
attributes: [
140-
{ name: "to", as: "href" } // Maps 'to' prop to 'href' attribute
141-
]
144+
{ name: "to", as: "href" }, // Maps 'to' prop to 'href' attribute
145+
],
142146
},
143147
{
144148
name: "EmbedContent",
145149
as: "iframe",
146150
attributes: [
147-
{ name: "sandbox", defaultValue: "" }
148-
]
149-
}
150-
]
151-
}
152-
}
153-
}
151+
{ name: "sandbox", defaultValue: "" }, // Sets the default value for 'sandbox' attribute
152+
],
153+
},
154+
],
155+
},
156+
},
157+
},
154158
];
155159
```

apps/website/content/docs/configuration/configure-enhanced-additional-components.mdx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
title: Configure Enhanced Additional Components (WIP)
33
---
44

5-
<Callout type="warn">This page contains experimental features that still under development. The content may change without notice.</Callout>
5+
<Callout type="warn">
6+
This page contains experimental features that still under development. The content may change without notice.
7+
</Callout>
68

79
## Examples
810

@@ -26,36 +28,28 @@ export default [
2628
{
2729
// Match all components with `html` attribute and alias it to `dangerouslySetInnerHTML`
2830
name: "*",
29-
attributes: [
30-
{ name: "html", as: "dangerouslySetInnerHTML" },
31-
],
31+
attributes: [{ name: "html", as: "dangerouslySetInnerHTML" }],
3232
},
3333
{
3434
// Match all components with `component="button"` attribute and alias it to `button` component with `type="button"` attribute
3535
name: "*",
3636
selector: ":has(JSXAttribute[name.name='component'][value.value='button'])",
3737
as: "button",
38-
attributes: [
39-
{ name: "type", defaultValue: "button" },
40-
],
38+
attributes: [{ name: "type", defaultValue: "button" }],
4139
},
4240
{
4341
// Match Button component with `component="a"` attribute and alias it to `a` component with `rel="noopener noreferrer"` attribute
4442
name: "Button",
4543
selector: ":has(JSXAttribute[name.name='component'][value.value='a'])",
4644
as: "a",
47-
attributes: [
48-
{ name: "rel", defaultValue: "noopener noreferrer" },
49-
],
45+
attributes: [{ name: "rel", defaultValue: "noopener noreferrer" }],
5046
},
5147
{
5248
// Match MUIButton component with a `href` or `to` attribute and alias it to `a` component with `rel="noopener noreferrer"` attribute
5349
name: "MUIButton",
5450
selector: ":matches(:has(JSXAttribute[name.name='href']), :has(JSXAttribute[name.name='to']))",
5551
as: "a",
56-
attributes: [
57-
{ name: "rel", defaultValue: "noopener noreferrer" },
58-
],
52+
attributes: [{ name: "rel", defaultValue: "noopener noreferrer" }],
5953
},
6054
{
6155
// Match TextInput component with `mode="uncontrolled"` attribute and alias it to an uncontrolled input component with `content` and `onContentUpdate` pair

apps/website/content/docs/faq.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: FAQ
33
---
44

5-
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
5+
import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
66

77
<Accordions>
88

apps/website/content/docs/getting-started/javascript.mdx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,13 @@ export default defineConfig([
4242
// Extend recommended rule sets from:
4343
// 1. ESLint JS's recommended rules
4444
// 2. ESLint React's recommended rules
45-
extends: [
46-
eslintJs.configs.recommended,
47-
eslintReact.configs.recommended,
48-
],
45+
extends: [eslintJs.configs.recommended, eslintReact.configs.recommended],
4946

5047
// Configure language/parsing options
5148
languageOptions: {
5249
// Include browser global variables (window, document, etc.)
5350
globals: {
54-
...globals.browser
51+
...globals.browser,
5552
},
5653
parserOptions: {
5754
ecmaFeatures: {
@@ -97,7 +94,7 @@ export default [
9794
// ...other options
9895
"jsx": "react-jsx",
9996
},
100-
"include": ["**/*.js", "**/*.jsx"]
97+
"include": ["**/*.js", "**/*.jsx"],
10198
}
10299
```
103100

apps/website/content/docs/getting-started/typescript.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ export default tseslint.config({
4242
// 1. ESLint JS's recommended rules
4343
// 2. TypeScript ESLint recommended rules
4444
// 3. ESLint React's recommended-typescript rules
45-
extends: [
46-
eslintJs.configs.recommended,
47-
tseslint.configs.recommended,
48-
eslintReact.configs["recommended-typescript"],
49-
],
45+
extends: [eslintJs.configs.recommended, tseslint.configs.recommended, eslintReact.configs["recommended-typescript"]],
5046

5147
// Configure language/parsing options
5248
languageOptions: {
@@ -94,7 +90,7 @@ export default [
9490
// ...other options
9591
"jsx": "react-jsx",
9692
},
97-
"include": ["**/*.ts", "**/*.tsx"]
93+
"include": ["**/*.ts", "**/*.tsx"],
9894
}
9995
```
10096

apps/website/content/docs/presets.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ title: Presets
44

55
The following presets are available in `@eslint-react/eslint-plugin`:
66

7-
<Callout type="info">For ESLint Legacy Config (`.eslintrc.*`), add a `-legacy` suffix to the preset name (e.g. `recommended-legacy`).</Callout>
7+
<Callout type="info">
8+
For ESLint Legacy Config (`.eslintrc.*`), add a `-legacy` suffix to the preset name (e.g. `recommended-legacy`).
9+
</Callout>
810

911
## Bare Bones
1012

@@ -30,6 +32,7 @@ The following presets are available in `@eslint-react/eslint-plugin`:
3032
Same as the `recommended-typescript` preset but enables additional rules that require type information.
3133

3234
## Other
35+
3336
- `disable-dom`\
3437
Disable rules in the `dom` preset.
3538
- `disable-web-api`\

0 commit comments

Comments
 (0)