@utilfirst/eslint-plugin 0.4.0 → 0.4.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/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as src_default } from "./src-BcVIwgzD.js";
1
+ import { t as src_default } from "./src-Bthhlf8v.js";
2
2
 
3
3
  export { src_default as default };
package/dist/oxlint.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as src_default } from "./src-BcVIwgzD.js";
1
+ import { t as src_default } from "./src-Bthhlf8v.js";
2
2
  import { defineConfig } from "oxlint";
3
3
 
4
4
  //#region src/oxlint.ts
@@ -3,7 +3,7 @@ import { AST_NODE_TYPES } from "@typescript-eslint/utils";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region package.json
6
- var version = "0.4.0";
6
+ var version = "0.4.1";
7
7
 
8
8
  //#endregion
9
9
  //#region src/rules/consistent-blank-lines.ts
@@ -3426,6 +3426,15 @@ const preferOptionsParameterRule = defineRule({
3426
3426
 
3427
3427
  //#endregion
3428
3428
  //#region src/rules/prefer-react-props-reference.ts
3429
+ const HTTP_METHOD_EXPORT_NAMES = new Set([
3430
+ "DELETE",
3431
+ "GET",
3432
+ "HEAD",
3433
+ "OPTIONS",
3434
+ "PATCH",
3435
+ "POST",
3436
+ "PUT"
3437
+ ]);
3429
3438
  function componentNameOf(node) {
3430
3439
  if (node.type !== "ArrowFunctionExpression") return node.id?.name ?? null;
3431
3440
  if (node.parent.type === "VariableDeclarator" && node.parent.id.type === "Identifier") return node.parent.id.name;
@@ -3433,7 +3442,7 @@ function componentNameOf(node) {
3433
3442
  }
3434
3443
  function isComponent(node) {
3435
3444
  const name = componentNameOf(node);
3436
- return name !== null && /^\p{Lu}/u.test(name);
3445
+ return name !== null && !HTTP_METHOD_EXPORT_NAMES.has(name) && /^\p{Lu}/u.test(name);
3437
3446
  }
3438
3447
  function propertyNameOf(key) {
3439
3448
  if (key.type === "Identifier") return key.name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utilfirst/eslint-plugin",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Shared lint rules for ESLint and Oxlint",
5
5
  "keywords": [
6
6
  "eslint",