eslint-plugin-react-features 1.1.4 → 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 +72 -0
- package/README.md +80 -61
- package/package.json +6 -2
- package/src/index.d.ts +630 -16
- package/src/index.js +66 -18
- 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/performance/react-no-inline-functions.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,77 @@
|
|
|
1
1
|
## [1.1.4] - 2026-05-03
|
|
2
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
|
+
|
|
3
75
|
### Bug Fixes
|
|
4
76
|
|
|
5
77
|
- `jsx-no-target-blank`: replaced `/^\/\//.test(href)` with `href.startsWith('//')` (oxlint correctness rule).
|
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">
|
|
@@ -14,6 +14,8 @@
|
|
|
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.
|
|
@@ -24,12 +26,12 @@ This plugin provides Advanced React patterns, hook usage, and best practices enf
|
|
|
24
26
|
|
|
25
27
|
## Getting Started
|
|
26
28
|
|
|
27
|
-
- To check out the [guide](https://eslint.interlace.tools/docs/quality/plugin-react-features), visit [eslint.interlace.tools](https://eslint.interlace.tools). 📚
|
|
28
|
-
- 要查看中文 [指南](https://eslint.interlace.tools/docs/quality/plugin-react-features), 请访问 [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
|
-
- Para ver la [guía](https://eslint.interlace.tools/docs/quality/plugin-react-features), visita [eslint.interlace.tools](https://eslint.interlace.tools). 📚
|
|
32
|
-
- للاطلاع على [الدليل](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). 📚
|
|
33
35
|
|
|
34
36
|
```bash
|
|
35
37
|
npm install eslint-plugin-react-features --save-dev
|
|
@@ -66,59 +68,67 @@ See the [ESLint Version Support Policy](../../docs/ESLINT_VERSION_SUPPORT.md)
|
|
|
66
68
|
<!-- AUTO-GENERATED:RULES_TABLE:START - Do not edit manually -->
|
|
67
69
|
| Rule | CWE | OWASP | CVSS | Description | 🧠 | 💼 | ⚠️ | 🔧 | 💡 | 🚫 |
|
|
68
70
|
| :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
69
|
-
| [checked-requires-onchange-or-readonly](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/checked-requires-onchange-or-readonly) | | | | checked-requires-onchange-or-readonly rule | 🟢 | | | | 💡 | |
|
|
70
|
-
| [default-props-match-prop-types](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/default-props-match-prop-types) | | | | default-props-match-prop-types rule | 🟢 | | | | 💡 | |
|
|
71
|
-
| [display-name](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/display-name) | | | | display-name rule | 🟢 | | | | 💡 | |
|
|
72
|
-
| [hooks-exhaustive-deps](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/hooks-exhaustive-deps) | | | | hooks-exhaustive-deps rule | 🟢 | |
|
|
73
|
-
| [jsx-handler-names](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-handler-names) | | | | jsx-handler-names rule | 🟢 | | | | 💡 | |
|
|
74
|
-
| [jsx-key](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-key) | | | | jsx-key rule | 🟢 |
|
|
75
|
-
| [jsx-max-depth](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-max-depth) | | | | jsx-max-depth rule | 🟢 | | | | 💡 | |
|
|
76
|
-
| [jsx-no-bind](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-no-bind) | | | | jsx-no-bind rule | 🟢 | | | | 💡 | |
|
|
77
|
-
| [jsx-no-duplicate-props](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-no-duplicate-props) | | | | Prevent duplicate props in JSX elements. This rule is part of eslint-plugin-react-features and provides LLM… | 🟢 |
|
|
78
|
-
| [jsx-no-literals](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-no-literals) | | | | jsx-no-literals rule | 🟢 | | | | 💡 | |
|
|
79
|
-
| [jsx-no-script-url](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-no-script-url) | | | | Prevent javascript: URLs in JSX. This rule is part of eslint-plugin-react-features and provides LLM-optimiz… | 🟢 |
|
|
80
|
-
| [jsx-no-target-blank](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/jsx-no-target-blank) | | | | Require rel='noopener noreferrer' with target='_blank'. This rule is part of eslint-plugin-react-features a… | 🟢 |
|
|
81
|
-
| [no-access-state-in-setstate](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-access-state-in-setstate) | | | | no-access-state-in-setstate rule | 🟢 | | | | 💡 | |
|
|
82
|
-
| [no-adjacent-inline-elements](https://eslint.interlace.tools/docs/quality/plugin-react-features/rules/no-adjacent-inline-elements) | | | | no-adjacent-inline-elements rule | 🟢 | | | | 💡 | |
|
|
83
|
-
| [no-
|
|
84
|
-
| [no-
|
|
85
|
-
| [no-
|
|
86
|
-
| [no-danger
|
|
87
|
-
| [no-
|
|
88
|
-
| [no-
|
|
89
|
-
| [no-
|
|
90
|
-
| [no-
|
|
91
|
-
| [no-
|
|
92
|
-
| [no-
|
|
93
|
-
| [no-
|
|
94
|
-
| [no-
|
|
95
|
-
| [no-
|
|
96
|
-
| [no-
|
|
97
|
-
| [no-
|
|
98
|
-
| [no-
|
|
99
|
-
| [no-
|
|
100
|
-
| [no-
|
|
101
|
-
| [no-
|
|
102
|
-
| [no-
|
|
103
|
-
| [no-
|
|
104
|
-
| [no-
|
|
105
|
-
| [no-
|
|
106
|
-
| [no-
|
|
107
|
-
| [
|
|
108
|
-
| [
|
|
109
|
-
| [
|
|
110
|
-
| [
|
|
111
|
-
| [
|
|
112
|
-
| [
|
|
113
|
-
| [
|
|
114
|
-
| [
|
|
115
|
-
| [
|
|
116
|
-
| [
|
|
117
|
-
| [
|
|
118
|
-
| [
|
|
119
|
-
| [
|
|
120
|
-
| [
|
|
121
|
-
| [
|
|
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… | 🟢 | | | | 💡 | |
|
|
122
132
|
<!-- AUTO-GENERATED:RULES_TABLE:END -->
|
|
123
133
|
## 🔗 Related ESLint Plugins
|
|
124
134
|
|
|
@@ -138,10 +148,19 @@ Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with L
|
|
|
138
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. |
|
|
139
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. |
|
|
140
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
|
+
|
|
141
160
|
## 📄 License
|
|
142
161
|
|
|
143
162
|
MIT © [Ofri Peretz](https://github.com/ofri-peretz)
|
|
144
163
|
|
|
145
164
|
<p align="center">
|
|
146
|
-
<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>
|
|
147
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",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"url": "https://github.com/ofri-peretz/eslint",
|
|
65
65
|
"directory": "packages/eslint-plugin-react-features"
|
|
66
66
|
},
|
|
67
|
-
"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",
|
|
68
68
|
"bugs": {
|
|
69
69
|
"url": "https://github.com/ofri-peretz/eslint/issues"
|
|
70
70
|
},
|
|
@@ -73,5 +73,9 @@
|
|
|
73
73
|
"test": "vitest run",
|
|
74
74
|
"test:coverage": "vitest run --coverage",
|
|
75
75
|
"typecheck": "tsc -p tsconfig.lib.json --noEmit"
|
|
76
|
+
},
|
|
77
|
+
"funding": {
|
|
78
|
+
"type": "github",
|
|
79
|
+
"url": "https://github.com/ofri-peretz/eslint"
|
|
76
80
|
}
|
|
77
81
|
}
|