@meteorlxy/eslint-config 6.6.2 → 6.7.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.
package/dist/index.cjs CHANGED
@@ -99,6 +99,11 @@ const ignores = async ({ files = [], gitignore = {} } = {}) => {
99
99
 
100
100
  //#endregion
101
101
  //#region src/rules/builtin.ts
102
+ /**
103
+ * ESLint built-in rules
104
+ *
105
+ * @see https://eslint.org/docs/latest/rules/
106
+ */
102
107
  const builtinRules = {
103
108
  "accessor-pairs": "off",
104
109
  "array-callback-return": ["error", { allowImplicit: true }],
@@ -812,9 +817,41 @@ const markdownShimRules = {
812
817
 
813
818
  //#endregion
814
819
  //#region src/rules/react-hooks.ts
820
+ /**
821
+ * React hooks rules
822
+ *
823
+ * @see https://react.dev/reference/eslint-plugin-react-hooks
824
+ */
815
825
  const reactHooksRules = {
826
+ "react-hooks/component-hook-factories": "error",
827
+ "react-hooks/config": "off",
828
+ "react-hooks/error-boundaries": "error",
816
829
  "react-hooks/exhaustive-deps": "error",
817
- "react-hooks/rules-of-hooks": "error"
830
+ "react-hooks/gating": "off",
831
+ "react-hooks/globals": "error",
832
+ "react-hooks/immutability": "error",
833
+ "react-hooks/incompatible-library": "off",
834
+ "react-hooks/preserve-manual-memoization": "off",
835
+ "react-hooks/purity": "error",
836
+ "react-hooks/refs": "error",
837
+ "react-hooks/rules-of-hooks": "error",
838
+ "react-hooks/set-state-in-effect": "error",
839
+ "react-hooks/set-state-in-render": "error",
840
+ "react-hooks/static-components": "error",
841
+ "react-hooks/unsupported-syntax": "error",
842
+ "react-hooks/use-memo": "error",
843
+ "react-hooks/automatic-effect-dependencies": "off",
844
+ "react-hooks/capitalized-calls": "off",
845
+ "react-hooks/fbt": "off",
846
+ "react-hooks/fire": "off",
847
+ "react-hooks/hooks": "off",
848
+ "react-hooks/invariant": "off",
849
+ "react-hooks/memoized-effect-dependencies": "off",
850
+ "react-hooks/no-deriving-state-in-effects": "off",
851
+ "react-hooks/rule-suppression": "off",
852
+ "react-hooks/syntax": "off",
853
+ "react-hooks/todo": "off",
854
+ "react-hooks/void-use-memo": "off"
818
855
  };
819
856
 
820
857
  //#endregion
@@ -823,6 +860,11 @@ const reactRefreshRules = { "react-refresh/only-export-components": ["warn", { a
823
860
 
824
861
  //#endregion
825
862
  //#region src/rules/react.ts
863
+ /**
864
+ * React rules
865
+ *
866
+ * @see https://github.com/jsx-eslint/eslint-plugin-react?tab=readme-ov-file#list-of-supported-rules
867
+ */
826
868
  const reactRules = {
827
869
  "react/boolean-prop-naming": ["off", {
828
870
  propTypeNames: ["bool", "mutuallyExclusiveTrueProps"],
@@ -1094,6 +1136,11 @@ const typescriptShimRules = {
1094
1136
 
1095
1137
  //#endregion
1096
1138
  //#region src/rules/typescript.ts
1139
+ /**
1140
+ * TypeScript rules
1141
+ *
1142
+ * @see https://typescript-eslint.io/rules/
1143
+ */
1097
1144
  const typescriptRules = {
1098
1145
  ...__typescript_eslint_eslint_plugin.default.configs["strict-type-checked"].rules,
1099
1146
  ...__typescript_eslint_eslint_plugin.default.configs["stylistic-type-checked"].rules,
@@ -1327,6 +1374,11 @@ const typescriptRules = {
1327
1374
 
1328
1375
  //#endregion
1329
1376
  //#region src/rules/vue.ts
1377
+ /**
1378
+ * Vue rules
1379
+ *
1380
+ * @see https://eslint.vuejs.org/rules/
1381
+ */
1330
1382
  const vueRules = {
1331
1383
  "vue/block-lang": ["off", {
1332
1384
  script: { lang: "ts" },
package/dist/index.d.cts CHANGED
@@ -120,6 +120,11 @@ declare const IS_CI: boolean;
120
120
  declare const IS_EDITOR: boolean;
121
121
  //#endregion
122
122
  //#region src/rules/builtin.d.ts
123
+ /**
124
+ * ESLint built-in rules
125
+ *
126
+ * @see https://eslint.org/docs/latest/rules/
127
+ */
123
128
  declare const builtinRules: {
124
129
  'accessor-pairs': "off";
125
130
  'array-callback-return': ["error", {
@@ -759,9 +764,41 @@ declare const markdownShimRules: {
759
764
  };
760
765
  //#endregion
761
766
  //#region src/rules/react-hooks.d.ts
767
+ /**
768
+ * React hooks rules
769
+ *
770
+ * @see https://react.dev/reference/eslint-plugin-react-hooks
771
+ */
762
772
  declare const reactHooksRules: {
773
+ 'react-hooks/component-hook-factories': "error";
774
+ 'react-hooks/config': "off";
775
+ 'react-hooks/error-boundaries': "error";
763
776
  'react-hooks/exhaustive-deps': "error";
777
+ 'react-hooks/gating': "off";
778
+ 'react-hooks/globals': "error";
779
+ 'react-hooks/immutability': "error";
780
+ 'react-hooks/incompatible-library': "off";
781
+ 'react-hooks/preserve-manual-memoization': "off";
782
+ 'react-hooks/purity': "error";
783
+ 'react-hooks/refs': "error";
764
784
  'react-hooks/rules-of-hooks': "error";
785
+ 'react-hooks/set-state-in-effect': "error";
786
+ 'react-hooks/set-state-in-render': "error";
787
+ 'react-hooks/static-components': "error";
788
+ 'react-hooks/unsupported-syntax': "error";
789
+ 'react-hooks/use-memo': "error";
790
+ 'react-hooks/automatic-effect-dependencies': "off";
791
+ 'react-hooks/capitalized-calls': "off";
792
+ 'react-hooks/fbt': "off";
793
+ 'react-hooks/fire': "off";
794
+ 'react-hooks/hooks': "off";
795
+ 'react-hooks/invariant': "off";
796
+ 'react-hooks/memoized-effect-dependencies': "off";
797
+ 'react-hooks/no-deriving-state-in-effects': "off";
798
+ 'react-hooks/rule-suppression': "off";
799
+ 'react-hooks/syntax': "off";
800
+ 'react-hooks/todo': "off";
801
+ 'react-hooks/void-use-memo': "off";
765
802
  };
766
803
  //#endregion
767
804
  //#region src/rules/react-refresh.d.ts
@@ -772,6 +809,11 @@ declare const reactRefreshRules: {
772
809
  };
773
810
  //#endregion
774
811
  //#region src/rules/react.d.ts
812
+ /**
813
+ * React rules
814
+ *
815
+ * @see https://github.com/jsx-eslint/eslint-plugin-react?tab=readme-ov-file#list-of-supported-rules
816
+ */
775
817
  declare const reactRules: {
776
818
  'react/boolean-prop-naming': ["off", {
777
819
  propTypeNames: string[];
@@ -1076,6 +1118,11 @@ declare const typescriptShimRules: {
1076
1118
  };
1077
1119
  //#endregion
1078
1120
  //#region src/rules/typescript.d.ts
1121
+ /**
1122
+ * TypeScript rules
1123
+ *
1124
+ * @see https://typescript-eslint.io/rules/
1125
+ */
1079
1126
  declare const typescriptRules: {
1080
1127
  '@typescript-eslint/class-methods-use-this': ["error", {
1081
1128
  exceptMethods: never[];
@@ -1292,6 +1339,11 @@ declare const typescriptRules: {
1292
1339
  };
1293
1340
  //#endregion
1294
1341
  //#region src/rules/vue.d.ts
1342
+ /**
1343
+ * Vue rules
1344
+ *
1345
+ * @see https://eslint.vuejs.org/rules/
1346
+ */
1295
1347
  declare const vueRules: {
1296
1348
  'vue/block-lang': ["off", {
1297
1349
  script: {
package/dist/index.d.mts CHANGED
@@ -118,6 +118,11 @@ declare const IS_CI: boolean;
118
118
  declare const IS_EDITOR: boolean;
119
119
  //#endregion
120
120
  //#region src/rules/builtin.d.ts
121
+ /**
122
+ * ESLint built-in rules
123
+ *
124
+ * @see https://eslint.org/docs/latest/rules/
125
+ */
121
126
  declare const builtinRules: {
122
127
  'accessor-pairs': "off";
123
128
  'array-callback-return': ["error", {
@@ -757,9 +762,41 @@ declare const markdownShimRules: {
757
762
  };
758
763
  //#endregion
759
764
  //#region src/rules/react-hooks.d.ts
765
+ /**
766
+ * React hooks rules
767
+ *
768
+ * @see https://react.dev/reference/eslint-plugin-react-hooks
769
+ */
760
770
  declare const reactHooksRules: {
771
+ 'react-hooks/component-hook-factories': "error";
772
+ 'react-hooks/config': "off";
773
+ 'react-hooks/error-boundaries': "error";
761
774
  'react-hooks/exhaustive-deps': "error";
775
+ 'react-hooks/gating': "off";
776
+ 'react-hooks/globals': "error";
777
+ 'react-hooks/immutability': "error";
778
+ 'react-hooks/incompatible-library': "off";
779
+ 'react-hooks/preserve-manual-memoization': "off";
780
+ 'react-hooks/purity': "error";
781
+ 'react-hooks/refs': "error";
762
782
  'react-hooks/rules-of-hooks': "error";
783
+ 'react-hooks/set-state-in-effect': "error";
784
+ 'react-hooks/set-state-in-render': "error";
785
+ 'react-hooks/static-components': "error";
786
+ 'react-hooks/unsupported-syntax': "error";
787
+ 'react-hooks/use-memo': "error";
788
+ 'react-hooks/automatic-effect-dependencies': "off";
789
+ 'react-hooks/capitalized-calls': "off";
790
+ 'react-hooks/fbt': "off";
791
+ 'react-hooks/fire': "off";
792
+ 'react-hooks/hooks': "off";
793
+ 'react-hooks/invariant': "off";
794
+ 'react-hooks/memoized-effect-dependencies': "off";
795
+ 'react-hooks/no-deriving-state-in-effects': "off";
796
+ 'react-hooks/rule-suppression': "off";
797
+ 'react-hooks/syntax': "off";
798
+ 'react-hooks/todo': "off";
799
+ 'react-hooks/void-use-memo': "off";
763
800
  };
764
801
  //#endregion
765
802
  //#region src/rules/react-refresh.d.ts
@@ -770,6 +807,11 @@ declare const reactRefreshRules: {
770
807
  };
771
808
  //#endregion
772
809
  //#region src/rules/react.d.ts
810
+ /**
811
+ * React rules
812
+ *
813
+ * @see https://github.com/jsx-eslint/eslint-plugin-react?tab=readme-ov-file#list-of-supported-rules
814
+ */
773
815
  declare const reactRules: {
774
816
  'react/boolean-prop-naming': ["off", {
775
817
  propTypeNames: string[];
@@ -1074,6 +1116,11 @@ declare const typescriptShimRules: {
1074
1116
  };
1075
1117
  //#endregion
1076
1118
  //#region src/rules/typescript.d.ts
1119
+ /**
1120
+ * TypeScript rules
1121
+ *
1122
+ * @see https://typescript-eslint.io/rules/
1123
+ */
1077
1124
  declare const typescriptRules: {
1078
1125
  '@typescript-eslint/class-methods-use-this': ["error", {
1079
1126
  exceptMethods: never[];
@@ -1290,6 +1337,11 @@ declare const typescriptRules: {
1290
1337
  };
1291
1338
  //#endregion
1292
1339
  //#region src/rules/vue.d.ts
1340
+ /**
1341
+ * Vue rules
1342
+ *
1343
+ * @see https://eslint.vuejs.org/rules/
1344
+ */
1293
1345
  declare const vueRules: {
1294
1346
  'vue/block-lang': ["off", {
1295
1347
  script: {
package/dist/index.mjs CHANGED
@@ -62,6 +62,11 @@ const ignores = async ({ files = [], gitignore = {} } = {}) => {
62
62
 
63
63
  //#endregion
64
64
  //#region src/rules/builtin.ts
65
+ /**
66
+ * ESLint built-in rules
67
+ *
68
+ * @see https://eslint.org/docs/latest/rules/
69
+ */
65
70
  const builtinRules = {
66
71
  "accessor-pairs": "off",
67
72
  "array-callback-return": ["error", { allowImplicit: true }],
@@ -775,9 +780,41 @@ const markdownShimRules = {
775
780
 
776
781
  //#endregion
777
782
  //#region src/rules/react-hooks.ts
783
+ /**
784
+ * React hooks rules
785
+ *
786
+ * @see https://react.dev/reference/eslint-plugin-react-hooks
787
+ */
778
788
  const reactHooksRules = {
789
+ "react-hooks/component-hook-factories": "error",
790
+ "react-hooks/config": "off",
791
+ "react-hooks/error-boundaries": "error",
779
792
  "react-hooks/exhaustive-deps": "error",
780
- "react-hooks/rules-of-hooks": "error"
793
+ "react-hooks/gating": "off",
794
+ "react-hooks/globals": "error",
795
+ "react-hooks/immutability": "error",
796
+ "react-hooks/incompatible-library": "off",
797
+ "react-hooks/preserve-manual-memoization": "off",
798
+ "react-hooks/purity": "error",
799
+ "react-hooks/refs": "error",
800
+ "react-hooks/rules-of-hooks": "error",
801
+ "react-hooks/set-state-in-effect": "error",
802
+ "react-hooks/set-state-in-render": "error",
803
+ "react-hooks/static-components": "error",
804
+ "react-hooks/unsupported-syntax": "error",
805
+ "react-hooks/use-memo": "error",
806
+ "react-hooks/automatic-effect-dependencies": "off",
807
+ "react-hooks/capitalized-calls": "off",
808
+ "react-hooks/fbt": "off",
809
+ "react-hooks/fire": "off",
810
+ "react-hooks/hooks": "off",
811
+ "react-hooks/invariant": "off",
812
+ "react-hooks/memoized-effect-dependencies": "off",
813
+ "react-hooks/no-deriving-state-in-effects": "off",
814
+ "react-hooks/rule-suppression": "off",
815
+ "react-hooks/syntax": "off",
816
+ "react-hooks/todo": "off",
817
+ "react-hooks/void-use-memo": "off"
781
818
  };
782
819
 
783
820
  //#endregion
@@ -786,6 +823,11 @@ const reactRefreshRules = { "react-refresh/only-export-components": ["warn", { a
786
823
 
787
824
  //#endregion
788
825
  //#region src/rules/react.ts
826
+ /**
827
+ * React rules
828
+ *
829
+ * @see https://github.com/jsx-eslint/eslint-plugin-react?tab=readme-ov-file#list-of-supported-rules
830
+ */
789
831
  const reactRules = {
790
832
  "react/boolean-prop-naming": ["off", {
791
833
  propTypeNames: ["bool", "mutuallyExclusiveTrueProps"],
@@ -1057,6 +1099,11 @@ const typescriptShimRules = {
1057
1099
 
1058
1100
  //#endregion
1059
1101
  //#region src/rules/typescript.ts
1102
+ /**
1103
+ * TypeScript rules
1104
+ *
1105
+ * @see https://typescript-eslint.io/rules/
1106
+ */
1060
1107
  const typescriptRules = {
1061
1108
  ...tsPlugin.configs["strict-type-checked"].rules,
1062
1109
  ...tsPlugin.configs["stylistic-type-checked"].rules,
@@ -1290,6 +1337,11 @@ const typescriptRules = {
1290
1337
 
1291
1338
  //#endregion
1292
1339
  //#region src/rules/vue.ts
1340
+ /**
1341
+ * Vue rules
1342
+ *
1343
+ * @see https://eslint.vuejs.org/rules/
1344
+ */
1293
1345
  const vueRules = {
1294
1346
  "vue/block-lang": ["off", {
1295
1347
  script: { lang: "ts" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meteorlxy/eslint-config",
3
- "version": "6.6.2",
3
+ "version": "6.7.0",
4
4
  "description": "meteorlxy eslint config",
5
5
  "keywords": [
6
6
  "config",
@@ -34,15 +34,15 @@
34
34
  "clean": "rimraf ./dist"
35
35
  },
36
36
  "dependencies": {
37
- "@typescript-eslint/eslint-plugin": "^8.44.1",
38
- "@typescript-eslint/parser": "^8.44.1",
39
- "@typescript-eslint/utils": "^8.44.1",
37
+ "@typescript-eslint/eslint-plugin": "^8.46.1",
38
+ "@typescript-eslint/parser": "^8.46.1",
39
+ "@typescript-eslint/utils": "^8.46.1",
40
40
  "confusing-browser-globals": "^1.0.11",
41
41
  "eslint-config-flat-gitignore": "^2.1.0",
42
42
  "eslint-config-prettier": "^10.1.8",
43
43
  "eslint-plugin-eslint-comments": "^3.2.0",
44
44
  "eslint-plugin-import-x": "^4.16.1",
45
- "eslint-plugin-jsonc": "^2.20.1",
45
+ "eslint-plugin-jsonc": "^2.21.0",
46
46
  "eslint-plugin-markdown": "^5.1.0",
47
47
  "globals": "^16.4.0",
48
48
  "jsonc-eslint-parser": "^2.4.1"
@@ -50,12 +50,12 @@
50
50
  "devDependencies": {
51
51
  "@types/confusing-browser-globals": "^1.0.3",
52
52
  "@types/eslint": "^9.6.1",
53
- "eslint": "^9.36.0",
53
+ "eslint": "^9.37.0",
54
54
  "eslint-plugin-react": "^7.37.5",
55
- "eslint-plugin-react-hooks": "^5.2.0",
56
- "eslint-plugin-react-refresh": "^0.4.21",
55
+ "eslint-plugin-react-hooks": "^7.0.0",
56
+ "eslint-plugin-react-refresh": "^0.4.23",
57
57
  "eslint-plugin-vue": "^10.5.0",
58
- "tsdown": "^0.15.4",
58
+ "tsdown": "^0.15.7",
59
59
  "vue-eslint-parser": "^10.2.0"
60
60
  },
61
61
  "peerDependencies": {
@@ -88,5 +88,5 @@
88
88
  "publishConfig": {
89
89
  "access": "public"
90
90
  },
91
- "gitHead": "f582910331b1ca1bbdb4d5c8b969c2f35434f438"
91
+ "gitHead": "7f5e8ff2aa4d389befcb19e6b0583c0ecd44d081"
92
92
  }