eslint-plugin-react-features 1.2.4 → 1.2.6
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/package.json +21 -19
- package/src/index.d.ts +15 -2074
- package/src/index.js +1 -36
- package/src/oxlint.d.ts +17 -20
- package/src/oxlint.js +0 -18
- package/src/rules/component-api/no-arbitrary-token-class.js +0 -11
- package/src/rules/component-api/no-default-test-id.js +0 -7
- package/src/rules/component-api/no-inline-style.js +0 -6
- package/src/rules/component-api/no-is-prefix-prop.js +0 -7
- package/src/rules/component-api/no-kind-prop-discriminator.js +0 -5
- package/src/rules/component-api/no-raw-color-literal.js +0 -8
- package/src/rules/component-api/no-wrapper-sub-component.js +0 -8
- package/src/rules/component-api/require-data-slot.js +0 -5
- package/src/rules/migration/react-class-to-hooks.js +1 -26
- package/src/rules/performance/no-unnecessary-rerenders.js +1 -32
- package/src/rules/performance/react-no-inline-functions.js +2 -29
- package/src/rules/performance/react-render-optimization.js +1 -40
- package/src/rules/react/checked-requires-onchange-or-readonly.js +0 -7
- package/src/rules/react/default-props-match-prop-types.js +2 -23
- package/src/rules/react/display-name.js +1 -33
- package/src/rules/react/hooks-exhaustive-deps.js +1 -90
- package/src/rules/react/jsx-handler-names.js +0 -8
- package/src/rules/react/jsx-key.js +0 -84
- package/src/rules/react/jsx-max-depth.js +0 -10
- package/src/rules/react/jsx-no-bind.js +0 -10
- package/src/rules/react/jsx-no-duplicate-props.js +0 -5
- package/src/rules/react/jsx-no-literals.js +0 -5
- package/src/rules/react/jsx-no-script-url.js +0 -16
- package/src/rules/react/jsx-no-target-blank.js +1 -20
- package/src/rules/react/no-access-state-in-setstate.js +0 -13
- package/src/rules/react/no-adjacent-inline-elements.js +0 -10
- package/src/rules/react/no-arrow-function-lifecycle.js +0 -7
- package/src/rules/react/no-children-prop.js +0 -7
- package/src/rules/react/no-danger-with-children.js +0 -13
- package/src/rules/react/no-danger.js +0 -5
- package/src/rules/react/no-deprecated.js +0 -11
- package/src/rules/react/no-did-mount-set-state.js +0 -6
- package/src/rules/react/no-did-update-set-state.js +0 -10
- package/src/rules/react/no-direct-mutation-state.js +3 -29
- package/src/rules/react/no-find-dom-node.js +0 -7
- package/src/rules/react/no-invalid-html-attribute.js +36 -41
- package/src/rules/react/no-is-mounted.js +0 -7
- package/src/rules/react/no-multi-comp.js +0 -14
- package/src/rules/react/no-namespace.js +0 -5
- package/src/rules/react/no-object-type-as-default-prop.js +0 -9
- package/src/rules/react/no-redundant-should-component-update.js +0 -6
- package/src/rules/react/no-render-return-value.js +1 -9
- package/src/rules/react/no-set-state.js +0 -6
- package/src/rules/react/no-string-refs.js +0 -8
- package/src/rules/react/no-this-in-sfc.js +0 -11
- package/src/rules/react/no-typos.js +1 -9
- package/src/rules/react/no-unescaped-entities.js +0 -7
- package/src/rules/react/no-unknown-property.js +0 -13
- package/src/rules/react/no-unsafe.js +0 -7
- package/src/rules/react/prefer-es6-class.js +0 -7
- package/src/rules/react/prefer-stateless-function.js +0 -13
- package/src/rules/react/prop-types.js +0 -12
- package/src/rules/react/react-in-jsx-scope.js +0 -9
- package/src/rules/react/require-default-props.js +0 -19
- package/src/rules/react/require-optimization.js +6 -44
- package/src/rules/react/require-render-return.js +0 -9
- package/src/rules/react/required-attributes.js +0 -34
- package/src/rules/react/sort-comp.js +1 -19
- package/src/rules/react/state-in-constructor.js +0 -11
- package/src/rules/react/static-property-placement.js +1 -21
- package/src/rules/react/void-dom-elements-no-children.js +0 -7
- package/src/types/index.js +0 -5
- package/CHANGELOG.md +0 -236
- package/src/rules/component-api/no-arbitrary-token-class.d.ts +0 -17
- package/src/rules/component-api/no-default-test-id.d.ts +0 -15
- package/src/rules/component-api/no-inline-style.d.ts +0 -15
- package/src/rules/component-api/no-is-prefix-prop.d.ts +0 -17
- package/src/rules/component-api/no-kind-prop-discriminator.d.ts +0 -25
- package/src/rules/component-api/no-raw-color-literal.d.ts +0 -16
- package/src/rules/component-api/no-wrapper-sub-component.d.ts +0 -23
- package/src/rules/component-api/require-data-slot.d.ts +0 -15
- package/src/rules/migration/react-class-to-hooks.d.ts +0 -22
- package/src/rules/performance/no-unnecessary-rerenders.d.ts +0 -26
- package/src/rules/performance/react-no-inline-functions.d.ts +0 -24
- package/src/rules/performance/react-render-optimization.d.ts +0 -31
- package/src/rules/react/checked-requires-onchange-or-readonly.d.ts +0 -16
- package/src/rules/react/default-props-match-prop-types.d.ts +0 -13
- package/src/rules/react/display-name.d.ts +0 -13
- package/src/rules/react/hooks-exhaustive-deps.d.ts +0 -25
- package/src/rules/react/jsx-handler-names.d.ts +0 -13
- package/src/rules/react/jsx-key.d.ts +0 -20
- package/src/rules/react/jsx-max-depth.d.ts +0 -19
- package/src/rules/react/jsx-no-bind.d.ts +0 -13
- package/src/rules/react/jsx-no-duplicate-props.d.ts +0 -21
- package/src/rules/react/jsx-no-literals.d.ts +0 -20
- package/src/rules/react/jsx-no-script-url.d.ts +0 -25
- package/src/rules/react/jsx-no-target-blank.d.ts +0 -26
- package/src/rules/react/no-access-state-in-setstate.d.ts +0 -13
- package/src/rules/react/no-adjacent-inline-elements.d.ts +0 -13
- package/src/rules/react/no-arrow-function-lifecycle.d.ts +0 -13
- package/src/rules/react/no-children-prop.d.ts +0 -13
- package/src/rules/react/no-danger-with-children.d.ts +0 -16
- package/src/rules/react/no-danger.d.ts +0 -13
- package/src/rules/react/no-deprecated.d.ts +0 -16
- package/src/rules/react/no-did-mount-set-state.d.ts +0 -13
- package/src/rules/react/no-did-update-set-state.d.ts +0 -19
- package/src/rules/react/no-direct-mutation-state.d.ts +0 -20
- package/src/rules/react/no-find-dom-node.d.ts +0 -15
- package/src/rules/react/no-invalid-html-attribute.d.ts +0 -13
- package/src/rules/react/no-is-mounted.d.ts +0 -13
- package/src/rules/react/no-multi-comp.d.ts +0 -18
- package/src/rules/react/no-namespace.d.ts +0 -13
- package/src/rules/react/no-object-type-as-default-prop.d.ts +0 -13
- package/src/rules/react/no-redundant-should-component-update.d.ts +0 -13
- package/src/rules/react/no-render-return-value.d.ts +0 -13
- package/src/rules/react/no-set-state.d.ts +0 -13
- package/src/rules/react/no-string-refs.d.ts +0 -13
- package/src/rules/react/no-this-in-sfc.d.ts +0 -13
- package/src/rules/react/no-typos.d.ts +0 -13
- package/src/rules/react/no-unescaped-entities.d.ts +0 -13
- package/src/rules/react/no-unknown-property.d.ts +0 -13
- package/src/rules/react/no-unsafe.d.ts +0 -20
- package/src/rules/react/prefer-es6-class.d.ts +0 -13
- package/src/rules/react/prefer-stateless-function.d.ts +0 -16
- package/src/rules/react/prop-types.d.ts +0 -18
- package/src/rules/react/react-in-jsx-scope.d.ts +0 -13
- package/src/rules/react/require-default-props.d.ts +0 -16
- package/src/rules/react/require-optimization.d.ts +0 -26
- package/src/rules/react/require-render-return.d.ts +0 -13
- package/src/rules/react/required-attributes.d.ts +0 -28
- package/src/rules/react/sort-comp.d.ts +0 -17
- package/src/rules/react/state-in-constructor.d.ts +0 -13
- package/src/rules/react/static-property-placement.d.ts +0 -20
- package/src/rules/react/void-dom-elements-no-children.d.ts +0 -15
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
4
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
5
|
-
* MIT license that can be found in the LICENSE file.
|
|
6
|
-
*/
|
|
7
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
3
|
exports.staticPropertyPlacement = void 0;
|
|
9
4
|
const eslint_devkit_1 = require("@interlace/eslint-devkit");
|
|
@@ -70,7 +65,6 @@ exports.staticPropertyPlacement = (0, eslint_devkit_1.createRule)({
|
|
|
70
65
|
}
|
|
71
66
|
},
|
|
72
67
|
};
|
|
73
|
-
// oxlint-disable-next-line consistent-function-scoping
|
|
74
68
|
function isReactComponent(node) {
|
|
75
69
|
if (!node.superClass)
|
|
76
70
|
return false;
|
|
@@ -88,7 +82,6 @@ exports.staticPropertyPlacement = (0, eslint_devkit_1.createRule)({
|
|
|
88
82
|
function checkStaticPropertyPlacement(node, groups) {
|
|
89
83
|
const members = node.body.body;
|
|
90
84
|
const staticProperties = [];
|
|
91
|
-
// Collect static properties
|
|
92
85
|
for (let i = 0; i < members.length; i++) {
|
|
93
86
|
const member = members[i];
|
|
94
87
|
if (isStaticProperty(member)) {
|
|
@@ -100,36 +93,23 @@ exports.staticPropertyPlacement = (0, eslint_devkit_1.createRule)({
|
|
|
100
93
|
}
|
|
101
94
|
if (staticProperties.length < 2)
|
|
102
95
|
return;
|
|
103
|
-
// Check if properties are properly grouped
|
|
104
96
|
for (let i = 1; i < staticProperties.length; i++) {
|
|
105
97
|
const current = staticProperties[i];
|
|
106
98
|
const previous = staticProperties[i - 1];
|
|
107
99
|
if (!areInSameGroup(current.name, previous.name, groups)) {
|
|
108
|
-
// `staticProperties` holds every named static member in source
|
|
109
|
-
// order, so the members strictly between `previous` and `current`
|
|
110
|
-
// are either non-static or computed-key statics (no name). The
|
|
111
|
-
// historical implementation walked that gap looking for a named
|
|
112
|
-
// static property to report — a provably unreachable path (a named
|
|
113
|
-
// static in the gap would itself already be in `staticProperties`).
|
|
114
|
-
// That dead branch was deleted rather than coverage-ignored.
|
|
115
100
|
}
|
|
116
101
|
}
|
|
117
102
|
}
|
|
118
|
-
// oxlint-disable-next-line consistent-function-scoping
|
|
119
103
|
function isStaticProperty(member) {
|
|
120
|
-
return (
|
|
121
|
-
// Handle PropertyDefinition and MethodDefinition
|
|
122
|
-
(member.type === 'PropertyDefinition' || member.type === 'MethodDefinition') &&
|
|
104
|
+
return ((member.type === 'PropertyDefinition' || member.type === 'MethodDefinition') &&
|
|
123
105
|
member.static);
|
|
124
106
|
}
|
|
125
|
-
// oxlint-disable-next-line consistent-function-scoping
|
|
126
107
|
function getPropertyName(member) {
|
|
127
108
|
if (member.key.type === 'Identifier') {
|
|
128
109
|
return member.key.name;
|
|
129
110
|
}
|
|
130
111
|
return null;
|
|
131
112
|
}
|
|
132
|
-
// oxlint-disable-next-line consistent-function-scoping
|
|
133
113
|
function areInSameGroup(name1, name2, groups) {
|
|
134
114
|
for (const group of groups) {
|
|
135
115
|
if (group.properties.includes(name1) && group.properties.includes(name2)) {
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
4
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
5
|
-
* MIT license that can be found in the LICENSE file.
|
|
6
|
-
*/
|
|
7
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
3
|
exports.voidDomElementsNoChildren = void 0;
|
|
9
4
|
const eslint_devkit_1 = require("@interlace/eslint-devkit");
|
|
10
5
|
const eslint_devkit_2 = require("@interlace/eslint-devkit");
|
|
11
|
-
// HTML void elements that cannot have children
|
|
12
6
|
const VOID_ELEMENTS = new Set([
|
|
13
7
|
'area',
|
|
14
8
|
'base',
|
|
@@ -58,7 +52,6 @@ exports.voidDomElementsNoChildren = (0, eslint_devkit_2.createRule)({
|
|
|
58
52
|
attr.name.type === 'JSXIdentifier' &&
|
|
59
53
|
attr.name.name === 'dangerouslySetInnerHTML');
|
|
60
54
|
}
|
|
61
|
-
// oxlint-disable-next-line consistent-function-scoping
|
|
62
55
|
function hasJSXChildren(node) {
|
|
63
56
|
return node.children.some(child => {
|
|
64
57
|
if (child.type === 'JSXText') {
|
package/src/types/index.js
CHANGED
package/CHANGELOG.md
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
## [1.1.4] - 2026-05-03
|
|
2
|
-
|
|
3
|
-
## 1.2.4
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- [#269](https://github.com/ofri-peretz/eslint/pull/269) [`7028fe2`](https://github.com/ofri-peretz/eslint/commit/7028fe2668a42266d831014184dcef70e73101ad) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - docs: dual-logo README header (Interlace mark + ESLint mark side by side) and closing Interlace footer — refreshes the README rendered on npmjs.com. No runtime changes.
|
|
8
|
-
|
|
9
|
-
- Updated dependencies [[`7028fe2`](https://github.com/ofri-peretz/eslint/commit/7028fe2668a42266d831014184dcef70e73101ad)]:
|
|
10
|
-
- @interlace/eslint-devkit@1.4.2
|
|
11
|
-
|
|
12
|
-
## 1.2.3
|
|
13
|
-
|
|
14
|
-
### Patch Changes
|
|
15
|
-
|
|
16
|
-
- [#252](https://github.com/ofri-peretz/eslint/pull/252) [`d67e395`](https://github.com/ofri-peretz/eslint/commit/d67e3953c2748ad36e6aebe0f24b1d04e518b4d0) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - Fix Codecov badge showing "unknown" — switch from flag to component URL format
|
|
17
|
-
|
|
18
|
-
## 1.2.2
|
|
19
|
-
|
|
20
|
-
### Patch Changes
|
|
21
|
-
|
|
22
|
-
- [#225](https://github.com/ofri-peretz/eslint/pull/225) [`34ff5a8`](https://github.com/ofri-peretz/eslint/commit/34ff5a8e6f5126c5d1c0a524759e0af2b5476b46) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - CI-only: pin all coverage thresholds at 100% (integration target, merges last).
|
|
23
|
-
|
|
24
|
-
## 1.2.1
|
|
25
|
-
|
|
26
|
-
### Patch Changes
|
|
27
|
-
|
|
28
|
-
- [#229](https://github.com/ofri-peretz/eslint/pull/229) [`acc81a7`](https://github.com/ofri-peretz/eslint/commit/acc81a74d0c329027bf6011f5db4b1bf9beba650) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - `no-unknown-property` no longer fires on custom React components. The rule now
|
|
29
|
-
only checks host (lowercase DOM) elements, matching upstream
|
|
30
|
-
`react/no-unknown-property` — uppercase and member-expression JSX names
|
|
31
|
-
(`<Box surface="card">`, `<Motion.div />`) accept arbitrary props.
|
|
32
|
-
|
|
33
|
-
## 1.2.0
|
|
34
|
-
|
|
35
|
-
### Minor Changes
|
|
36
|
-
|
|
37
|
-
- [#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.
|
|
38
|
-
|
|
39
|
-
Eight rules — `no-default-test-id`, `require-data-slot`, `no-is-prefix-prop`,
|
|
40
|
-
`no-inline-style`, `no-raw-color-literal`, `no-arbitrary-token-class`,
|
|
41
|
-
`no-kind-prop-discriminator`, `no-wrapper-sub-component` — already exist in
|
|
42
|
-
`src/rules/component-api/`, but they were not previously included in the
|
|
43
|
-
published `rules` map and so could not be registered by consumers.
|
|
44
|
-
This release adds them so downstream apps (e.g. `apps/blog`, `apps/docs`,
|
|
45
|
-
`interlace-landing`) can register the `componentApi` preset via:
|
|
46
|
-
|
|
47
|
-
```js
|
|
48
|
-
import reactFeatures from "eslint-plugin-react-features";
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
plugins: { "react-features": reactFeatures },
|
|
52
|
-
rules: {
|
|
53
|
-
"react-features/component-api/no-default-test-id": "error",
|
|
54
|
-
"react-features/component-api/require-data-slot": "warn",
|
|
55
|
-
"react-features/component-api/no-is-prefix-prop": "warn",
|
|
56
|
-
"react-features/component-api/no-inline-style": "warn",
|
|
57
|
-
"react-features/component-api/no-raw-color-literal": "warn",
|
|
58
|
-
"react-features/component-api/no-arbitrary-token-class": "warn",
|
|
59
|
-
"react-features/component-api/no-kind-prop-discriminator": "warn",
|
|
60
|
-
"react-features/component-api/no-wrapper-sub-component": "warn",
|
|
61
|
-
},
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Each rule corresponds to a rule ID (R5/R6/R8/R11/R12/R18/R19) in the
|
|
66
|
-
`interlace-component` skill at `agents/skills/interlace-component/SKILL.md`.
|
|
67
|
-
The rules are not part of the `recommended` config — they ship as an opt-in
|
|
68
|
-
`componentApi` preset that strict design systems can enable on top of the
|
|
69
|
-
base react ruleset.
|
|
70
|
-
|
|
71
|
-
Unblocks STR-1 in `agents/apps/blog/INTERLACE_AUDIT.md`.
|
|
72
|
-
|
|
73
|
-
### Patch Changes
|
|
74
|
-
|
|
75
|
-
- [#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
|
|
76
|
-
|
|
77
|
-
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:
|
|
78
|
-
- `browser-security/no-clickjacking`
|
|
79
|
-
- `import-next/first`, `named`, `no-barrel-import`, `no-import-module-exports`, `no-namespace`
|
|
80
|
-
- `node-security/no-buffer-overread`, `no-unsafe-dynamic-require`, `no-zip-slip`
|
|
81
|
-
- `react-features/react-no-inline-functions`
|
|
82
|
-
- `reliability/no-jsdoc-terminator-in-example` (uses `suggest`, not auto-fix; corrected to `hasSuggestions: true` only)
|
|
83
|
-
- `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`
|
|
84
|
-
|
|
85
|
-
- [#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:
|
|
86
|
-
- **react-features**: the README rules table now lists the 8 `componentApi`
|
|
87
|
-
preset rules. The README generator (`sync-readme-rules.ts`) and the
|
|
88
|
-
`plugin-rule-source-drift` validator now recurse into nested
|
|
89
|
-
`docs/rules/<category>/` subfolders, so every documented rule is advertised
|
|
90
|
-
consistently (previously the nested componentApi docs were silently dropped,
|
|
91
|
-
which an earlier `readme` exception had papered over — that exception is now
|
|
92
|
-
removed in favour of the real fix).
|
|
93
|
-
- **node-security**: remove the orphaned `no-pii-in-logs` rule source — the rule
|
|
94
|
-
was migrated to `eslint-plugin-secure-coding` and is no longer exported here;
|
|
95
|
-
the dead source was still compiling into `dist`.
|
|
96
|
-
- **import-next**: restore the `no-cycle` unit test after [#180](https://github.com/ofri-peretz/eslint/issues/180)'s SCC refactor
|
|
97
|
-
(`computeSCCsFromFile` + `findShortestCyclePath` are now bridged in the mock).
|
|
98
|
-
|
|
99
|
-
Also fixes `scripts/ilb-plugin-scope-audit.ts` to stop mis-reading config-preset
|
|
100
|
-
keys (`'recommended-strict': {`) as rules.
|
|
101
|
-
|
|
102
|
-
- Updated dependencies [[`736a5fe`](https://github.com/ofri-peretz/eslint/commit/736a5fed47e673f6157ea900b29fe2a54e4bc7df)]:
|
|
103
|
-
- @interlace/eslint-devkit@1.4.1
|
|
104
|
-
|
|
105
|
-
### Bug Fixes
|
|
106
|
-
|
|
107
|
-
- `jsx-no-target-blank`: replaced `/^\/\//.test(href)` with `href.startsWith('//')` (oxlint correctness rule).
|
|
108
|
-
|
|
109
|
-
## [1.1.3] - 2026-02-08
|
|
110
|
-
|
|
111
|
-
### Bug Fixes
|
|
112
|
-
|
|
113
|
-
- align codecov component IDs with full package names ([2831b968](https://github.com/ofri-peretz/eslint/commit/2831b968))
|
|
114
|
-
|
|
115
|
-
### Documentation
|
|
116
|
-
|
|
117
|
-
- fix changelog header format across all packages ([c3a15082](https://github.com/ofri-peretz/eslint/commit/c3a15082))
|
|
118
|
-
|
|
119
|
-
### ❤️ Thank You
|
|
120
|
-
|
|
121
|
-
- Ofri Peretz
|
|
122
|
-
|
|
123
|
-
## [1.1.2] - 2026-02-06
|
|
124
|
-
|
|
125
|
-
### Bug Fixes
|
|
126
|
-
|
|
127
|
-
- align codecov component names and update docs components ([0a59a86c](https://github.com/ofri-peretz/eslint/commit/0a59a86c))
|
|
128
|
-
|
|
129
|
-
### ❤️ Thank You
|
|
130
|
-
|
|
131
|
-
- Ofri Peretz
|
|
132
|
-
|
|
133
|
-
## [1.1.1] - 2026-02-02
|
|
134
|
-
|
|
135
|
-
This was a version bump only for eslint-plugin-react-features to align it with other projects, there were no code changes.
|
|
136
|
-
|
|
137
|
-
# Changelog
|
|
138
|
-
|
|
139
|
-
All notable changes to `eslint-plugin-react-features` will be documented in this file.
|
|
140
|
-
|
|
141
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
142
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
143
|
-
|
|
144
|
-
### Documentation
|
|
145
|
-
|
|
146
|
-
- 📘 Launched new documentation site: [eslint.interlace.tools](https://eslint.interlace.tools/)
|
|
147
|
-
- 📝 Achieved 100% documentation parity (both .md and .mdx files)
|
|
148
|
-
|
|
149
|
-
## [1.1.0] - 2026-02-02
|
|
150
|
-
|
|
151
|
-
### Features
|
|
152
|
-
|
|
153
|
-
- **infra:** migrate from pnpm to npm for Vercel compatibility ([46172cd7](https://github.com/ofri-peretz/eslint/commit/46172cd7))
|
|
154
|
-
- **docs:** implement 3-pillar navigation with sidebar tabs ([03c3f688](https://github.com/ofri-peretz/eslint/commit/03c3f688))
|
|
155
|
-
- **docs:** deploy new Interlace VI and mobile UX ([c05b5106](https://github.com/ofri-peretz/eslint/commit/c05b5106))
|
|
156
|
-
- add high-fidelity OG images, banners, and update docs layout ([bf60afed](https://github.com/ofri-peretz/eslint/commit/bf60afed))
|
|
157
|
-
|
|
158
|
-
### Bug Fixes
|
|
159
|
-
|
|
160
|
-
- **release:** fix release workflow logic, docs cache, and promote lint warnings to errors ([5945113a](https://github.com/ofri-peretz/eslint/commit/5945113a))
|
|
161
|
-
- **docs:** resolve MDX compatibility issues and add validation tests ([dac50031](https://github.com/ofri-peretz/eslint/commit/dac50031))
|
|
162
|
-
- **docs:** revert inappropriate security additions to non-security plugins ([b8b7bac0](https://github.com/ofri-peretz/eslint/commit/b8b7bac0))
|
|
163
|
-
- **docs:** strict readout alignment to NestJS structure and table consolidation --no-verify ([6e12c39f](https://github.com/ofri-peretz/eslint/commit/6e12c39f))
|
|
164
|
-
- **docs:** wrap lucide icons with span for title attribute compatibility ([bd36290d](https://github.com/ofri-peretz/eslint/commit/bd36290d))
|
|
165
|
-
|
|
166
|
-
### Documentation
|
|
167
|
-
|
|
168
|
-
- update rule documentation and docs app UI improvements ([53c83f8c](https://github.com/ofri-peretz/eslint/commit/53c83f8c))
|
|
169
|
-
- add Known False Negatives to all rules (173 rules updated) ([1e988afd](https://github.com/ofri-peretz/eslint/commit/1e988afd))
|
|
170
|
-
- fleet-wide documentation compliance - 160 rules improved ([1d68f96a](https://github.com/ofri-peretz/eslint/commit/1d68f96a))
|
|
171
|
-
- update plugin documentation with standardized badges and new OG images ([627773c9](https://github.com/ofri-peretz/eslint/commit/627773c9))
|
|
172
|
-
- finalize readme structure, drop security research coverage ([30b96dbd](https://github.com/ofri-peretz/eslint/commit/30b96dbd))
|
|
173
|
-
- remove header and legend artifacts from rules table ([8e46b93e](https://github.com/ofri-peretz/eslint/commit/8e46b93e))
|
|
174
|
-
- finalize readme layout with centered badges and strict structure ([f9413c91](https://github.com/ofri-peretz/eslint/commit/f9413c91))
|
|
175
|
-
- align main README with Interlace branding ([15e520cd](https://github.com/ofri-peretz/eslint/commit/15e520cd))
|
|
176
|
-
|
|
177
|
-
### ❤️ Thank You
|
|
178
|
-
|
|
179
|
-
- Ofri Peretz
|
|
180
|
-
|
|
181
|
-
## [1.0.0] - 2026-01-26
|
|
182
|
-
|
|
183
|
-
### Added
|
|
184
|
-
|
|
185
|
-
- Initial stable release with 53 React rules
|
|
186
|
-
- 1,190+ test cases covering edge cases and TypeScript integration
|
|
187
|
-
- LLM-optimized error messages for AI-assisted development
|
|
188
|
-
- ESLint 9 flat config support
|
|
189
|
-
- TypeScript type definitions for all rule options
|
|
190
|
-
|
|
191
|
-
### Rule Categories
|
|
192
|
-
|
|
193
|
-
#### Migration Rules (React 17→18)
|
|
194
|
-
|
|
195
|
-
- `jsx-no-target-blank` - Require rel="noopener" on target="\_blank" links
|
|
196
|
-
- `jsx-no-script-url` - Disallow javascript: URLs in JSX
|
|
197
|
-
- `jsx-no-duplicate-props` - Disallow duplicate props
|
|
198
|
-
- `no-danger-with-children` - Disallow children with dangerouslySetInnerHTML
|
|
199
|
-
- `no-deprecated` - Disallow deprecated React APIs
|
|
200
|
-
- `no-find-dom-node` - Disallow findDOMNode
|
|
201
|
-
- `no-unsafe` - Disallow UNSAFE\_ lifecycle methods
|
|
202
|
-
- `void-dom-elements-no-children` - Disallow children in void DOM elements
|
|
203
|
-
|
|
204
|
-
#### Performance Rules
|
|
205
|
-
|
|
206
|
-
- `no-inline-handlers` - Disallow inline function handlers (re-render prevention)
|
|
207
|
-
- `no-object-style-literals` - Disallow object literals in style prop
|
|
208
|
-
- `require-memo` - Require React.memo for pure components
|
|
209
|
-
- `require-usecallback` - Require useCallback for function props
|
|
210
|
-
- `require-usememo` - Require useMemo for expensive computations
|
|
211
|
-
|
|
212
|
-
#### Core React Rules
|
|
213
|
-
|
|
214
|
-
- Hooks rules: exhaustive-deps, rules-of-hooks compliance
|
|
215
|
-
- Component patterns: naming, structure, composition
|
|
216
|
-
- State management: useState, useReducer patterns
|
|
217
|
-
|
|
218
|
-
### Presets
|
|
219
|
-
|
|
220
|
-
- `recommended` - Balanced React best practices
|
|
221
|
-
- `strict` - All rules as errors
|
|
222
|
-
- `performance` - Performance-focused subset
|
|
223
|
-
- `migration` - React upgrade assistance
|
|
224
|
-
|
|
225
|
-
### ⚠️ Breaking from 0.x
|
|
226
|
-
|
|
227
|
-
- Removed deprecated rules (now in `react-a11y`)
|
|
228
|
-
- Renamed: `react-perf/no-jsx-bind` → `performance/no-inline-handlers`
|
|
229
|
-
|
|
230
|
-
### Known Limitations
|
|
231
|
-
|
|
232
|
-
Documented in `docs/KNOWN-LIMITATIONS.md`:
|
|
233
|
-
|
|
234
|
-
- `jsx-no-target-blank`: Dynamic `href` variables not detected
|
|
235
|
-
- `jsx-no-script-url`: Obfuscated patterns in variables not detected
|
|
236
|
-
- Spread props (`{...props}`) prevent static attribute analysis
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: no-arbitrary-token-class
|
|
8
|
-
* Enforces R19: no Tailwind arbitrary-value classes (`rounded-[12px]`,
|
|
9
|
-
* `px-[18px]`) on properties that have a design-token equivalent. Allows
|
|
10
|
-
* arbitrary values that reference CSS variables (`rounded-[var(--token)]`),
|
|
11
|
-
* computed expressions (`w-[calc(...)]`), or non-pixel units that don't map
|
|
12
|
-
* to the spacing scale (`min-h-[60vh]`).
|
|
13
|
-
*/
|
|
14
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
15
|
-
export declare const noArbitraryTokenClass: TSESLint.RuleModule<"arbitraryClass", [], unknown, TSESLint.RuleListener> & {
|
|
16
|
-
name: string;
|
|
17
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: no-default-test-id
|
|
8
|
-
* Enforces R5 from the interlace-component skill: data-testid must be
|
|
9
|
-
* type-required and consumer-provided. A runtime default contradicts the
|
|
10
|
-
* type-level requirement and silently masks consumer omissions.
|
|
11
|
-
*/
|
|
12
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
13
|
-
export declare const noDefaultTestId: TSESLint.RuleModule<"defaultTestId", [], unknown, TSESLint.RuleListener> & {
|
|
14
|
-
name: string;
|
|
15
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: no-inline-style
|
|
8
|
-
* Enforces R18: no inline `style={{...}}` for static styling. The only
|
|
9
|
-
* permitted case is CSS-variable assignment (`style={{ "--snp-x": x }}`)
|
|
10
|
-
* for genuinely dynamic values. Everything else belongs in Tailwind classes.
|
|
11
|
-
*/
|
|
12
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
13
|
-
export declare const noInlineStyle: TSESLint.RuleModule<"inlineStyle", [], unknown, TSESLint.RuleListener> & {
|
|
14
|
-
name: string;
|
|
15
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: no-is-prefix-prop
|
|
8
|
-
* Enforces R8: boolean props default-false, name describes the true state.
|
|
9
|
-
* Bans `isXxx: boolean` props in TypeScript interfaces / type aliases.
|
|
10
|
-
* `looped` reads naturally; `isLooped` is MUI-flagged noise.
|
|
11
|
-
*/
|
|
12
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
13
|
-
type MessageIds = 'isPrefix' | 'renameSuggestion';
|
|
14
|
-
export declare const noIsPrefixProp: TSESLint.RuleModule<MessageIds, [], unknown, TSESLint.RuleListener> & {
|
|
15
|
-
name: string;
|
|
16
|
-
};
|
|
17
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: no-kind-prop-discriminator
|
|
8
|
-
* Enforces R11: ban the `type: "A" | "B"` kind-prop pattern when the value
|
|
9
|
-
* is intended to switch the rendered tree. Heuristic: a property named
|
|
10
|
-
* `type` / `kind` / `variant` with a string-literal-union of 2+ members,
|
|
11
|
-
* AND the component body contains a conditional `if (props.<name> === ...)`
|
|
12
|
-
* or switch-case branching on that prop.
|
|
13
|
-
*
|
|
14
|
-
* Notes on intentional false positives:
|
|
15
|
-
* - `variant` is permitted by some teams as a CVA discriminator that only
|
|
16
|
-
* switches `role` / `className` (not the element tree). This rule flags
|
|
17
|
-
* the shape; review confirms whether the branching is structural or just
|
|
18
|
-
* a contract switch.
|
|
19
|
-
* - We only flag `type` / `kind` here; `variant` is allow-listed by default
|
|
20
|
-
* because CVA usage is the dominant case.
|
|
21
|
-
*/
|
|
22
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
23
|
-
export declare const noKindPropDiscriminator: TSESLint.RuleModule<"kindProp", [], unknown, TSESLint.RuleListener> & {
|
|
24
|
-
name: string;
|
|
25
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: no-raw-color-literal
|
|
8
|
-
* Enforces R19: no raw color literals (hex, rgb/rgba, hsl/hsla, oklch/oklab)
|
|
9
|
-
* in source. Colors must come from design tokens via CSS custom properties
|
|
10
|
-
* or Tailwind classes wired to them. Scoped to JSX `style` / `className`
|
|
11
|
-
* object values and `cn()`/`clsx()` arguments to minimize false positives.
|
|
12
|
-
*/
|
|
13
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
14
|
-
export declare const noRawColorLiteral: TSESLint.RuleModule<"rawColor", [], unknown, TSESLint.RuleListener> & {
|
|
15
|
-
name: string;
|
|
16
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: no-wrapper-sub-component
|
|
8
|
-
* Enforces R12: don't create wrapper sub-components when an existing
|
|
9
|
-
* primitive does the job. Heuristic: a function component whose entire body
|
|
10
|
-
* is `return <Primitive {...props} />;` — a pure passthrough wrapper that
|
|
11
|
-
* adds no structural behavior.
|
|
12
|
-
*
|
|
13
|
-
* Exempt cases:
|
|
14
|
-
* - The wrapper adds at least one literal attribute (className, data-slot,
|
|
15
|
-
* aria-*, role) — that's structural behavior.
|
|
16
|
-
* - The wrapper adds hook calls or computed values before returning.
|
|
17
|
-
* - The wrapper renames the component for re-export with no other change —
|
|
18
|
-
* still flagged; consumers should import the primitive directly.
|
|
19
|
-
*/
|
|
20
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
21
|
-
export declare const noWrapperSubComponent: TSESLint.RuleModule<"wrapperSubComponent", [], unknown, TSESLint.RuleListener> & {
|
|
22
|
-
name: string;
|
|
23
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: require-data-slot
|
|
8
|
-
* Enforces R6: every named composition part carries `data-slot="<part-name>"`
|
|
9
|
-
* so consumers can style by slot. Heuristic: a JSX element that carries
|
|
10
|
-
* `data-testid` is a named part and must also carry `data-slot`.
|
|
11
|
-
*/
|
|
12
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
13
|
-
export declare const requireDataSlot: TSESLint.RuleModule<"missingDataSlot", [], unknown, TSESLint.RuleListener> & {
|
|
14
|
-
name: string;
|
|
15
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: react-class-to-hooks
|
|
8
|
-
* Detects React class components that can be migrated to hooks with transformation context
|
|
9
|
-
*/
|
|
10
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
11
|
-
type MessageIds = 'migrateToHooks' | 'convertToFunction' | 'viewMigrationGuide';
|
|
12
|
-
export interface Options {
|
|
13
|
-
/** Ignore PureComponent classes. Default: false */
|
|
14
|
-
ignorePureRenderComponents?: boolean;
|
|
15
|
-
/** Allow classes with complex lifecycle patterns. Default: false */
|
|
16
|
-
allowComplexLifecycle?: boolean;
|
|
17
|
-
}
|
|
18
|
-
type RuleOptions = [Options?];
|
|
19
|
-
export declare const reactClassToHooks: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
20
|
-
name: string;
|
|
21
|
-
};
|
|
22
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: no-unnecessary-rerenders
|
|
8
|
-
* Detects prevented re-renders in React
|
|
9
|
-
* React-specific performance rule
|
|
10
|
-
*
|
|
11
|
-
* @see https://react.dev/reference/react/useMemo
|
|
12
|
-
* @see https://react.dev/reference/react/useCallback
|
|
13
|
-
*/
|
|
14
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
15
|
-
type MessageIds = 'unnecessaryRerender' | 'useMemo' | 'useCallback' | 'extractToVariable';
|
|
16
|
-
export interface Options {
|
|
17
|
-
/** Ignore in test files. Default: true */
|
|
18
|
-
ignoreInTests?: boolean;
|
|
19
|
-
/** Minimum array/object size to warn. Default: 5 */
|
|
20
|
-
minSize?: number;
|
|
21
|
-
}
|
|
22
|
-
type RuleOptions = [Options?];
|
|
23
|
-
export declare const noUnnecessaryRerenders: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
24
|
-
name: string;
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: react-no-inline-functions
|
|
8
|
-
* Detects inline functions in React renders with performance impact context
|
|
9
|
-
*/
|
|
10
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
11
|
-
type MessageIds = 'inlineFunction' | 'useCallback' | 'extractFunction' | 'strategyUseCallback' | 'strategyUseMemo' | 'strategyExtract';
|
|
12
|
-
export interface Options {
|
|
13
|
-
/** Allow inline functions in event handlers. Default: false */
|
|
14
|
-
allowInEventHandlers?: boolean;
|
|
15
|
-
/** Minimum array size to trigger warning. Default: 5 */
|
|
16
|
-
minArraySize?: number;
|
|
17
|
-
/** Strategy for fixing inline functions: 'usecallback', 'usememo', 'extract', or 'auto' */
|
|
18
|
-
strategy?: 'usecallback' | 'usememo' | 'extract' | 'auto';
|
|
19
|
-
}
|
|
20
|
-
type RuleOptions = [Options?];
|
|
21
|
-
export declare const reactNoInlineFunctions: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
22
|
-
name: string;
|
|
23
|
-
};
|
|
24
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: react-render-optimization
|
|
8
|
-
* Detects unnecessary re-renders and expensive computations in React
|
|
9
|
-
* Priority 7: Performance & Optimization
|
|
10
|
-
*
|
|
11
|
-
* @see https://react.dev/learn/render-and-commit
|
|
12
|
-
*/
|
|
13
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
14
|
-
type MessageIds = 'unnecessaryRerender' | 'missingMemoization' | 'expensiveComputation' | 'useMemo' | 'useCallback' | 'useReactMemo';
|
|
15
|
-
export interface Options {
|
|
16
|
-
/** Detect inline object/array props. Default: true */
|
|
17
|
-
detectInlineProps?: boolean;
|
|
18
|
-
/** Detect inline function props. Default: true */
|
|
19
|
-
detectInlineFunctions?: boolean;
|
|
20
|
-
/** Detect expensive computations without useMemo. Default: true */
|
|
21
|
-
detectExpensiveComputations?: boolean;
|
|
22
|
-
/** Minimum computation complexity to flag. Default: 3 */
|
|
23
|
-
minComputationComplexity?: number;
|
|
24
|
-
/** Ignore in test files. Default: true */
|
|
25
|
-
ignoreInTests?: boolean;
|
|
26
|
-
}
|
|
27
|
-
type RuleOptions = [Options?];
|
|
28
|
-
export declare const reactRenderOptimization: TSESLint.RuleModule<MessageIds, RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
29
|
-
name: string;
|
|
30
|
-
};
|
|
31
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: checked-requires-onchange-or-readonly
|
|
8
|
-
* Ensure controlled inputs have onChange or readOnly
|
|
9
|
-
*/
|
|
10
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
11
|
-
export interface Options {
|
|
12
|
-
}
|
|
13
|
-
export type RuleOptions = [Options?];
|
|
14
|
-
export declare const checkedRequiresOnchangeOrReadonly: TSESLint.RuleModule<"checkedRequiresOnChangeOrReadOnly", RuleOptions, unknown, TSESLint.RuleListener> & {
|
|
15
|
-
name: string;
|
|
16
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: default-props-match-prop-types
|
|
8
|
-
* Validate default props match prop types
|
|
9
|
-
*/
|
|
10
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
11
|
-
export declare const defaultPropsMatchPropTypes: TSESLint.RuleModule<"defaultPropsMatchPropTypes", [], unknown, TSESLint.RuleListener> & {
|
|
12
|
-
name: string;
|
|
13
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
-
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
-
* MIT license that can be found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* ESLint Rule: display-name
|
|
8
|
-
* Enforce component display names
|
|
9
|
-
*/
|
|
10
|
-
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
11
|
-
export declare const displayName: TSESLint.RuleModule<"displayName", [], unknown, TSESLint.RuleListener> & {
|
|
12
|
-
name: string;
|
|
13
|
-
};
|