eslint-plugin-react-features 1.2.0 → 1.2.1

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  ## [1.1.4] - 2026-05-03
2
2
 
3
+ ## 1.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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
8
+ only checks host (lowercase DOM) elements, matching upstream
9
+ `react/no-unknown-property` — uppercase and member-expression JSX names
10
+ (`<Box surface="card">`, `<Motion.div />`) accept arbitrary props.
11
+
3
12
  ## 1.2.0
4
13
 
5
14
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-features",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "ESLint React rules for modern react features, hooks, and patterns.",
5
5
  "type": "commonjs",
6
6
  "main": "./src/index.js",
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "scripts": {
72
72
  "build": "tsx ../../scripts/build-package.ts",
73
- "test": "vitest run",
73
+ "test": "vitest run --coverage",
74
74
  "test:coverage": "vitest run --coverage",
75
75
  "typecheck": "tsc -p tsconfig.lib.json --noEmit"
76
76
  },
package/src/index.js CHANGED
@@ -208,7 +208,7 @@ exports.rules = {
208
208
  exports.plugin = {
209
209
  meta: {
210
210
  name: 'eslint-plugin-react-features',
211
- version: '1.2.0',
211
+ version: '1.2.1',
212
212
  },
213
213
  rules: exports.rules,
214
214
  };
@@ -111,6 +111,12 @@ exports.noUnknownProperty = (0, eslint_devkit_1.createRule)({
111
111
  create(context) {
112
112
  return {
113
113
  JSXAttribute(node) {
114
+ // Only host (DOM) elements have a fixed property set. Custom
115
+ // components (<Box />, <Motion.div />) accept arbitrary props.
116
+ const elementName = node.parent.name;
117
+ if (elementName.type !== 'JSXIdentifier' || !/^[a-z]/.test(elementName.name)) {
118
+ return;
119
+ }
114
120
  if (node.name.type === 'JSXIdentifier') {
115
121
  const propName = node.name.name;
116
122
  // Skip React-specific props and data attributes