eslint-plugin-react-naming-convention 2.3.13 → 2.4.0-beta.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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ const rules = {
39
39
  //#endregion
40
40
  //#region package.json
41
41
  var name = "eslint-plugin-react-naming-convention";
42
- var version = "2.3.13";
42
+ var version = "2.4.0-beta.1";
43
43
 
44
44
  //#endregion
45
45
  //#region src/utils/create-rule.ts
@@ -421,13 +421,14 @@ function create(context) {
421
421
  return;
422
422
  }
423
423
  const [value, setter] = id.elements;
424
- if (value == null || setter == null) {
424
+ if (value == null) {
425
425
  context.report({
426
426
  messageId: "invalidAssignment",
427
427
  node: id
428
428
  });
429
429
  return;
430
430
  }
431
+ if (setter == null) return;
431
432
  const setterName = match(setter).with({ type: AST_NODE_TYPES.Identifier }, (id$1) => id$1.name).otherwise(() => null);
432
433
  if (setterName == null || !setterName.startsWith("set")) {
433
434
  context.report({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-naming-convention",
3
- "version": "2.3.13",
3
+ "version": "2.4.0-beta.1",
4
4
  "description": "ESLint React's ESLint plugin for naming convention related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -44,11 +44,11 @@
44
44
  "@typescript-eslint/utils": "^8.49.0",
45
45
  "string-ts": "^2.3.1",
46
46
  "ts-pattern": "^5.9.0",
47
- "@eslint-react/ast": "2.3.13",
48
- "@eslint-react/core": "2.3.13",
49
- "@eslint-react/eff": "2.3.13",
50
- "@eslint-react/shared": "2.3.13",
51
- "@eslint-react/var": "2.3.13"
47
+ "@eslint-react/ast": "2.4.0-beta.1",
48
+ "@eslint-react/eff": "2.4.0-beta.1",
49
+ "@eslint-react/core": "2.4.0-beta.1",
50
+ "@eslint-react/shared": "2.4.0-beta.1",
51
+ "@eslint-react/var": "2.4.0-beta.1"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/react": "^19.2.7",