Skip to content

Commit ca8bc9e

Browse files
authored
docs: add experimental status to rules overview (#1012)
1 parent b7020a0 commit ca8bc9e

File tree

4 files changed

+46
-118
lines changed

4 files changed

+46
-118
lines changed

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

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Linter rules can have false positives, false negatives, and some rules are depen
1111

1212
- 🌟 - Feature
1313
- ⚙️ - Configurable
14+
- 🧪 - Experimental
1415
- 🐞 - Debug
1516
- 💭 - Type Chcking
1617
- 🔧 - Fixable
@@ -37,7 +38,7 @@ Linter rules can have false positives, false negatives, and some rules are depen
3738
| [`no-class-component`](./no-class-component) | 0️⃣ | | Disallow class component | |
3839
| [`no-clone-element`](./no-clone-element) | 1️⃣ | | Disallow `cloneElement` | |
3940
| [`no-comment-textnodes`](./no-comment-textnodes) | 1️⃣ | | Prevents comments from being inserted as text nodes | |
40-
| [`no-complex-conditional-rendering`](./no-complex-conditional-rendering) | 0️⃣ | | Disallow complex conditional rendering in JSX expressions | |
41+
| [`no-complex-conditional-rendering`](./no-complex-conditional-rendering) | 0️⃣ | `🧪` | Disallow complex conditional rendering in JSX expressions | |
4142
| [`no-component-will-mount`](./no-component-will-mount) | 2️⃣ | `🔄` | Replaces usages of `componentWillMount` with `UNSAFE_componentWillMount` | >=16.3.0 |
4243
| [`no-component-will-receive-props`](./no-component-will-receive-props) | 2️⃣ | `🔄` | Replaces usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps` | >=16.3.0 |
4344
| [`no-component-will-update`](./no-component-will-update) | 2️⃣ | `🔄` | Replaces usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate` | >=16.3.0 |
@@ -48,7 +49,7 @@ Linter rules can have false positives, false negatives, and some rules are depen
4849
| [`no-duplicate-jsx-props`](./no-duplicate-jsx-props) | 1️⃣ | | Disallow duplicate props in JSX elements | |
4950
| [`no-duplicate-key`](./no-duplicate-key) | 2️⃣ | | Disallow duplicate `key` on elements in the same array or a list of `children` | |
5051
| [`no-forward-ref`](./no-forward-ref) | 1️⃣ | `🔄` | Replaces usages of `forwardRef` with passing `ref` as a prop | >=19.0.0 |
51-
| [`no-implicit-key`](./no-implicit-key) | 1️⃣ | | Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects) | |
52+
| [`no-implicit-key`](./no-implicit-key) | 1️⃣ | `🧪` | Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects) | |
5253
| [`no-leaked-conditional-rendering`](./no-leaked-conditional-rendering) | 1️⃣ | `💭` | Prevents problematic leaked values from being rendered | |
5354
| [`no-missing-component-display-name`](./no-missing-component-display-name) | 0️⃣ | | Enforces that all components have a `displayName` which can be used in devtools | |
5455
| [`no-missing-context-display-name`](./no-missing-context-display-name) | 0️⃣ | | Enforces that all contexts have a `displayName` which can be used in devtools | |
@@ -71,8 +72,8 @@ Linter rules can have false positives, false negatives, and some rules are depen
7172
| [`no-useless-forward-ref`](./no-useless-forward-ref) | 1️⃣ | | Disallow useless `forwardRef` calls on components that don't use `ref`s | |
7273
| [`no-useless-fragment`](./no-useless-fragment) | 0️⃣ | `🔧` `⚙️` | Disallow useless fragment elements | |
7374
| [`prefer-destructuring-assignment`](./prefer-destructuring-assignment) | 0️⃣ | | Enforces destructuring assignment for component props and context | |
74-
| [`prefer-react-namespace-import`](./prefer-react-namespace-import) | 0️⃣ | `🔧` | Enforces React is imported via a namespace import | |
75-
| [`prefer-read-only-props`](./prefer-read-only-props) | 0️⃣ | `💭` | Enforces read-only props in components | |
75+
| [`prefer-react-namespace-import`](./prefer-react-namespace-import) | 0️⃣ | `🧪` `🔧` | Enforces React is imported via a namespace import | |
76+
| [`prefer-read-only-props`](./prefer-read-only-props) | 0️⃣ | `🧪` `💭` | Enforces read-only props in components | |
7677
| [`prefer-shorthand-boolean`](./prefer-shorthand-boolean) | 0️⃣ | `🔧` | Enforces shorthand syntax for boolean attributes | |
7778
| [`prefer-shorthand-fragment`](./prefer-shorthand-fragment) | 0️⃣ | `🔧` | Enforces shorthand syntax for fragments | |
7879
| [`use-jsx-vars`](./use-jsx-vars) | 1️⃣ | | Marks variables used in JSX as used | |
@@ -109,14 +110,14 @@ Linter rules can have false positives, false negatives, and some rules are depen
109110

110111
## Hooks Extra Rules
111112

112-
| Rule || Description |
113-
| :--------------------------------------------------------------------------------------------------- | :- | :----------------------------------------------------------------------------------------- |
114-
| [`no-direct-set-state-in-use-effect`](./hooks-extra-no-direct-set-state-in-use-effect) | 1️⃣ | Disallow direct calls to the `set` function of `useState` in `useEffect` |
115-
| [`no-direct-set-state-in-use-layout-effect`](./hooks-extra-no-direct-set-state-in-use-layout-effect) | 0️⃣ | Disallow direct calls to the `set` function of `useState` in `useLayoutEffect` |
116-
| [`no-unnecessary-use-callback`](./hooks-extra-no-unnecessary-use-callback) | 0️⃣ | Disallow unnecessary usage of `useCallback` |
117-
| [`no-unnecessary-use-memo`](./hooks-extra-no-unnecessary-use-memo) | 0️⃣ | Disallow unnecessary usage of `useMemo` |
118-
| [`no-unnecessary-use-prefix`](./hooks-extra-no-unnecessary-use-prefix) | 1️⃣ | Enforces that a function with the `use` prefix should use at least one Hook inside of it |
119-
| [`prefer-use-state-lazy-initialization`](./hooks-extra-prefer-use-state-lazy-initialization) | 0️⃣ | Enforces function calls made inside `useState` to be wrapped in an `initializer function` |
113+
| Rule || 🌟 | Description |
114+
| :--------------------------------------------------------------------------------------------------- | :- | :------: | :----------------------------------------------------------------------------------------- |
115+
| [`no-direct-set-state-in-use-effect`](./hooks-extra-no-direct-set-state-in-use-effect) | 1️⃣ | `🧪` | Disallow direct calls to the `set` function of `useState` in `useEffect` |
116+
| [`no-direct-set-state-in-use-layout-effect`](./hooks-extra-no-direct-set-state-in-use-layout-effect) | 0️⃣ | `🧪` | Disallow direct calls to the `set` function of `useState` in `useLayoutEffect` |
117+
| [`no-unnecessary-use-callback`](./hooks-extra-no-unnecessary-use-callback) | 0️⃣ | `🧪` | Disallow unnecessary usage of `useCallback` |
118+
| [`no-unnecessary-use-memo`](./hooks-extra-no-unnecessary-use-memo) | 0️⃣ | `🧪` | Disallow unnecessary usage of `useMemo` |
119+
| [`no-unnecessary-use-prefix`](./hooks-extra-no-unnecessary-use-prefix) | 1️⃣ | | Enforces that a function with the `use` prefix should use at least one Hook inside of it |
120+
| [`prefer-use-state-lazy-initialization`](./hooks-extra-prefer-use-state-lazy-initialization) | 0️⃣ | `🧪` | Enforces function calls made inside `useState` to be wrapped in an `initializer function` |
120121

121122
## Naming Convention Rules
122123

apps/website/eslint.config.mjs renamed to apps/website/eslint.config.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
import js from "@eslint/js";
2-
import react from "@eslint-react/eslint-plugin";
32
import markdown from "@eslint/markdown";
3+
import react from "@eslint-react/eslint-plugin";
4+
// @ts-expect-error - no types for this package
5+
import pluginNext from "@next/eslint-plugin-next";
6+
import gitignore from "eslint-config-flat-gitignore";
47
import pluginDeMorgan from "eslint-plugin-de-morgan";
58
import pluginMdx from "eslint-plugin-mdx";
6-
import pluginNext from "@next/eslint-plugin-next";
79
import pluginPerfectionist from "eslint-plugin-perfectionist";
810
import pluginReactHooks from "eslint-plugin-react-hooks";
911
import pluginReactRefresh from "eslint-plugin-react-refresh";
10-
import pluginReactCompiler from "eslint-plugin-react-compiler";
1112
import pluginSimpleImportSort from "eslint-plugin-simple-import-sort";
1213
import pluginUnicorn from "eslint-plugin-unicorn";
1314
import tseslint from "typescript-eslint";
14-
import gitignore from "eslint-config-flat-gitignore";
15+
1516
import TSCONFIG from "./tsconfig.json" with { type: "json" };
1617

1718
const GLOB_TS = ["**/*.ts", "**/*.tsx"];
@@ -52,10 +53,10 @@ const p11tGroups = {
5253

5354
export default tseslint.config(
5455
{
55-
files: GLOB_MD,
5656
extends: [
5757
markdown.configs.recommended,
5858
],
59+
files: GLOB_MD,
5960
language: "markdown/gfm",
6061
rules: {
6162
"markdown/no-html": "error",
@@ -70,20 +71,18 @@ export default tseslint.config(
7071
}),
7172
},
7273
{
73-
files: GLOB_TS,
7474
extends: [
7575
js.configs.recommended,
7676
tseslint.configs.recommended,
7777
pluginDeMorgan.configs.recommended,
7878
pluginPerfectionist.configs["recommended-natural"],
7979
],
80+
files: GLOB_TS,
8081
plugins: {
8182
"simple-import-sort": pluginSimpleImportSort,
8283
unicorn: pluginUnicorn,
8384
},
8485
rules: {
85-
"simple-import-sort/imports": "warn",
86-
"simple-import-sort/exports": "warn",
8786
"perfectionist/sort-exports": "off",
8887
"perfectionist/sort-imports": "off",
8988
"perfectionist/sort-interfaces": [
@@ -114,6 +113,8 @@ export default tseslint.config(
114113
],
115114
"perfectionist/sort-switch-case": "off",
116115
"perfectionist/sort-union-types": "off",
116+
"simple-import-sort/exports": "warn",
117+
"simple-import-sort/imports": "warn",
117118
"unicorn/template-indent": [
118119
"warn",
119120
{
@@ -124,10 +125,10 @@ export default tseslint.config(
124125
},
125126
},
126127
{
127-
files: TSCONFIG.include,
128128
extends: [
129129
tseslint.configs.recommendedTypeChecked,
130130
],
131+
files: TSCONFIG.include,
131132
languageOptions: {
132133
parser: tseslint.parser,
133134
parserOptions: {
@@ -141,7 +142,6 @@ export default tseslint.config(
141142
files: TSCONFIG.include,
142143
...react.configs["recommended-type-checked"],
143144
},
144-
pluginReactCompiler.configs.recommended,
145145
{
146146
files: TSCONFIG.include,
147147
plugins: {
@@ -179,8 +179,8 @@ export default tseslint.config(
179179
files: [...GLOB_JS, ...GLOB_CONFIG],
180180
rules: {
181181
...tseslint.configs.disableTypeChecked.rules,
182-
"no-undef": "off",
183182
"no-console": "off",
183+
"no-undef": "off",
184184
},
185185
},
186186
gitignore(),

apps/website/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,12 @@
4646
"@types/react": "^19.0.12",
4747
"@types/react-dom": "^19.0.4",
4848
"autoprefixer": "^10.4.21",
49-
"babel-plugin-react-compiler": "^19.0.0-beta-bafa41b-20250307",
5049
"dedent": "^1.5.3",
5150
"eslint": "^9.23.0",
5251
"eslint-plugin-de-morgan": "^1.2.1",
5352
"eslint-plugin-import-x": "^4.9.1",
5453
"eslint-plugin-mdx": "^3.2.0",
5554
"eslint-plugin-perfectionist": "^4.10.1",
56-
"eslint-plugin-react-compiler": "^19.0.0-beta-bafa41b-20250307",
5755
"eslint-plugin-react-hooks": "^5.2.0",
5856
"eslint-plugin-react-refresh": "^0.4.19",
5957
"eslint-plugin-simple-import-sort": "^12.1.1",

0 commit comments

Comments
 (0)