@icebreakers/eslint-config 5.0.4 → 6.0.0

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.
@@ -1,5 +1,5 @@
1
1
  import { AST_NODE_TYPES, ESLintUtils, TSESTree } from "@typescript-eslint/utils";
2
- //#region ../../node_modules/.pnpm/@tanstack+eslint-plugin-query@5.100.14_eslint@10.4.0_jiti@2.7.0__typescript@6.0.3/node_modules/@tanstack/eslint-plugin-query/build/modern/chunk-DL47ZJZ5.js
2
+ //#region ../../node_modules/.pnpm/@tanstack+eslint-plugin-query@5.101.1_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@tanstack/eslint-plugin-query/build/modern/chunk-VALYN6GR.js
3
3
  function uniqueBy(arr, fn) {
4
4
  return arr.filter((x, i, a) => a.findIndex((y) => fn(x) === fn(y)) === i);
5
5
  }
@@ -616,10 +616,35 @@ var rule2 = ESLintUtils.RuleCreator(getDocsUrl)({
616
616
  } };
617
617
  })
618
618
  });
619
- var NoRestDestructuringUtils = { isObjectRestDestructuring(node) {
620
- if (node.type !== AST_NODE_TYPES.ObjectPattern) return false;
621
- return node.properties.some((p) => p.type === AST_NODE_TYPES.RestElement);
622
- } };
619
+ var QUERY_RESULT_TYPE_NAMES = /* @__PURE__ */ new Set([
620
+ "UseBaseQueryResult",
621
+ "UseQueryResult",
622
+ "UseSuspenseQueryResult",
623
+ "DefinedUseQueryResult",
624
+ "UseInfiniteQueryResult",
625
+ "UseSuspenseInfiniteQueryResult",
626
+ "DefinedUseInfiniteQueryResult",
627
+ "QueryObserverResult",
628
+ "InfiniteQueryObserverResult"
629
+ ]);
630
+ function isQueryResultType(type) {
631
+ if (type.aliasSymbol && QUERY_RESULT_TYPE_NAMES.has(type.aliasSymbol.name)) return true;
632
+ const symbol = type.getSymbol();
633
+ if (symbol && QUERY_RESULT_TYPE_NAMES.has(symbol.name)) return true;
634
+ return type.isUnion() && type.types.some(isQueryResultType);
635
+ }
636
+ var NoRestDestructuringUtils = {
637
+ isObjectRestDestructuring(node) {
638
+ if (node.type !== AST_NODE_TYPES.ObjectPattern) return false;
639
+ return node.properties.some((p) => p.type === AST_NODE_TYPES.RestElement);
640
+ },
641
+ isQueryResultCall(node, parserServices) {
642
+ if (!parserServices?.program || !parserServices.esTreeNodeToTSNodeMap) return false;
643
+ const checker = parserServices.program.getTypeChecker();
644
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node.callee);
645
+ return checker.getTypeAtLocation(tsNode).getCallSignatures().some((sig) => isQueryResultType(sig.getReturnType()));
646
+ }
647
+ };
623
648
  var name3 = "no-rest-destructuring";
624
649
  var queryHooks = [
625
650
  "useQuery",
@@ -645,9 +670,13 @@ var rule3 = ESLintUtils.RuleCreator(getDocsUrl)({
645
670
  const queryResultVariables = /* @__PURE__ */ new Set();
646
671
  return {
647
672
  CallExpression: (node) => {
648
- if (!ASTUtils.isIdentifierWithOneOfNames(node.callee, queryHooks) || node.parent.type !== AST_NODE_TYPES.VariableDeclarator || !helpers.isTanstackQueryImport(node.callee)) return;
673
+ if (node.parent.type !== AST_NODE_TYPES.VariableDeclarator) return;
649
674
  const returnValue = node.parent.id;
650
- if (node.callee.name !== "useQueries" && node.callee.name !== "useSuspenseQueries") {
675
+ if (!(ASTUtils.isIdentifierWithOneOfNames(node.callee, queryHooks) && helpers.isTanstackQueryImport(node.callee))) {
676
+ if (!(returnValue.type === AST_NODE_TYPES.Identifier || NoRestDestructuringUtils.isObjectRestDestructuring(returnValue)) || !NoRestDestructuringUtils.isQueryResultCall(node, context.sourceCode.parserServices)) return;
677
+ }
678
+ const calleeName = ASTUtils.isIdentifier(node.callee) ? node.callee.name : null;
679
+ if (calleeName !== "useQueries" && calleeName !== "useSuspenseQueries") {
651
680
  if (NoRestDestructuringUtils.isObjectRestDestructuring(returnValue)) return context.report({
652
681
  node: node.parent,
653
682
  messageId: "objectRestDestructure"
@@ -710,7 +739,10 @@ var rule4 = ESLintUtils.RuleCreator(getDocsUrl)({
710
739
  defaultOptions: [],
711
740
  create: detectTanstackQueryImports((context, _options, helpers) => {
712
741
  const trackedVariables = {};
742
+ const trackedCustomHooks = {};
713
743
  const hookAliasMap = {};
744
+ const pendingVariableDeclarators = [];
745
+ const pendingDependencyChecks = [];
714
746
  function getReactHook(node) {
715
747
  if (node.callee.type === "Identifier") {
716
748
  const calleeName = node.callee.name;
@@ -725,38 +757,81 @@ var rule4 = ESLintUtils.RuleCreator(getDocsUrl)({
725
757
  else if (element.type === AST_NODE_TYPES.RestElement && element.argument.type === AST_NODE_TYPES.Identifier) trackedVariables[element.argument.name] = queryHook;
726
758
  }
727
759
  }
760
+ function isCustomHookName(hookName) {
761
+ return /^use[A-Z0-9]/.test(hookName);
762
+ }
728
763
  function hasCombineProperty(callExpression) {
729
764
  if (callExpression.arguments.length === 0) return false;
730
765
  const firstArg = callExpression.arguments[0];
731
766
  if (!firstArg || firstArg.type !== AST_NODE_TYPES.ObjectExpression) return false;
732
767
  return firstArg.properties.some((prop) => prop.type === AST_NODE_TYPES.Property && prop.key.type === AST_NODE_TYPES.Identifier && prop.key.name === "combine");
733
768
  }
769
+ function getDirectQueryHook(callExpression) {
770
+ if (callExpression.callee.type !== AST_NODE_TYPES.Identifier || !allHookNames.includes(callExpression.callee.name) || !helpers.isTanstackQueryImport(callExpression.callee)) return;
771
+ if ((callExpression.callee.name === "useQueries" || callExpression.callee.name === "useSuspenseQueries") && hasCombineProperty(callExpression)) return;
772
+ return callExpression.callee.name;
773
+ }
774
+ function getTrackedQueryHook(callExpression) {
775
+ const directQueryHook = getDirectQueryHook(callExpression);
776
+ if (directQueryHook !== void 0) return directQueryHook;
777
+ if (callExpression.callee.type === AST_NODE_TYPES.Identifier) return trackedCustomHooks[callExpression.callee.name];
778
+ }
779
+ function getReturnedQueryHook(body) {
780
+ if (body.type === AST_NODE_TYPES.CallExpression) return getDirectQueryHook(body);
781
+ if (body.type !== AST_NODE_TYPES.BlockStatement) return;
782
+ const returnStatements = body.body.filter((statement) => statement.type === AST_NODE_TYPES.ReturnStatement);
783
+ if (returnStatements.length !== 1) return;
784
+ const returnArgument = returnStatements[0]?.argument;
785
+ if (returnArgument?.type === AST_NODE_TYPES.CallExpression) return getDirectQueryHook(returnArgument);
786
+ }
787
+ function checkDependencyArray(reactHook, depsArray) {
788
+ depsArray.elements.forEach((dep) => {
789
+ if (dep !== null && dep.type === AST_NODE_TYPES.Identifier && trackedVariables[dep.name] !== void 0) {
790
+ const queryHook = trackedVariables[dep.name];
791
+ context.report({
792
+ node: dep,
793
+ messageId: "noUnstableDeps",
794
+ data: {
795
+ queryHook,
796
+ reactHook
797
+ }
798
+ });
799
+ }
800
+ });
801
+ }
734
802
  return {
735
803
  ImportDeclaration(node) {
736
804
  if (node.specifiers.length > 0 && node.importKind === "value" && node.source.value === "React") node.specifiers.forEach((specifier) => {
737
805
  if (specifier.type === AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === AST_NODE_TYPES.Identifier && reactHookNames.includes(specifier.imported.name)) hookAliasMap[specifier.local.name] = specifier.imported.name;
738
806
  });
739
807
  },
808
+ FunctionDeclaration(node) {
809
+ if (node.id === null || !isCustomHookName(node.id.name)) return;
810
+ const queryHook = getReturnedQueryHook(node.body);
811
+ if (queryHook !== void 0) trackedCustomHooks[node.id.name] = queryHook;
812
+ },
740
813
  VariableDeclarator(node) {
741
- if (node.init !== null && node.init.type === AST_NODE_TYPES.CallExpression && node.init.callee.type === AST_NODE_TYPES.Identifier && allHookNames.includes(node.init.callee.name) && helpers.isTanstackQueryImport(node.init.callee)) {
742
- if ((node.init.callee.name === "useQueries" || node.init.callee.name === "useSuspenseQueries") && hasCombineProperty(node.init)) return;
743
- collectVariableNames(node.id, node.init.callee.name);
814
+ if (node.id.type === AST_NODE_TYPES.Identifier && isCustomHookName(node.id.name) && node.init !== null && (node.init.type === AST_NODE_TYPES.ArrowFunctionExpression || node.init.type === AST_NODE_TYPES.FunctionExpression)) {
815
+ const queryHook = getReturnedQueryHook(node.init.body);
816
+ if (queryHook !== void 0) trackedCustomHooks[node.id.name] = queryHook;
744
817
  }
818
+ if (node.init !== null && node.init.type === AST_NODE_TYPES.CallExpression) pendingVariableDeclarators.push(node);
745
819
  },
746
820
  CallExpression: (node) => {
747
821
  const reactHook = getReactHook(node);
748
- if (reactHook !== void 0 && node.arguments.length > 1 && node.arguments[1]?.type === AST_NODE_TYPES.ArrayExpression) node.arguments[1].elements.forEach((dep) => {
749
- if (dep !== null && dep.type === AST_NODE_TYPES.Identifier && trackedVariables[dep.name] !== void 0) {
750
- const queryHook = trackedVariables[dep.name];
751
- context.report({
752
- node: dep,
753
- messageId: "noUnstableDeps",
754
- data: {
755
- queryHook,
756
- reactHook
757
- }
758
- });
759
- }
822
+ if (reactHook !== void 0 && node.arguments.length > 1 && node.arguments[1]?.type === AST_NODE_TYPES.ArrayExpression) pendingDependencyChecks.push({
823
+ reactHook,
824
+ depsArray: node.arguments[1]
825
+ });
826
+ },
827
+ "Program:exit"() {
828
+ pendingVariableDeclarators.forEach((node) => {
829
+ if (node.init?.type !== AST_NODE_TYPES.CallExpression) return;
830
+ const queryHook = getTrackedQueryHook(node.init);
831
+ if (queryHook !== void 0) collectVariableNames(node.id, queryHook);
832
+ });
833
+ pendingDependencyChecks.forEach(({ reactHook, depsArray }) => {
834
+ checkDependencyArray(reactHook, depsArray);
760
835
  });
761
836
  }
762
837
  };
@@ -1101,7 +1176,7 @@ var rules = {
1101
1176
  [name8]: rule8
1102
1177
  };
1103
1178
  //#endregion
1104
- //#region ../../node_modules/.pnpm/@tanstack+eslint-plugin-query@5.100.14_eslint@10.4.0_jiti@2.7.0__typescript@6.0.3/node_modules/@tanstack/eslint-plugin-query/build/modern/index.js
1179
+ //#region ../../node_modules/.pnpm/@tanstack+eslint-plugin-query@5.101.1_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@tanstack/eslint-plugin-query/build/modern/index.js
1105
1180
  var recommendedRules = {
1106
1181
  "@tanstack/query/exhaustive-deps": "error",
1107
1182
  "@tanstack/query/no-rest-destructuring": "warn",
@@ -1,5 +1,5 @@
1
1
  let _typescript_eslint_utils = require("@typescript-eslint/utils");
2
- //#region ../../node_modules/.pnpm/@tanstack+eslint-plugin-query@5.100.14_eslint@10.4.0_jiti@2.7.0__typescript@6.0.3/node_modules/@tanstack/eslint-plugin-query/build/modern/chunk-DL47ZJZ5.js
2
+ //#region ../../node_modules/.pnpm/@tanstack+eslint-plugin-query@5.101.1_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@tanstack/eslint-plugin-query/build/modern/chunk-VALYN6GR.js
3
3
  function uniqueBy(arr, fn) {
4
4
  return arr.filter((x, i, a) => a.findIndex((y) => fn(x) === fn(y)) === i);
5
5
  }
@@ -616,10 +616,35 @@ var rule2 = _typescript_eslint_utils.ESLintUtils.RuleCreator(getDocsUrl)({
616
616
  } };
617
617
  })
618
618
  });
619
- var NoRestDestructuringUtils = { isObjectRestDestructuring(node) {
620
- if (node.type !== _typescript_eslint_utils.AST_NODE_TYPES.ObjectPattern) return false;
621
- return node.properties.some((p) => p.type === _typescript_eslint_utils.AST_NODE_TYPES.RestElement);
622
- } };
619
+ var QUERY_RESULT_TYPE_NAMES = /* @__PURE__ */ new Set([
620
+ "UseBaseQueryResult",
621
+ "UseQueryResult",
622
+ "UseSuspenseQueryResult",
623
+ "DefinedUseQueryResult",
624
+ "UseInfiniteQueryResult",
625
+ "UseSuspenseInfiniteQueryResult",
626
+ "DefinedUseInfiniteQueryResult",
627
+ "QueryObserverResult",
628
+ "InfiniteQueryObserverResult"
629
+ ]);
630
+ function isQueryResultType(type) {
631
+ if (type.aliasSymbol && QUERY_RESULT_TYPE_NAMES.has(type.aliasSymbol.name)) return true;
632
+ const symbol = type.getSymbol();
633
+ if (symbol && QUERY_RESULT_TYPE_NAMES.has(symbol.name)) return true;
634
+ return type.isUnion() && type.types.some(isQueryResultType);
635
+ }
636
+ var NoRestDestructuringUtils = {
637
+ isObjectRestDestructuring(node) {
638
+ if (node.type !== _typescript_eslint_utils.AST_NODE_TYPES.ObjectPattern) return false;
639
+ return node.properties.some((p) => p.type === _typescript_eslint_utils.AST_NODE_TYPES.RestElement);
640
+ },
641
+ isQueryResultCall(node, parserServices) {
642
+ if (!parserServices?.program || !parserServices.esTreeNodeToTSNodeMap) return false;
643
+ const checker = parserServices.program.getTypeChecker();
644
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node.callee);
645
+ return checker.getTypeAtLocation(tsNode).getCallSignatures().some((sig) => isQueryResultType(sig.getReturnType()));
646
+ }
647
+ };
623
648
  var name3 = "no-rest-destructuring";
624
649
  var queryHooks = [
625
650
  "useQuery",
@@ -645,9 +670,13 @@ var rule3 = _typescript_eslint_utils.ESLintUtils.RuleCreator(getDocsUrl)({
645
670
  const queryResultVariables = /* @__PURE__ */ new Set();
646
671
  return {
647
672
  CallExpression: (node) => {
648
- if (!ASTUtils.isIdentifierWithOneOfNames(node.callee, queryHooks) || node.parent.type !== _typescript_eslint_utils.AST_NODE_TYPES.VariableDeclarator || !helpers.isTanstackQueryImport(node.callee)) return;
673
+ if (node.parent.type !== _typescript_eslint_utils.AST_NODE_TYPES.VariableDeclarator) return;
649
674
  const returnValue = node.parent.id;
650
- if (node.callee.name !== "useQueries" && node.callee.name !== "useSuspenseQueries") {
675
+ if (!(ASTUtils.isIdentifierWithOneOfNames(node.callee, queryHooks) && helpers.isTanstackQueryImport(node.callee))) {
676
+ if (!(returnValue.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier || NoRestDestructuringUtils.isObjectRestDestructuring(returnValue)) || !NoRestDestructuringUtils.isQueryResultCall(node, context.sourceCode.parserServices)) return;
677
+ }
678
+ const calleeName = ASTUtils.isIdentifier(node.callee) ? node.callee.name : null;
679
+ if (calleeName !== "useQueries" && calleeName !== "useSuspenseQueries") {
651
680
  if (NoRestDestructuringUtils.isObjectRestDestructuring(returnValue)) return context.report({
652
681
  node: node.parent,
653
682
  messageId: "objectRestDestructure"
@@ -710,7 +739,10 @@ var rule4 = _typescript_eslint_utils.ESLintUtils.RuleCreator(getDocsUrl)({
710
739
  defaultOptions: [],
711
740
  create: detectTanstackQueryImports((context, _options, helpers) => {
712
741
  const trackedVariables = {};
742
+ const trackedCustomHooks = {};
713
743
  const hookAliasMap = {};
744
+ const pendingVariableDeclarators = [];
745
+ const pendingDependencyChecks = [];
714
746
  function getReactHook(node) {
715
747
  if (node.callee.type === "Identifier") {
716
748
  const calleeName = node.callee.name;
@@ -725,38 +757,81 @@ var rule4 = _typescript_eslint_utils.ESLintUtils.RuleCreator(getDocsUrl)({
725
757
  else if (element.type === _typescript_eslint_utils.AST_NODE_TYPES.RestElement && element.argument.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier) trackedVariables[element.argument.name] = queryHook;
726
758
  }
727
759
  }
760
+ function isCustomHookName(hookName) {
761
+ return /^use[A-Z0-9]/.test(hookName);
762
+ }
728
763
  function hasCombineProperty(callExpression) {
729
764
  if (callExpression.arguments.length === 0) return false;
730
765
  const firstArg = callExpression.arguments[0];
731
766
  if (!firstArg || firstArg.type !== _typescript_eslint_utils.AST_NODE_TYPES.ObjectExpression) return false;
732
767
  return firstArg.properties.some((prop) => prop.type === _typescript_eslint_utils.AST_NODE_TYPES.Property && prop.key.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && prop.key.name === "combine");
733
768
  }
769
+ function getDirectQueryHook(callExpression) {
770
+ if (callExpression.callee.type !== _typescript_eslint_utils.AST_NODE_TYPES.Identifier || !allHookNames.includes(callExpression.callee.name) || !helpers.isTanstackQueryImport(callExpression.callee)) return;
771
+ if ((callExpression.callee.name === "useQueries" || callExpression.callee.name === "useSuspenseQueries") && hasCombineProperty(callExpression)) return;
772
+ return callExpression.callee.name;
773
+ }
774
+ function getTrackedQueryHook(callExpression) {
775
+ const directQueryHook = getDirectQueryHook(callExpression);
776
+ if (directQueryHook !== void 0) return directQueryHook;
777
+ if (callExpression.callee.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier) return trackedCustomHooks[callExpression.callee.name];
778
+ }
779
+ function getReturnedQueryHook(body) {
780
+ if (body.type === _typescript_eslint_utils.AST_NODE_TYPES.CallExpression) return getDirectQueryHook(body);
781
+ if (body.type !== _typescript_eslint_utils.AST_NODE_TYPES.BlockStatement) return;
782
+ const returnStatements = body.body.filter((statement) => statement.type === _typescript_eslint_utils.AST_NODE_TYPES.ReturnStatement);
783
+ if (returnStatements.length !== 1) return;
784
+ const returnArgument = returnStatements[0]?.argument;
785
+ if (returnArgument?.type === _typescript_eslint_utils.AST_NODE_TYPES.CallExpression) return getDirectQueryHook(returnArgument);
786
+ }
787
+ function checkDependencyArray(reactHook, depsArray) {
788
+ depsArray.elements.forEach((dep) => {
789
+ if (dep !== null && dep.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && trackedVariables[dep.name] !== void 0) {
790
+ const queryHook = trackedVariables[dep.name];
791
+ context.report({
792
+ node: dep,
793
+ messageId: "noUnstableDeps",
794
+ data: {
795
+ queryHook,
796
+ reactHook
797
+ }
798
+ });
799
+ }
800
+ });
801
+ }
734
802
  return {
735
803
  ImportDeclaration(node) {
736
804
  if (node.specifiers.length > 0 && node.importKind === "value" && node.source.value === "React") node.specifiers.forEach((specifier) => {
737
805
  if (specifier.type === _typescript_eslint_utils.AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && reactHookNames.includes(specifier.imported.name)) hookAliasMap[specifier.local.name] = specifier.imported.name;
738
806
  });
739
807
  },
808
+ FunctionDeclaration(node) {
809
+ if (node.id === null || !isCustomHookName(node.id.name)) return;
810
+ const queryHook = getReturnedQueryHook(node.body);
811
+ if (queryHook !== void 0) trackedCustomHooks[node.id.name] = queryHook;
812
+ },
740
813
  VariableDeclarator(node) {
741
- if (node.init !== null && node.init.type === _typescript_eslint_utils.AST_NODE_TYPES.CallExpression && node.init.callee.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && allHookNames.includes(node.init.callee.name) && helpers.isTanstackQueryImport(node.init.callee)) {
742
- if ((node.init.callee.name === "useQueries" || node.init.callee.name === "useSuspenseQueries") && hasCombineProperty(node.init)) return;
743
- collectVariableNames(node.id, node.init.callee.name);
814
+ if (node.id.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && isCustomHookName(node.id.name) && node.init !== null && (node.init.type === _typescript_eslint_utils.AST_NODE_TYPES.ArrowFunctionExpression || node.init.type === _typescript_eslint_utils.AST_NODE_TYPES.FunctionExpression)) {
815
+ const queryHook = getReturnedQueryHook(node.init.body);
816
+ if (queryHook !== void 0) trackedCustomHooks[node.id.name] = queryHook;
744
817
  }
818
+ if (node.init !== null && node.init.type === _typescript_eslint_utils.AST_NODE_TYPES.CallExpression) pendingVariableDeclarators.push(node);
745
819
  },
746
820
  CallExpression: (node) => {
747
821
  const reactHook = getReactHook(node);
748
- if (reactHook !== void 0 && node.arguments.length > 1 && node.arguments[1]?.type === _typescript_eslint_utils.AST_NODE_TYPES.ArrayExpression) node.arguments[1].elements.forEach((dep) => {
749
- if (dep !== null && dep.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && trackedVariables[dep.name] !== void 0) {
750
- const queryHook = trackedVariables[dep.name];
751
- context.report({
752
- node: dep,
753
- messageId: "noUnstableDeps",
754
- data: {
755
- queryHook,
756
- reactHook
757
- }
758
- });
759
- }
822
+ if (reactHook !== void 0 && node.arguments.length > 1 && node.arguments[1]?.type === _typescript_eslint_utils.AST_NODE_TYPES.ArrayExpression) pendingDependencyChecks.push({
823
+ reactHook,
824
+ depsArray: node.arguments[1]
825
+ });
826
+ },
827
+ "Program:exit"() {
828
+ pendingVariableDeclarators.forEach((node) => {
829
+ if (node.init?.type !== _typescript_eslint_utils.AST_NODE_TYPES.CallExpression) return;
830
+ const queryHook = getTrackedQueryHook(node.init);
831
+ if (queryHook !== void 0) collectVariableNames(node.id, queryHook);
832
+ });
833
+ pendingDependencyChecks.forEach(({ reactHook, depsArray }) => {
834
+ checkDependencyArray(reactHook, depsArray);
760
835
  });
761
836
  }
762
837
  };
@@ -1101,7 +1176,7 @@ var rules = {
1101
1176
  [name8]: rule8
1102
1177
  };
1103
1178
  //#endregion
1104
- //#region ../../node_modules/.pnpm/@tanstack+eslint-plugin-query@5.100.14_eslint@10.4.0_jiti@2.7.0__typescript@6.0.3/node_modules/@tanstack/eslint-plugin-query/build/modern/index.js
1179
+ //#region ../../node_modules/.pnpm/@tanstack+eslint-plugin-query@5.101.1_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@tanstack/eslint-plugin-query/build/modern/index.js
1105
1180
  var recommendedRules = {
1106
1181
  "@tanstack/query/exhaustive-deps": "error",
1107
1182
  "@tanstack/query/no-rest-destructuring": "warn",
@@ -6,7 +6,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
9
+ var __esmMin = (fn, res, err) => () => {
10
+ if (err) throw err[0];
11
+ try {
12
+ return fn && (res = fn(fn = 0)), res;
13
+ } catch (e) {
14
+ throw err = [e], e;
15
+ }
16
+ };
10
17
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
11
18
  var __exportAll = (all, no_symbols) => {
12
19
  let target = {};
@@ -32,6 +39,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
32
39
  value: mod,
33
40
  enumerable: true
34
41
  }) : target, mod));
35
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
42
+ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
36
43
  //#endregion
37
44
  export { __require as a, __reExport as i, __esmMin as n, __toESM as o, __exportAll as r, __commonJSMin as t };
@@ -0,0 +1,71 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esmMin = (fn, res, err) => () => {
9
+ if (err) throw err[0];
10
+ try {
11
+ return fn && (res = fn(fn = 0)), res;
12
+ } catch (e) {
13
+ throw err = [e], e;
14
+ }
15
+ };
16
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
17
+ var __exportAll = (all, no_symbols) => {
18
+ let target = {};
19
+ for (var name in all) __defProp(target, name, {
20
+ get: all[name],
21
+ enumerable: true
22
+ });
23
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
24
+ return target;
25
+ };
26
+ var __copyProps = (to, from, except, desc) => {
27
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
28
+ key = keys[i];
29
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
30
+ get: ((k) => from[k]).bind(null, key),
31
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
32
+ });
33
+ }
34
+ return to;
35
+ };
36
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
37
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
38
+ value: mod,
39
+ enumerable: true
40
+ }) : target, mod));
41
+ //#endregion
42
+ Object.defineProperty(exports, "__commonJSMin", {
43
+ enumerable: true,
44
+ get: function() {
45
+ return __commonJSMin;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "__esmMin", {
49
+ enumerable: true,
50
+ get: function() {
51
+ return __esmMin;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "__exportAll", {
55
+ enumerable: true,
56
+ get: function() {
57
+ return __exportAll;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "__reExport", {
61
+ enumerable: true,
62
+ get: function() {
63
+ return __reExport;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "__toESM", {
67
+ enumerable: true,
68
+ get: function() {
69
+ return __toESM;
70
+ }
71
+ });
@@ -1,9 +1,9 @@
1
- const require_index = require("./index.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-DzWaZAza.cjs");
2
2
  let node_path = require("node:path");
3
- node_path = require_index.__toESM(node_path, 1);
3
+ node_path = require_rolldown_runtime.__toESM(node_path, 1);
4
4
  let node_url = require("node:url");
5
5
  let node_fs_promises = require("node:fs/promises");
6
- node_fs_promises = require_index.__toESM(node_fs_promises, 1);
6
+ node_fs_promises = require_rolldown_runtime.__toESM(node_fs_promises, 1);
7
7
  //#region ../../node_modules/.pnpm/@humanfs+core@0.19.2/node_modules/@humanfs/core/src/hfs.js
8
8
  /**
9
9
  * Asserts that the given path is a valid file path.
@@ -40,7 +40,7 @@ function toUint8Array(contents) {
40
40
  throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.");
41
41
  }
42
42
  var decoder, encoder, NoSuchMethodError, MethodNotSupportedError, ImplAlreadySetError, LogEntry, Hfs;
43
- var init_hfs = require_index.__esmMin((() => {
43
+ var init_hfs = require_rolldown_runtime.__esmMin((() => {
44
44
  decoder = new TextDecoder();
45
45
  encoder = new TextEncoder();
46
46
  NoSuchMethodError = class extends Error {
@@ -530,10 +530,10 @@ var init_hfs = require_index.__esmMin((() => {
530
530
  }));
531
531
  //#endregion
532
532
  //#region ../../node_modules/.pnpm/@humanfs+core@0.19.2/node_modules/@humanfs/core/src/errors.js
533
- var init_errors = require_index.__esmMin((() => {}));
533
+ var init_errors = require_rolldown_runtime.__esmMin((() => {}));
534
534
  //#endregion
535
535
  //#region ../../node_modules/.pnpm/@humanfs+core@0.19.2/node_modules/@humanfs/core/src/index.js
536
- var init_src$1 = require_index.__esmMin((() => {
536
+ var init_src$1 = require_rolldown_runtime.__esmMin((() => {
537
537
  init_hfs();
538
538
  init_errors();
539
539
  }));
@@ -586,7 +586,7 @@ function createPromise() {
586
586
  };
587
587
  }
588
588
  var MAX_TASK_TIMEOUT, MAX_TASK_DELAY, MAX_CONCURRENCY, RetryTask, Retrier;
589
- var init_retrier = require_index.__esmMin((() => {
589
+ var init_retrier = require_rolldown_runtime.__esmMin((() => {
590
590
  MAX_TASK_TIMEOUT = 6e4;
591
591
  MAX_TASK_DELAY = 100;
592
592
  MAX_CONCURRENCY = 1e3;
@@ -873,10 +873,10 @@ var init_retrier = require_index.__esmMin((() => {
873
873
  //#endregion
874
874
  //#region ../../node_modules/.pnpm/@humanfs+node@0.16.8/node_modules/@humanfs/node/src/node-hfs.js
875
875
  var RETRY_ERROR_CODES, NodeHfsDirectoryEntry, NodeHfsImpl, NodeHfs, hfs;
876
- var init_node_hfs = require_index.__esmMin((() => {
876
+ var init_node_hfs = require_rolldown_runtime.__esmMin((() => {
877
877
  init_src$1();
878
878
  init_retrier();
879
- RETRY_ERROR_CODES = new Set(["ENFILE", "EMFILE"]);
879
+ RETRY_ERROR_CODES = /* @__PURE__ */ new Set(["ENFILE", "EMFILE"]);
880
880
  NodeHfsDirectoryEntry = class {
881
881
  /**
882
882
  * The name of the directory entry.
@@ -1168,7 +1168,7 @@ var init_node_hfs = require_index.__esmMin((() => {
1168
1168
  hfs = new NodeHfs();
1169
1169
  }));
1170
1170
  //#endregion
1171
- require_index.__esmMin((() => {
1171
+ require_rolldown_runtime.__esmMin((() => {
1172
1172
  init_node_hfs();
1173
1173
  init_src$1();
1174
1174
  }))();
@@ -1,4 +1,4 @@
1
- import { n as __esmMin } from "./chunk-yCSr5jVb.js";
1
+ import { n as __esmMin } from "./rolldown-runtime-C8SNSOcs.js";
2
2
  import path from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import nativeFsp from "node:fs/promises";
@@ -874,7 +874,7 @@ var RETRY_ERROR_CODES, NodeHfsDirectoryEntry, NodeHfsImpl, NodeHfs, hfs;
874
874
  var init_node_hfs = __esmMin((() => {
875
875
  init_src$1();
876
876
  init_retrier();
877
- RETRY_ERROR_CODES = new Set(["ENFILE", "EMFILE"]);
877
+ RETRY_ERROR_CODES = /* @__PURE__ */ new Set(["ENFILE", "EMFILE"]);
878
878
  NodeHfsDirectoryEntry = class {
879
879
  /**
880
880
  * The name of the directory entry.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/eslint-config",
3
3
  "type": "module",
4
- "version": "5.0.4",
4
+ "version": "6.0.0",
5
5
  "description": "ESLint preset from Icebreaker's dev-configs",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -39,7 +39,7 @@
39
39
  "index.d.ts"
40
40
  ],
41
41
  "engines": {
42
- "node": "^20.19.0 || >=22.12.0"
42
+ "node": ">=22.12.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "eslint-plugin-pnpm": "^1.6.0"
@@ -50,20 +50,20 @@
50
50
  }
51
51
  },
52
52
  "dependencies": {
53
- "@antfu/eslint-config": "9.0.0",
54
- "@eslint-react/eslint-plugin": "^5.8.6",
55
- "@typescript-eslint/rule-tester": "^8.60.0",
56
- "@typescript-eslint/typescript-estree": "^8.60.0",
57
- "@typescript-eslint/utils": "^8.60.0",
58
- "@vue/compiler-sfc": "^3.5.35",
53
+ "@antfu/eslint-config": "9.1.0",
54
+ "@eslint-react/eslint-plugin": "^5.9.4",
55
+ "@typescript-eslint/rule-tester": "^8.62.0",
56
+ "@typescript-eslint/typescript-estree": "^8.62.0",
57
+ "@typescript-eslint/utils": "^8.62.0",
58
+ "@vue/compiler-sfc": "^3.5.39",
59
59
  "eslint-flat-config-utils": "3.2.0",
60
- "eslint-plugin-better-tailwindcss": "^4.5.0",
60
+ "eslint-plugin-better-tailwindcss": "^4.6.0",
61
61
  "eslint-plugin-format": "2.0.1",
62
62
  "eslint-plugin-react-hooks": "^7.1.1",
63
- "eslint-plugin-react-refresh": "^0.5.2",
64
- "eslint-plugin-tailwindcss": "3.18.3",
65
- "@icebreakers/stylelint-config": "4.0.2",
66
- "eslint-plugin-better-stylelint": "1.0.5"
63
+ "eslint-plugin-react-refresh": "^0.5.3",
64
+ "eslint-plugin-tailwindcss": "4.0.4",
65
+ "@icebreakers/stylelint-config": "5.0.0",
66
+ "eslint-plugin-better-stylelint": "2.0.0"
67
67
  },
68
68
  "publishConfig": {
69
69
  "access": "public",