Skip to content

Commit fe935b2

Browse files
committed
docs: reorder rules in rules overview and nav list
1 parent 9b8d684 commit fe935b2

File tree

5 files changed

+15
-480
lines changed

5 files changed

+15
-480
lines changed

apps/website/content/docs/rules/meta.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
"pages": [
33
"overview",
44
"---Core Rules---",
5-
"avoid-shorthand-boolean",
6-
"avoid-shorthand-fragment",
5+
"jsx-no-duplicate-props",
6+
"jsx-no-undef",
7+
"jsx-uses-vars",
78
"no-access-state-in-setstate",
89
"no-array-index-key",
910
"no-children-count",
@@ -52,9 +53,8 @@
5253
"prefer-read-only-props",
5354
"prefer-shorthand-boolean",
5455
"prefer-shorthand-fragment",
55-
"jsx-no-duplicate-props",
56-
"jsx-no-undef",
57-
"jsx-uses-vars",
56+
"avoid-shorthand-boolean",
57+
"avoid-shorthand-fragment",
5858
"---DOM Rules---",
5959
"dom-no-dangerously-set-innerhtml",
6060
"dom-no-dangerously-set-innerhtml-with-children",

apps/website/content/docs/rules/overview.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ Linter rules can have false positives, false negatives, and some rules are depen
2525

2626
| Rule || 🌟 | Description | `react` |
2727
| :----------------------------------------------------------------------------------- | :- | :------: | :---------------------------------------------------------------------------------------------------- | :-----: |
28-
| [`avoid-shorthand-boolean`](./avoid-shorthand-boolean) | 0️⃣ | `🔧` | Enforces explicit boolean values for boolean attributes | |
29-
| [`avoid-shorthand-fragment`](./avoid-shorthand-fragment) | 0️⃣ | | Enforces explicit `<Fragment>` components instead of the shorthand `<>` or `</>` syntax | |
28+
| [`jsx-no-duplicate-props`](./jsx-no-duplicate-props) | 1️⃣ | | Disallow duplicate props in JSX elements | |
29+
| [`jsx-no-undef`](./jsx-no-undef) | 2️⃣ | | Disallow undefined variables in JSX elements | |
30+
| [`jsx-uses-vars`](./jsx-uses-vars) | 1️⃣ | | Marks variables used in JSX elements as used | |
3031
| [`no-access-state-in-setstate`](./no-access-state-in-setstate) | 2️⃣ | | Disallow accessing `this.state` inside `setState` calls | |
3132
| [`no-array-index-key`](./no-array-index-key) | 1️⃣ | | Disallow an item's index in the array as its key | |
3233
| [`no-children-count`](./no-children-count) | 1️⃣ | | Disallow `Children.count` | |
@@ -74,9 +75,8 @@ Linter rules can have false positives, false negatives, and some rules are depen
7475
| [`prefer-read-only-props`](./prefer-read-only-props) | 0️⃣ | `💭` `🧪` | Enforces read-only props in components | |
7576
| [`prefer-shorthand-boolean`](./prefer-shorthand-boolean) | 0️⃣ | `🔧` | Enforces shorthand syntax for boolean attributes | |
7677
| [`prefer-shorthand-fragment`](./prefer-shorthand-fragment) | 0️⃣ | `🔧` | Enforces shorthand syntax for fragments | |
77-
| [`jsx-no-duplicate-props`](./jsx-no-duplicate-props) | 1️⃣ | | Disallow duplicate props in JSX elements | |
78-
| [`jsx-no-undef`](./jsx-no-undef) | 2️⃣ | | Disallow undefined variables in JSX elements | |
79-
| [`jsx-uses-vars`](./jsx-uses-vars) | 1️⃣ | | Marks variables used in JSX elements as used | |
78+
| [`avoid-shorthand-boolean`](./avoid-shorthand-boolean) | 0️⃣ | `🔧` | Enforces explicit boolean values for boolean attributes | |
79+
| [`avoid-shorthand-fragment`](./avoid-shorthand-fragment) | 0️⃣ | | Enforces explicit `<Fragment>` components instead of the shorthand `<>` or `</>` syntax | |
8080

8181
## DOM Rules
8282

apps/website/eslint.config.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import * as configs from "@local/configs/eslint";
44
// @ts-expect-error - no types for this package
55
import pluginNext from "@next/eslint-plugin-next";
66
import gitignore from "eslint-config-flat-gitignore";
7-
import pluginMdx from "eslint-plugin-mdx";
87
import pluginReactHooks from "eslint-plugin-react-hooks";
98
import pluginReactRefresh from "eslint-plugin-react-refresh";
109
import tseslint from "typescript-eslint";
@@ -23,19 +22,18 @@ export default tseslint.config(
2322
extends: [
2423
markdown.configs.recommended,
2524
],
26-
files: GLOB_MD,
25+
files: [...GLOB_MD, ...GLOB_MDX],
2726
language: "markdown/gfm",
2827
rules: {
29-
"markdown/no-html": "error",
28+
"markdown/no-html": "warn",
3029
"markdown/no-missing-label-refs": "off",
3130
},
3231
},
3332
{
34-
...pluginMdx.flat,
3533
files: GLOB_MDX,
36-
processor: pluginMdx.createRemarkProcessor({
37-
lintCodeBlocks: false,
38-
}),
34+
rules: {
35+
"markdown/no-html": "off",
36+
},
3937
},
4038
{
4139
extends: [

apps/website/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"eslint": "^9.23.0",
5151
"eslint-plugin-de-morgan": "^1.2.1",
5252
"eslint-plugin-import-x": "^4.9.1",
53-
"eslint-plugin-mdx": "^3.2.0",
5453
"eslint-plugin-perfectionist": "^4.10.1",
5554
"eslint-plugin-react-hooks": "^5.2.0",
5655
"eslint-plugin-react-refresh": "^0.4.19",

0 commit comments

Comments
 (0)