@utilfirst/eslint-plugin 0.4.1 → 0.4.2

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-Bthhlf8v.js";
1
+ import { t as src_default } from "./src-DdudPvOQ.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-Bthhlf8v.js";
1
+ import { t as src_default } from "./src-DdudPvOQ.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.1";
6
+ var version = "0.4.2";
7
7
 
8
8
  //#endregion
9
9
  //#region src/rules/consistent-blank-lines.ts
@@ -2620,6 +2620,11 @@ function parameterName(parameter, sourceText) {
2620
2620
  if (parameter.type === "RestElement") return parameterName(parameter.argument, sourceText);
2621
2621
  return parameter.type === "Identifier" ? parameter.name : sourceText.replace(/\s*:\s*unknown\s*$/u, "");
2622
2622
  }
2623
+ function isPromiseCatchCallback(node) {
2624
+ if (node.type !== "ArrowFunctionExpression" && node.type !== "FunctionExpression") return false;
2625
+ const call = node.parent;
2626
+ return call.type === "CallExpression" && call.arguments[0] === node && call.callee.type === "MemberExpression" && !call.callee.computed && call.callee.property.type === "Identifier" && call.callee.property.name === "catch";
2627
+ }
2623
2628
  /** Keep unknown inputs at explicit decoding and error-enrichment boundaries. */
2624
2629
  const noUnknownParametersRule = defineRule({
2625
2630
  meta: {
@@ -2642,6 +2647,7 @@ const noUnknownParametersRule = defineRule({
2642
2647
  },
2643
2648
  createOnce(context) {
2644
2649
  const checkParameters = (node) => {
2650
+ if (isPromiseCatchCallback(node)) return;
2645
2651
  const parsedOptions = ContextOptionsSchema$1.safeParse(context.options);
2646
2652
  const options = parsedOptions.success ? parsedOptions.data : void 0;
2647
2653
  for (const parameter of node.params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utilfirst/eslint-plugin",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Shared lint rules for ESLint and Oxlint",
5
5
  "keywords": [
6
6
  "eslint",