@tb-dev/eslint-config 6.1.0 → 6.1.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.cjs CHANGED
@@ -921,6 +921,19 @@ async function typescript(options) {
921
921
  };
922
922
  }
923
923
 
924
+ async function reactHooks(options) {
925
+ if (!isEnabled(options.features, "react")) return {};
926
+ const plugin = await interopDefault(import('eslint-plugin-react-hooks'));
927
+ return {
928
+ plugins: { "react-hooks": plugin },
929
+ rules: {
930
+ "react-hooks/rules-of-hooks": "error",
931
+ "react-hooks/exhaustive-deps": "error",
932
+ ...options.overrides?.reactHooks
933
+ }
934
+ };
935
+ }
936
+
924
937
  async function perfectionist(options) {
925
938
  if (!isEnabled(options.features, "perfectionist")) return {};
926
939
  const plugin = await interopDefault(import('eslint-plugin-perfectionist'));
@@ -1021,6 +1034,18 @@ async function perfectionist(options) {
1021
1034
  };
1022
1035
  }
1023
1036
 
1037
+ async function reactCompiler(options) {
1038
+ if (!isEnabled(options.features, "react")) return {};
1039
+ const plugin = await interopDefault(import('eslint-plugin-react-compiler'));
1040
+ return {
1041
+ plugins: { "react-compiler": plugin },
1042
+ rules: {
1043
+ "react-compiler/react-compiler": "error",
1044
+ ...options.overrides?.reactCompiler
1045
+ }
1046
+ };
1047
+ }
1048
+
1024
1049
  async function defineConfig(options) {
1025
1050
  const ignores = {
1026
1051
  ignores: [...getIgnores(), ...options.ignores ?? []]
@@ -1031,6 +1056,8 @@ async function defineConfig(options) {
1031
1056
  ...await vue(options),
1032
1057
  ...await svelte(options),
1033
1058
  react(options),
1059
+ reactHooks(options),
1060
+ reactCompiler(options),
1034
1061
  perfectionist(options),
1035
1062
  unicorn(options),
1036
1063
  tailwind(options),
package/dist/index.js CHANGED
@@ -917,6 +917,19 @@ async function typescript(options) {
917
917
  };
918
918
  }
919
919
 
920
+ async function reactHooks(options) {
921
+ if (!isEnabled(options.features, "react")) return {};
922
+ const plugin = await interopDefault(import('eslint-plugin-react-hooks'));
923
+ return {
924
+ plugins: { "react-hooks": plugin },
925
+ rules: {
926
+ "react-hooks/rules-of-hooks": "error",
927
+ "react-hooks/exhaustive-deps": "error",
928
+ ...options.overrides?.reactHooks
929
+ }
930
+ };
931
+ }
932
+
920
933
  async function perfectionist(options) {
921
934
  if (!isEnabled(options.features, "perfectionist")) return {};
922
935
  const plugin = await interopDefault(import('eslint-plugin-perfectionist'));
@@ -1017,6 +1030,18 @@ async function perfectionist(options) {
1017
1030
  };
1018
1031
  }
1019
1032
 
1033
+ async function reactCompiler(options) {
1034
+ if (!isEnabled(options.features, "react")) return {};
1035
+ const plugin = await interopDefault(import('eslint-plugin-react-compiler'));
1036
+ return {
1037
+ plugins: { "react-compiler": plugin },
1038
+ rules: {
1039
+ "react-compiler/react-compiler": "error",
1040
+ ...options.overrides?.reactCompiler
1041
+ }
1042
+ };
1043
+ }
1044
+
1020
1045
  async function defineConfig(options) {
1021
1046
  const ignores = {
1022
1047
  ignores: [...getIgnores(), ...options.ignores ?? []]
@@ -1027,6 +1052,8 @@ async function defineConfig(options) {
1027
1052
  ...await vue(options),
1028
1053
  ...await svelte(options),
1029
1054
  react(options),
1055
+ reactHooks(options),
1056
+ reactCompiler(options),
1030
1057
  perfectionist(options),
1031
1058
  unicorn(options),
1032
1059
  tailwind(options),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/eslint-config",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
4
4
  "description": "ESLint config",
5
5
  "license": "MIT",
6
6
  "type": "module",