eslint-plugin-react-features 1.1.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +92 -0
- package/README.md +99 -19
- package/package.json +20 -4
- package/src/index.d.ts +1004 -21
- package/src/index.js +78 -16
- package/src/oxlint.d.ts +20 -0
- package/src/oxlint.js +21 -0
- package/src/rules/component-api/no-arbitrary-token-class.d.ts +17 -0
- package/src/rules/component-api/no-arbitrary-token-class.js +85 -0
- package/src/rules/component-api/no-default-test-id.d.ts +15 -0
- package/src/rules/component-api/no-default-test-id.js +53 -0
- package/src/rules/component-api/no-inline-style.d.ts +15 -0
- package/src/rules/component-api/no-inline-style.js +63 -0
- package/src/rules/component-api/no-is-prefix-prop.d.ts +17 -0
- package/src/rules/component-api/no-is-prefix-prop.js +66 -0
- package/src/rules/component-api/no-kind-prop-discriminator.d.ts +25 -0
- package/src/rules/component-api/no-kind-prop-discriminator.js +62 -0
- package/src/rules/component-api/no-raw-color-literal.d.ts +16 -0
- package/src/rules/component-api/no-raw-color-literal.js +63 -0
- package/src/rules/component-api/no-wrapper-sub-component.d.ts +23 -0
- package/src/rules/component-api/no-wrapper-sub-component.js +103 -0
- package/src/rules/component-api/require-data-slot.d.ts +15 -0
- package/src/rules/component-api/require-data-slot.js +45 -0
- package/src/rules/migration/react-class-to-hooks.js +6 -1
- package/src/rules/performance/no-unnecessary-rerenders.js +7 -3
- package/src/rules/performance/react-no-inline-functions.js +3 -1
- package/src/rules/performance/react-render-optimization.js +2 -1
- package/src/rules/react/checked-requires-onchange-or-readonly.js +1 -0
- package/src/rules/react/default-props-match-prop-types.js +1 -0
- package/src/rules/react/display-name.js +1 -0
- package/src/rules/react/hooks-exhaustive-deps.d.ts +1 -1
- package/src/rules/react/hooks-exhaustive-deps.js +136 -47
- package/src/rules/react/jsx-handler-names.js +1 -0
- package/src/rules/react/jsx-key.js +3 -2
- package/src/rules/react/jsx-max-depth.js +1 -0
- package/src/rules/react/jsx-no-bind.js +1 -0
- package/src/rules/react/jsx-no-duplicate-props.js +1 -0
- package/src/rules/react/jsx-no-literals.js +1 -0
- package/src/rules/react/jsx-no-script-url.js +6 -2
- package/src/rules/react/jsx-no-target-blank.js +7 -1
- package/src/rules/react/no-access-state-in-setstate.js +1 -0
- package/src/rules/react/no-adjacent-inline-elements.js +1 -0
- package/src/rules/react/no-arrow-function-lifecycle.js +1 -0
- package/src/rules/react/no-children-prop.js +1 -0
- package/src/rules/react/no-danger-with-children.js +2 -0
- package/src/rules/react/no-danger.js +3 -0
- package/src/rules/react/no-deprecated.js +1 -0
- package/src/rules/react/no-did-mount-set-state.js +1 -0
- package/src/rules/react/no-did-update-set-state.js +1 -0
- package/src/rules/react/no-direct-mutation-state.js +24 -66
- package/src/rules/react/no-find-dom-node.js +1 -0
- package/src/rules/react/no-invalid-html-attribute.js +1 -0
- package/src/rules/react/no-is-mounted.js +1 -0
- package/src/rules/react/no-multi-comp.js +4 -0
- package/src/rules/react/no-namespace.js +1 -0
- package/src/rules/react/no-object-type-as-default-prop.js +1 -0
- package/src/rules/react/no-redundant-should-component-update.js +1 -0
- package/src/rules/react/no-render-return-value.js +1 -0
- package/src/rules/react/no-set-state.js +1 -0
- package/src/rules/react/no-string-refs.js +1 -0
- package/src/rules/react/no-this-in-sfc.js +1 -0
- package/src/rules/react/no-typos.js +1 -0
- package/src/rules/react/no-unescaped-entities.js +1 -0
- package/src/rules/react/no-unknown-property.js +1 -0
- package/src/rules/react/no-unsafe.js +1 -0
- package/src/rules/react/prefer-es6-class.js +1 -0
- package/src/rules/react/prefer-stateless-function.js +8 -3
- package/src/rules/react/prop-types.js +2 -0
- package/src/rules/react/react-in-jsx-scope.js +1 -0
- package/src/rules/react/require-default-props.js +4 -0
- package/src/rules/react/require-optimization.js +1 -0
- package/src/rules/react/require-render-return.js +1 -0
- package/src/rules/react/required-attributes.js +6 -0
- package/src/rules/react/sort-comp.js +17 -13
- package/src/rules/react/state-in-constructor.js +3 -0
- package/src/rules/react/static-property-placement.js +7 -0
- package/src/rules/react/void-dom-elements-no-children.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,95 @@
|
|
|
1
|
+
## [1.1.4] - 2026-05-03
|
|
2
|
+
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#100](https://github.com/ofri-peretz/eslint/pull/100) [`fcb6d8e`](https://github.com/ofri-peretz/eslint/commit/fcb6d8ed6c6f531fe11427508673a31fe754a2e6) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - Expose the `component-api/*` rule namespace to consumers.
|
|
8
|
+
|
|
9
|
+
Eight rules — `no-default-test-id`, `require-data-slot`, `no-is-prefix-prop`,
|
|
10
|
+
`no-inline-style`, `no-raw-color-literal`, `no-arbitrary-token-class`,
|
|
11
|
+
`no-kind-prop-discriminator`, `no-wrapper-sub-component` — already exist in
|
|
12
|
+
`src/rules/component-api/`, but they were not previously included in the
|
|
13
|
+
published `rules` map and so could not be registered by consumers.
|
|
14
|
+
This release adds them so downstream apps (e.g. `apps/blog`, `apps/docs`,
|
|
15
|
+
`interlace-landing`) can register the `componentApi` preset via:
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import reactFeatures from "eslint-plugin-react-features";
|
|
19
|
+
|
|
20
|
+
{
|
|
21
|
+
plugins: { "react-features": reactFeatures },
|
|
22
|
+
rules: {
|
|
23
|
+
"react-features/component-api/no-default-test-id": "error",
|
|
24
|
+
"react-features/component-api/require-data-slot": "warn",
|
|
25
|
+
"react-features/component-api/no-is-prefix-prop": "warn",
|
|
26
|
+
"react-features/component-api/no-inline-style": "warn",
|
|
27
|
+
"react-features/component-api/no-raw-color-literal": "warn",
|
|
28
|
+
"react-features/component-api/no-arbitrary-token-class": "warn",
|
|
29
|
+
"react-features/component-api/no-kind-prop-discriminator": "warn",
|
|
30
|
+
"react-features/component-api/no-wrapper-sub-component": "warn",
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Each rule corresponds to a rule ID (R5/R6/R8/R11/R12/R18/R19) in the
|
|
36
|
+
`interlace-component` skill at `agents/skills/interlace-component/SKILL.md`.
|
|
37
|
+
The rules are not part of the `recommended` config — they ship as an opt-in
|
|
38
|
+
`componentApi` preset that strict design systems can enable on top of the
|
|
39
|
+
base react ruleset.
|
|
40
|
+
|
|
41
|
+
Unblocks STR-1 in `agents/apps/blog/INTERLACE_AUDIT.md`.
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- [#141](https://github.com/ofri-peretz/eslint/pull/141) [`38ab670`](https://github.com/ofri-peretz/eslint/commit/38ab670a0221684f4fd3d5dc3c05ddec7458ca2b) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - fix: remove false `meta.fixable: 'code'` declarations from 21 rules that had no `fix()` function
|
|
46
|
+
|
|
47
|
+
Rules that declared `fixable: 'code'` in their ESLint meta without an actual `fix()` implementation would show the ⚡ auto-fix icon in editors and CI formatters but apply no change when `--fix` was run. This patch removes the misleading declaration from:
|
|
48
|
+
- `browser-security/no-clickjacking`
|
|
49
|
+
- `import-next/first`, `named`, `no-barrel-import`, `no-import-module-exports`, `no-namespace`
|
|
50
|
+
- `node-security/no-buffer-overread`, `no-unsafe-dynamic-require`, `no-zip-slip`
|
|
51
|
+
- `react-features/react-no-inline-functions`
|
|
52
|
+
- `reliability/no-jsdoc-terminator-in-example` (uses `suggest`, not auto-fix; corrected to `hasSuggestions: true` only)
|
|
53
|
+
- `secure-coding/no-directive-injection`, `no-electron-security-issues`, `no-graphql-injection`, `no-improper-sanitization`, `no-improper-type-validation`, `no-ldap-injection`, `no-unchecked-loop-condition`, `no-unlimited-resource-allocation`, `no-weak-password-recovery`, `no-xpath-injection`
|
|
54
|
+
|
|
55
|
+
- [#186](https://github.com/ofri-peretz/eslint/pull/186) [`edf208d`](https://github.com/ofri-peretz/eslint/commit/edf208d67ac2357312c97d8964fcf6a462e407eb) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - Consolidation cleanup — no rule behavior change:
|
|
56
|
+
- **react-features**: the README rules table now lists the 8 `componentApi`
|
|
57
|
+
preset rules. The README generator (`sync-readme-rules.ts`) and the
|
|
58
|
+
`plugin-rule-source-drift` validator now recurse into nested
|
|
59
|
+
`docs/rules/<category>/` subfolders, so every documented rule is advertised
|
|
60
|
+
consistently (previously the nested componentApi docs were silently dropped,
|
|
61
|
+
which an earlier `readme` exception had papered over — that exception is now
|
|
62
|
+
removed in favour of the real fix).
|
|
63
|
+
- **node-security**: remove the orphaned `no-pii-in-logs` rule source — the rule
|
|
64
|
+
was migrated to `eslint-plugin-secure-coding` and is no longer exported here;
|
|
65
|
+
the dead source was still compiling into `dist`.
|
|
66
|
+
- **import-next**: restore the `no-cycle` unit test after [#180](https://github.com/ofri-peretz/eslint/issues/180)'s SCC refactor
|
|
67
|
+
(`computeSCCsFromFile` + `findShortestCyclePath` are now bridged in the mock).
|
|
68
|
+
|
|
69
|
+
Also fixes `scripts/ilb-plugin-scope-audit.ts` to stop mis-reading config-preset
|
|
70
|
+
keys (`'recommended-strict': {`) as rules.
|
|
71
|
+
|
|
72
|
+
- Updated dependencies [[`736a5fe`](https://github.com/ofri-peretz/eslint/commit/736a5fed47e673f6157ea900b29fe2a54e4bc7df)]:
|
|
73
|
+
- @interlace/eslint-devkit@1.4.1
|
|
74
|
+
|
|
75
|
+
### Bug Fixes
|
|
76
|
+
|
|
77
|
+
- `jsx-no-target-blank`: replaced `/^\/\//.test(href)` with `href.startsWith('//')` (oxlint correctness rule).
|
|
78
|
+
|
|
79
|
+
## [1.1.3] - 2026-02-08
|
|
80
|
+
|
|
81
|
+
### Bug Fixes
|
|
82
|
+
|
|
83
|
+
- align codecov component IDs with full package names ([2831b968](https://github.com/ofri-peretz/eslint/commit/2831b968))
|
|
84
|
+
|
|
85
|
+
### Documentation
|
|
86
|
+
|
|
87
|
+
- fix changelog header format across all packages ([c3a15082](https://github.com/ofri-peretz/eslint/commit/c3a15082))
|
|
88
|
+
|
|
89
|
+
### ❤️ Thank You
|
|
90
|
+
|
|
91
|
+
- Ofri Peretz
|
|
92
|
+
|
|
1
93
|
## [1.1.2] - 2026-02-06
|
|
2
94
|
|
|
3
95
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="https://eslint.interlace.tools" target="blank"><img src="https://eslint.interlace.tools/eslint-interlace-logo-light.svg" alt="ESLint Interlace Logo" width="120" /></a>
|
|
2
|
+
<a href="https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features" target="blank"><img src="https://eslint.interlace.tools/eslint-interlace-logo-light.svg" alt="ESLint Interlace Logo" width="120" /></a>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
@@ -10,14 +10,15 @@
|
|
|
10
10
|
<a href="https://www.npmjs.com/package/eslint-plugin-react-features" target="_blank"><img src="https://img.shields.io/npm/v/eslint-plugin-react-features.svg" alt="NPM Version" /></a>
|
|
11
11
|
<a href="https://www.npmjs.com/package/eslint-plugin-react-features" target="_blank"><img src="https://img.shields.io/npm/dm/eslint-plugin-react-features.svg" alt="NPM Downloads" /></a>
|
|
12
12
|
<a href="https://opensource.org/licenses/MIT" target="_blank"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="Package License" /></a>
|
|
13
|
-
<a href="https://app.codecov.io/gh/ofri-peretz/eslint/components?components%5B0%5D=react-features" target="_blank"><img src="https://codecov.io/gh/ofri-peretz/eslint/graph/badge.svg?component=
|
|
13
|
+
<a href="https://app.codecov.io/gh/ofri-peretz/eslint/components?components%5B0%5D=react-features" target="_blank"><img src="https://codecov.io/gh/ofri-peretz/eslint/graph/badge.svg?component=react-features" alt="Codecov" /></a>
|
|
14
14
|
<a href="https://github.com/ofri-peretz/eslint" target="_blank"><img src="https://img.shields.io/badge/Since-Dec_2025-blue?logo=rocket&logoColor=white" alt="Since Dec 2025" /></a>
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
|
+
> ⭐ If this plugin caught a real bug for you, [**star the repo**](https://github.com/ofri-peretz/eslint) — it's the signal that keeps these rules maintained.
|
|
18
|
+
|
|
17
19
|
## Description
|
|
18
20
|
|
|
19
21
|
This plugin provides Advanced React patterns, hook usage, and best practices enforcement.
|
|
20
|
-
By using this plugin, you can proactively identify and mitigate security risks across your entire codebase.
|
|
21
22
|
|
|
22
23
|
## Philosophy
|
|
23
24
|
|
|
@@ -25,12 +26,12 @@ By using this plugin, you can proactively identify and mitigate security risks a
|
|
|
25
26
|
|
|
26
27
|
## Getting Started
|
|
27
28
|
|
|
28
|
-
- To check out the [guide](https://eslint.interlace.tools/docs/quality/plugin-react-features), visit [eslint.interlace.tools](https://eslint.interlace.tools). 📚
|
|
29
|
-
- 要查看中文 [指南](https://eslint.interlace.tools/docs/quality/plugin-react-features), 请访问 [eslint.interlace.tools](https://eslint.interlace.tools). 📚
|
|
30
|
-
- [가이드](https://eslint.interlace.tools/docs/quality/plugin-react-features) 문서는 [eslint.interlace.tools](https://eslint.interlace.tools)에서 확인하실 수 있습니다. 📚
|
|
31
|
-
- [ガイド](https://eslint.interlace.tools/docs/quality/plugin-react-features)は [eslint.interlace.tools](https://eslint.interlace.tools)でご確認ください。 📚
|
|
32
|
-
- Para ver la [guía](https://eslint.interlace.tools/docs/quality/plugin-react-features), visita [eslint.interlace.tools](https://eslint.interlace.tools). 📚
|
|
33
|
-
- للاطلاع على [الدليل](https://eslint.interlace.tools/docs/quality/plugin-react-features)، قم بزيارة [eslint.interlace.tools](https://eslint.interlace.tools). 📚
|
|
29
|
+
- To check out the [guide](https://eslint.interlace.tools/docs/quality/plugin-react-features?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features), visit [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features). 📚
|
|
30
|
+
- 要查看中文 [指南](https://eslint.interlace.tools/docs/quality/plugin-react-features?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features), 请访问 [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features). 📚
|
|
31
|
+
- [가이드](https://eslint.interlace.tools/docs/quality/plugin-react-features?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) 문서는 [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features)에서 확인하실 수 있습니다. 📚
|
|
32
|
+
- [ガイド](https://eslint.interlace.tools/docs/quality/plugin-react-features?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features)は [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features)でご確認ください。 📚
|
|
33
|
+
- Para ver la [guía](https://eslint.interlace.tools/docs/quality/plugin-react-features?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features), visita [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features). 📚
|
|
34
|
+
- للاطلاع على [الدليل](https://eslint.interlace.tools/docs/quality/plugin-react-features?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features)، قم بزيارة [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features). 📚
|
|
34
35
|
|
|
35
36
|
```bash
|
|
36
37
|
npm install eslint-plugin-react-features --save-dev
|
|
@@ -41,6 +42,14 @@ npm install eslint-plugin-react-features --save-dev
|
|
|
41
42
|
| :------------ | :----------------------------------------------- |
|
|
42
43
|
| `recommended` | Recommended React patterns and performance rules |
|
|
43
44
|
|
|
45
|
+
## 📦 Compatibility
|
|
46
|
+
| Package | Version |
|
|
47
|
+
| :--- | :--- |
|
|
48
|
+
| ESLint | `^8.0.0 \|\| ^9.0.0 \|\| ^10.0.0` |
|
|
49
|
+
| Node.js | `>=18.0.0` |
|
|
50
|
+
|
|
51
|
+
See the [ESLint Version Support Policy](../../docs/ESLINT_VERSION_SUPPORT.md) — current ecosystem share data, the 20% gate, and the forward-looking exception that covers v10.
|
|
52
|
+
|
|
44
53
|
## Rules
|
|
45
54
|
|
|
46
55
|
**Legend**
|
|
@@ -48,17 +57,79 @@ npm install eslint-plugin-react-features --save-dev
|
|
|
48
57
|
| Icon | Description |
|
|
49
58
|
| :---: | :--- |
|
|
50
59
|
| 💼 | **Recommended**: Included in the recommended preset. |
|
|
51
|
-
| ⚠️ | **Warns**: Set
|
|
60
|
+
| ⚠️ | **Warns**: Set to warn in recommended preset. |
|
|
52
61
|
| 🔧 | **Auto-fixable**: Automatically fixable by the `--fix` CLI option. |
|
|
53
62
|
| 💡 | **Suggestions**: Providing code suggestions in IDE. |
|
|
54
63
|
| 🚫 | **Deprecated**: This rule is deprecated. |
|
|
55
|
-
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
|
61
|
-
|
|
64
|
+
| 🟢 | **Type-unaware**: AST-only, runs in oxlint JS-plugin tier. |
|
|
65
|
+
| 🟡 | **Type-aware (refining)**: pure-AST primary path; types refine precision. |
|
|
66
|
+
| 🟠 | **Type-aware (graceful)**: requires TS program; silent without it. |
|
|
67
|
+
|
|
68
|
+
<!-- AUTO-GENERATED:RULES_TABLE:START - Do not edit manually -->
|
|
69
|
+
| Rule | CWE | OWASP | CVSS | Description | 🧠 | 💼 | ⚠️ | 🔧 | 💡 | 🚫 |
|
|
70
|
+
| :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
71
|
+
| [checked-requires-onchange-or-readonly](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/checked-requires-onchange-or-readonly?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | checked-requires-onchange-or-readonly rule | 🟢 | | | | 💡 | |
|
|
72
|
+
| [default-props-match-prop-types](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/default-props-match-prop-types?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | default-props-match-prop-types rule | 🟢 | | | | 💡 | |
|
|
73
|
+
| [display-name](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/display-name?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | display-name rule | 🟢 | | | | 💡 | |
|
|
74
|
+
| [hooks-exhaustive-deps](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/hooks-exhaustive-deps?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | hooks-exhaustive-deps rule | 🟢 | | ⚠️ | | 💡 | |
|
|
75
|
+
| [jsx-handler-names](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-handler-names?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | jsx-handler-names rule | 🟢 | | | | 💡 | |
|
|
76
|
+
| [jsx-key](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-key?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | jsx-key rule | 🟢 | 💼 | | | 💡 | |
|
|
77
|
+
| [jsx-max-depth](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-max-depth?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | jsx-max-depth rule | 🟢 | | | | 💡 | |
|
|
78
|
+
| [jsx-no-bind](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-no-bind?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | jsx-no-bind rule | 🟢 | | | | 💡 | |
|
|
79
|
+
| [jsx-no-duplicate-props](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-no-duplicate-props?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | Prevent duplicate props in JSX elements. This rule is part of eslint-plugin-react-features and provides LLM… | 🟢 | 💼 | | | 💡 | |
|
|
80
|
+
| [jsx-no-literals](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-no-literals?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | jsx-no-literals rule | 🟢 | | | | 💡 | |
|
|
81
|
+
| [jsx-no-script-url](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-no-script-url?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | Prevent javascript: URLs in JSX. This rule is part of eslint-plugin-react-features and provides LLM-optimiz… | 🟢 | 💼 | | | 💡 | |
|
|
82
|
+
| [jsx-no-target-blank](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-no-target-blank?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | Require rel='noopener noreferrer' with target='_blank'. This rule is part of eslint-plugin-react-features a… | 🟢 | 💼 | | | 💡 | |
|
|
83
|
+
| [no-access-state-in-setstate](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-access-state-in-setstate?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-access-state-in-setstate rule | 🟢 | | | | 💡 | |
|
|
84
|
+
| [no-adjacent-inline-elements](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-adjacent-inline-elements?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-adjacent-inline-elements rule | 🟢 | | | | 💡 | |
|
|
85
|
+
| [no-arbitrary-token-class](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-arbitrary-token-class?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | | 🟢 | | | | | |
|
|
86
|
+
| [no-arrow-function-lifecycle](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-arrow-function-lifecycle?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-arrow-function-lifecycle rule | 🟢 | | | | 💡 | |
|
|
87
|
+
| [no-children-prop](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-children-prop?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-children-prop rule | 🟢 | | ⚠️ | | 💡 | |
|
|
88
|
+
| [no-danger](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-danger?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | CWE-79 | | | no-danger rule | 🟢 | | ⚠️ | | 💡 | |
|
|
89
|
+
| [no-danger-with-children](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-danger-with-children?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | Prevent using children and dangerouslySetInnerHTML together. This rule is part of eslint-plugin-react-featu… | 🟢 | 💼 | | | 💡 | |
|
|
90
|
+
| [no-default-test-id](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-default-test-id?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | | 🟢 | | | | | |
|
|
91
|
+
| [no-deprecated](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-deprecated?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | Warn about using deprecated React APIs. This rule is part of eslint-plugin-react-features and provides LLM-… | 🟢 | | ⚠️ | | 💡 | |
|
|
92
|
+
| [no-did-mount-set-state](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-did-mount-set-state?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-did-mount-set-state rule | 🟢 | | | | 💡 | |
|
|
93
|
+
| [no-did-update-set-state](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-did-update-set-state?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-did-update-set-state rule | 🟢 | | | | 💡 | |
|
|
94
|
+
| [no-direct-mutation-state](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-direct-mutation-state?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-direct-mutation-state rule | 🟢 | | | | 💡 | |
|
|
95
|
+
| [no-find-dom-node](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-find-dom-node?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | Prevent using findDOMNode. This rule is part of eslint-plugin-react-features and provides LLM-optimized err… | 🟢 | | | | 💡 | |
|
|
96
|
+
| [no-inline-style](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-inline-style?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | | 🟢 | | | | | |
|
|
97
|
+
| [no-invalid-html-attribute](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-invalid-html-attribute?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-invalid-html-attribute rule | 🟢 | | | | 💡 | |
|
|
98
|
+
| [no-is-mounted](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-is-mounted?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-is-mounted rule | 🟢 | | | | 💡 | |
|
|
99
|
+
| [no-is-prefix-prop](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-is-prefix-prop?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | | 🟢 | | | | | |
|
|
100
|
+
| [no-kind-prop-discriminator](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-kind-prop-discriminator?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | | 🟢 | | | | | |
|
|
101
|
+
| [no-multi-comp](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-multi-comp?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-multi-comp rule | 🟢 | | | | 💡 | |
|
|
102
|
+
| [no-namespace](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-namespace?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-namespace rule | 🟢 | | | | 💡 | |
|
|
103
|
+
| [no-object-type-as-default-prop](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-object-type-as-default-prop?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-object-type-as-default-prop rule | 🟢 | | | | 💡 | |
|
|
104
|
+
| [no-raw-color-literal](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-raw-color-literal?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | | 🟢 | | | | | |
|
|
105
|
+
| [no-redundant-should-component-update](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-redundant-should-component-update?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-redundant-should-component-update rule | 🟢 | | | | 💡 | |
|
|
106
|
+
| [no-render-return-value](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-render-return-value?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-render-return-value rule | 🟢 | | | | 💡 | |
|
|
107
|
+
| [no-set-state](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-set-state?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-set-state rule | 🟢 | | | | 💡 | |
|
|
108
|
+
| [no-string-refs](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-string-refs?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-string-refs rule | 🟢 | 💼 | | | 💡 | |
|
|
109
|
+
| [no-this-in-sfc](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-this-in-sfc?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-this-in-sfc rule | 🟢 | | | | 💡 | |
|
|
110
|
+
| [no-typos](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-typos?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-typos rule | 🟢 | | | | 💡 | |
|
|
111
|
+
| [no-unescaped-entities](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-unescaped-entities?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-unescaped-entities rule | 🟢 | | | | 💡 | |
|
|
112
|
+
| [no-unknown-property](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-unknown-property?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-unknown-property rule | 🟢 | 💼 | | | 💡 | |
|
|
113
|
+
| [no-unnecessary-rerenders](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-unnecessary-rerenders?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | no-unnecessary-rerenders rule | 🟢 | | | | 💡 | |
|
|
114
|
+
| [no-unsafe](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-unsafe?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | Warn about UNSAFE_ lifecycle methods. This rule is part of eslint-plugin-react-features and provides LLM-op… | 🟢 | | | | 💡 | |
|
|
115
|
+
| [no-wrapper-sub-component](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-wrapper-sub-component?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | | 🟢 | | | | | |
|
|
116
|
+
| [prefer-es6-class](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/prefer-es6-class?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | prefer-es6-class rule | 🟢 | | | | 💡 | |
|
|
117
|
+
| [prefer-stateless-function](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/prefer-stateless-function?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | prefer-stateless-function rule | 🟢 | | | | 💡 | |
|
|
118
|
+
| [prop-types](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/prop-types?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | prop-types rule | 🟢 | | | | 💡 | |
|
|
119
|
+
| [react-class-to-hooks](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/react-class-to-hooks?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | react-class-to-hooks rule | 🟢 | | | | 💡 | |
|
|
120
|
+
| [react-in-jsx-scope](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/react-in-jsx-scope?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | react-in-jsx-scope rule | 🟢 | | | | 💡 | |
|
|
121
|
+
| [react-no-inline-functions](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/react-no-inline-functions?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | react-no-inline-functions rule | 🟢 | | | | 💡 | |
|
|
122
|
+
| [react-render-optimization](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/react-render-optimization?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | react-render-optimization rule | 🟢 | | | | 💡 | |
|
|
123
|
+
| [require-data-slot](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/require-data-slot?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | | 🟢 | | | | | |
|
|
124
|
+
| [require-default-props](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/require-default-props?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | require-default-props rule | 🟢 | | | | 💡 | |
|
|
125
|
+
| [require-optimization](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/require-optimization?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | require-optimization rule | 🟢 | | | | 💡 | |
|
|
126
|
+
| [require-render-return](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/require-render-return?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | require-render-return rule | 🟢 | | | | 💡 | |
|
|
127
|
+
| [required-attributes](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/required-attributes?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | required-attributes rule | 🟢 | | | | 💡 | |
|
|
128
|
+
| [sort-comp](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/sort-comp?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | sort-comp rule | 🟢 | | | | 💡 | |
|
|
129
|
+
| [state-in-constructor](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/state-in-constructor?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | state-in-constructor rule | 🟢 | | | | 💡 | |
|
|
130
|
+
| [static-property-placement](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/static-property-placement?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | static-property-placement rule | 🟢 | | | | 💡 | |
|
|
131
|
+
| [void-dom-elements-no-children](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/void-dom-elements-no-children?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features) | | | | Prevent void DOM elements from receiving children. This rule is part of eslint-plugin-react-features and pr… | 🟢 | | | | 💡 | |
|
|
132
|
+
<!-- AUTO-GENERATED:RULES_TABLE:END -->
|
|
62
133
|
## 🔗 Related ESLint Plugins
|
|
63
134
|
|
|
64
135
|
Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with LLM-optimized error messages:
|
|
@@ -67,7 +138,7 @@ Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with L
|
|
|
67
138
|
| :--- | :---: | :--- |
|
|
68
139
|
| [`eslint-plugin-secure-coding`](https://www.npmjs.com/package/eslint-plugin-secure-coding) | [](https://www.npmjs.com/package/eslint-plugin-secure-coding) | General security rules & OWASP guidelines. |
|
|
69
140
|
| [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | [](https://www.npmjs.com/package/eslint-plugin-pg) | PostgreSQL security & best practices. |
|
|
70
|
-
| [`eslint-plugin-
|
|
141
|
+
| [`eslint-plugin-node-security`](https://www.npmjs.com/package/eslint-plugin-node-security) | [](https://www.npmjs.com/package/eslint-plugin-node-security) | Node.js core-module security (fs, child_process, vm, crypto, Buffer). |
|
|
71
142
|
| [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [](https://www.npmjs.com/package/eslint-plugin-jwt) | JWT security & best practices. |
|
|
72
143
|
| [`eslint-plugin-browser-security`](https://www.npmjs.com/package/eslint-plugin-browser-security) | [](https://www.npmjs.com/package/eslint-plugin-browser-security) | Browser-specific security & XSS prevention. |
|
|
73
144
|
| [`eslint-plugin-express-security`](https://www.npmjs.com/package/eslint-plugin-express-security) | [](https://www.npmjs.com/package/eslint-plugin-express-security) | Express.js security hardening rules. |
|
|
@@ -77,10 +148,19 @@ Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with L
|
|
|
77
148
|
| [`eslint-plugin-vercel-ai-security`](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | [](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | Vercel AI SDK security hardening. |
|
|
78
149
|
| [`eslint-plugin-import-next`](https://www.npmjs.com/package/eslint-plugin-import-next) | [](https://www.npmjs.com/package/eslint-plugin-import-next) | Next-gen import sorting & architecture. |
|
|
79
150
|
|
|
151
|
+
<!-- INTERLACE:STAR_CTA:START -->
|
|
152
|
+
## ⭐ Support & follow
|
|
153
|
+
|
|
154
|
+
If this plugin caught a real bug for you, **[star the repo](https://github.com/ofri-peretz/eslint)** — stars are the signal that keeps the Interlace ESLint ecosystem maintained — and **[follow the writeups on Dev.to](https://dev.to/ofri-peretz)** for the benchmarks and security research behind these rules.
|
|
155
|
+
|
|
156
|
+
[](https://github.com/ofri-peretz/eslint)
|
|
157
|
+
|
|
158
|
+
<!-- INTERLACE:STAR_CTA:END -->
|
|
159
|
+
|
|
80
160
|
## 📄 License
|
|
81
161
|
|
|
82
162
|
MIT © [Ofri Peretz](https://github.com/ofri-peretz)
|
|
83
163
|
|
|
84
164
|
<p align="center">
|
|
85
|
-
<a href="https://eslint.interlace.tools/docs/quality/plugin-react-features"><img src="https://eslint.interlace.tools/images/og-react-features.png" alt="ESLint Interlace Plugin" width="100%" /></a>
|
|
165
|
+
<a href="https://eslint.interlace.tools/docs/quality/plugin-react-features?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-react-features"><img src="https://eslint.interlace.tools/images/og-react-features.png" alt="ESLint Interlace Plugin" width="100%" /></a>
|
|
86
166
|
</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-features",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "ESLint React rules for modern react features, hooks, and patterns.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
"./types": {
|
|
14
14
|
"types": "./src/types/index.d.ts",
|
|
15
15
|
"default": "./src/types/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./oxlint": {
|
|
18
|
+
"types": "./src/oxlint.d.ts",
|
|
19
|
+
"default": "./src/oxlint.js"
|
|
16
20
|
}
|
|
17
21
|
},
|
|
18
22
|
"author": "Ofri Peretz <ofriperetzdev@gmail.com>",
|
|
@@ -39,7 +43,9 @@
|
|
|
39
43
|
"engines": {
|
|
40
44
|
"node": ">=18.0.0"
|
|
41
45
|
},
|
|
42
|
-
"peerDependencies": {
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"eslint": "^8.0.0 || ^9.0.0 || ^10.0.0"
|
|
48
|
+
},
|
|
43
49
|
"peerDependenciesMeta": {
|
|
44
50
|
"typescript": {
|
|
45
51
|
"optional": true
|
|
@@ -58,8 +64,18 @@
|
|
|
58
64
|
"url": "https://github.com/ofri-peretz/eslint",
|
|
59
65
|
"directory": "packages/eslint-plugin-react-features"
|
|
60
66
|
},
|
|
61
|
-
"homepage": "https://
|
|
67
|
+
"homepage": "https://eslint.interlace.tools/docs/quality/plugin-react-features?utm_source=npm&utm_medium=referral&utm_campaign=eslint-plugin-react-features",
|
|
62
68
|
"bugs": {
|
|
63
69
|
"url": "https://github.com/ofri-peretz/eslint/issues"
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"build": "tsx ../../scripts/build-package.ts",
|
|
73
|
+
"test": "vitest run",
|
|
74
|
+
"test:coverage": "vitest run --coverage",
|
|
75
|
+
"typecheck": "tsc -p tsconfig.lib.json --noEmit"
|
|
76
|
+
},
|
|
77
|
+
"funding": {
|
|
78
|
+
"type": "github",
|
|
79
|
+
"url": "https://github.com/ofri-peretz/eslint"
|
|
64
80
|
}
|
|
65
|
-
}
|
|
81
|
+
}
|