@xylabs/eslint-config-react-flat 3.15.9 → 3.15.11

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.
@@ -37,11 +37,14 @@ module.exports = __toCommonJS(src_exports);
37
37
  var import_eslint_config_flat = require("@xylabs/eslint-config-flat");
38
38
 
39
39
  // src/react/index.ts
40
+ var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
40
41
  var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
42
+ var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
41
43
  var import_globals = __toESM(require("globals"), 1);
42
44
  var reactConfig = {
43
45
  plugins: {
44
- react: import_eslint_plugin_react.default
46
+ "react": import_eslint_plugin_react.default,
47
+ "react-hooks": import_eslint_plugin_react_hooks.default
45
48
  },
46
49
  files: [
47
50
  "**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"
@@ -51,17 +54,25 @@ var reactConfig = {
51
54
  globals: {
52
55
  ...import_globals.default.serviceworker,
53
56
  ...import_globals.default.browser
57
+ },
58
+ parser: import_parser.default,
59
+ parserOptions: {
60
+ ecmaFeatures: {
61
+ modules: true
62
+ },
63
+ ecmaVersion: "latest",
64
+ project: "./tsconfig-eslint.json"
54
65
  }
55
66
  },
56
67
  rules: {
57
68
  ...import_eslint_plugin_react.default.configs.flat.recommended.rules,
58
- /* 'react-hooks/rules-of-hooks': 'error',
59
- 'react-hooks/exhaustive-deps': [
60
- 'warn',
69
+ "react-hooks/rules-of-hooks": "error",
70
+ "react-hooks/exhaustive-deps": [
71
+ "warn",
61
72
  {
62
- additionalHooks: '(useAsyncEffect|usePromise)',
63
- },
64
- ], */
73
+ additionalHooks: "(useAsyncEffect|usePromise)"
74
+ }
75
+ ],
65
76
  "react/prop-types": [
66
77
  "off"
67
78
  ],
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport { Linter } from 'eslint'\n\nimport { reactConfig } from './react/index.ts'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.ts'\n","import { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\n// import reactHooksPlugin from 'eslint-plugin-react-hooks'\nimport globals from 'globals'\n\nexport const reactConfig: Linter.FlatConfig = {\n plugins: {\n react: reactPlugin,\n // 'react-hooks': reactHooksPlugin,\n },\n files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],\n languageOptions: {\n ...reactPlugin.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n },\n rules: {\n ...reactPlugin.configs.flat.recommended.rules,\n /* 'react-hooks/rules-of-hooks': 'error',\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ], */\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['warn'],\n },\n settings: {\n ...reactPlugin.configs.flat.recommended.settings,\n react: {\n version: 'detect',\n },\n },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;gCAAmC;;;ACCnC,iCAAwB;AAExB,qBAAoB;AAEb,IAAMA,cAAiC;EAC5CC,SAAS;IACPC,OAAOC,2BAAAA;EAET;EACAC,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGF,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYH;IACxCI,SAAS;MACP,GAAGA,eAAAA,QAAQC;MACX,GAAGD,eAAAA,QAAQE;IACb;EACF;EACAC,OAAO;IACL,GAAGT,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYI;;;;;;;;IAQxC,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGV,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYK;IACxCX,OAAO;MACLY,SAAS;IACX;EACF;AACF;;;AD/BO,IAAMC,SAA8B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","plugins","react","reactPlugin","files","languageOptions","configs","flat","recommended","globals","serviceworker","browser","rules","settings","version","config","xyConfig","reactConfig"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport { Linter } from 'eslint'\n\nimport { reactConfig } from './react/index.ts'\n\nexport const config: Linter.Config[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.ts'\n","import tsParser from '@typescript-eslint/parser'\nimport { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport reactHooksPlugin from 'eslint-plugin-react-hooks'\nimport globals from 'globals'\n\nexport const reactConfig: Linter.Config = {\n plugins: {\n 'react': reactPlugin,\n 'react-hooks': reactHooksPlugin,\n },\n files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],\n languageOptions: {\n ...reactPlugin.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\n },\n },\n rules: {\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-hooks/rules-of-hooks': 'error',\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ],\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['warn'],\n },\n settings: {\n ...reactPlugin.configs.flat.recommended.settings,\n react: {\n version: 'detect',\n },\n },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;gCAAmC;;;ACAnC,oBAAqB;AAErB,iCAAwB;AACxB,uCAA6B;AAC7B,qBAAoB;AAEb,IAAMA,cAA6B;EACxCC,SAAS;IACP,SAASC,2BAAAA;IACT,eAAeC,iCAAAA;EACjB;EACAC,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGH,2BAAAA,QAAYI,QAAQC,KAAKC,YAAYH;IACxCI,SAAS;MACP,GAAGA,eAAAA,QAAQC;MACX,GAAGD,eAAAA,QAAQE;IACb;IACAC,QAAQC,cAAAA;IACRC,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGjB,2BAAAA,QAAYI,QAAQC,KAAKC,YAAYW;IACxC,8BAA8B;IAC9B,+BAA+B;MAC7B;MACA;QACEC,iBAAiB;MACnB;;IAEF,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGnB,2BAAAA,QAAYI,QAAQC,KAAKC,YAAYa;IACxCC,OAAO;MACLC,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","plugins","reactPlugin","reactHooksPlugin","files","languageOptions","configs","flat","recommended","globals","serviceworker","browser","parser","tsParser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","rules","additionalHooks","settings","react","version","config","xyConfig","reactConfig"]}
@@ -1,4 +1,4 @@
1
1
  import { Linter } from 'eslint';
2
- export declare const config: Linter.FlatConfig[];
2
+ export declare const config: Linter.Config[];
3
3
  export { reactConfig } from './react/index.ts';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,UAAU,EAA+B,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAA+B,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { Linter } from 'eslint';
2
- export declare const config: Linter.FlatConfig[];
2
+ export declare const config: Linter.Config[];
3
3
  export { reactConfig } from './react/index.ts';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,UAAU,EAA+B,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAA+B,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { Linter } from 'eslint';
2
- export declare const config: Linter.FlatConfig[];
2
+ export declare const config: Linter.Config[];
3
3
  export { reactConfig } from './react/index.ts';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,UAAU,EAA+B,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAA+B,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
@@ -2,11 +2,14 @@
2
2
  import { config as xyConfig } from "@xylabs/eslint-config-flat";
3
3
 
4
4
  // src/react/index.ts
5
+ import tsParser from "@typescript-eslint/parser";
5
6
  import reactPlugin from "eslint-plugin-react";
7
+ import reactHooksPlugin from "eslint-plugin-react-hooks";
6
8
  import globals from "globals";
7
9
  var reactConfig = {
8
10
  plugins: {
9
- react: reactPlugin
11
+ "react": reactPlugin,
12
+ "react-hooks": reactHooksPlugin
10
13
  },
11
14
  files: [
12
15
  "**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"
@@ -16,17 +19,25 @@ var reactConfig = {
16
19
  globals: {
17
20
  ...globals.serviceworker,
18
21
  ...globals.browser
22
+ },
23
+ parser: tsParser,
24
+ parserOptions: {
25
+ ecmaFeatures: {
26
+ modules: true
27
+ },
28
+ ecmaVersion: "latest",
29
+ project: "./tsconfig-eslint.json"
19
30
  }
20
31
  },
21
32
  rules: {
22
33
  ...reactPlugin.configs.flat.recommended.rules,
23
- /* 'react-hooks/rules-of-hooks': 'error',
24
- 'react-hooks/exhaustive-deps': [
25
- 'warn',
34
+ "react-hooks/rules-of-hooks": "error",
35
+ "react-hooks/exhaustive-deps": [
36
+ "warn",
26
37
  {
27
- additionalHooks: '(useAsyncEffect|usePromise)',
28
- },
29
- ], */
38
+ additionalHooks: "(useAsyncEffect|usePromise)"
39
+ }
40
+ ],
30
41
  "react/prop-types": [
31
42
  "off"
32
43
  ],
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport { Linter } from 'eslint'\n\nimport { reactConfig } from './react/index.ts'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.ts'\n","import { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\n// import reactHooksPlugin from 'eslint-plugin-react-hooks'\nimport globals from 'globals'\n\nexport const reactConfig: Linter.FlatConfig = {\n plugins: {\n react: reactPlugin,\n // 'react-hooks': reactHooksPlugin,\n },\n files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],\n languageOptions: {\n ...reactPlugin.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n },\n rules: {\n ...reactPlugin.configs.flat.recommended.rules,\n /* 'react-hooks/rules-of-hooks': 'error',\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ], */\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['warn'],\n },\n settings: {\n ...reactPlugin.configs.flat.recommended.settings,\n react: {\n version: 'detect',\n },\n },\n}\n"],"mappings":";AAAA,SAASA,UAAUC,gBAAgB;;;ACCnC,OAAOC,iBAAiB;AAExB,OAAOC,aAAa;AAEb,IAAMC,cAAiC;EAC5CC,SAAS;IACPC,OAAOJ;EAET;EACAK,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGN,YAAYO,QAAQC,KAAKC,YAAYH;IACxCL,SAAS;MACP,GAAGA,QAAQS;MACX,GAAGT,QAAQU;IACb;EACF;EACAC,OAAO;IACL,GAAGZ,YAAYO,QAAQC,KAAKC,YAAYG;;;;;;;;IAQxC,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGb,YAAYO,QAAQC,KAAKC,YAAYI;IACxCT,OAAO;MACLU,SAAS;IACX;EACF;AACF;;;AD/BO,IAAMC,SAA8B;KAAIC;EAAUC;;","names":["config","xyConfig","reactPlugin","globals","reactConfig","plugins","react","files","languageOptions","configs","flat","recommended","serviceworker","browser","rules","settings","version","config","xyConfig","reactConfig"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport { Linter } from 'eslint'\n\nimport { reactConfig } from './react/index.ts'\n\nexport const config: Linter.Config[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.ts'\n","import tsParser from '@typescript-eslint/parser'\nimport { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport reactHooksPlugin from 'eslint-plugin-react-hooks'\nimport globals from 'globals'\n\nexport const reactConfig: Linter.Config = {\n plugins: {\n 'react': reactPlugin,\n 'react-hooks': reactHooksPlugin,\n },\n files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],\n languageOptions: {\n ...reactPlugin.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\n },\n },\n rules: {\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-hooks/rules-of-hooks': 'error',\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ],\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['warn'],\n },\n settings: {\n ...reactPlugin.configs.flat.recommended.settings,\n react: {\n version: 'detect',\n },\n },\n}\n"],"mappings":";AAAA,SAASA,UAAUC,gBAAgB;;;ACAnC,OAAOC,cAAc;AAErB,OAAOC,iBAAiB;AACxB,OAAOC,sBAAsB;AAC7B,OAAOC,aAAa;AAEb,IAAMC,cAA6B;EACxCC,SAAS;IACP,SAASJ;IACT,eAAeC;EACjB;EACAI,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGN,YAAYO,QAAQC,KAAKC,YAAYH;IACxCJ,SAAS;MACP,GAAGA,QAAQQ;MACX,GAAGR,QAAQS;IACb;IACAC,QAAQb;IACRc,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGlB,YAAYO,QAAQC,KAAKC,YAAYS;IACxC,8BAA8B;IAC9B,+BAA+B;MAC7B;MACA;QACEC,iBAAiB;MACnB;;IAEF,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGpB,YAAYO,QAAQC,KAAKC,YAAYW;IACxCC,OAAO;MACLC,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","tsParser","reactPlugin","reactHooksPlugin","globals","reactConfig","plugins","files","languageOptions","configs","flat","recommended","serviceworker","browser","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","rules","additionalHooks","settings","react","version","config","xyConfig","reactConfig"]}
@@ -1,3 +1,3 @@
1
1
  import { Linter } from 'eslint';
2
- export declare const reactConfig: Linter.FlatConfig;
2
+ export declare const reactConfig: Linter.Config;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UA+BhC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAqChC,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { Linter } from 'eslint';
2
- export declare const reactConfig: Linter.FlatConfig;
2
+ export declare const reactConfig: Linter.Config;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UA+BhC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAqChC,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { Linter } from 'eslint';
2
- export declare const reactConfig: Linter.FlatConfig;
2
+ export declare const reactConfig: Linter.Config;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UA+BhC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAqChC,CAAA"}
@@ -37,11 +37,14 @@ module.exports = __toCommonJS(src_exports);
37
37
  var import_eslint_config_flat = require("@xylabs/eslint-config-flat");
38
38
 
39
39
  // src/react/index.ts
40
+ var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
40
41
  var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
42
+ var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
41
43
  var import_globals = __toESM(require("globals"), 1);
42
44
  var reactConfig = {
43
45
  plugins: {
44
- react: import_eslint_plugin_react.default
46
+ "react": import_eslint_plugin_react.default,
47
+ "react-hooks": import_eslint_plugin_react_hooks.default
45
48
  },
46
49
  files: [
47
50
  "**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"
@@ -51,17 +54,25 @@ var reactConfig = {
51
54
  globals: {
52
55
  ...import_globals.default.serviceworker,
53
56
  ...import_globals.default.browser
57
+ },
58
+ parser: import_parser.default,
59
+ parserOptions: {
60
+ ecmaFeatures: {
61
+ modules: true
62
+ },
63
+ ecmaVersion: "latest",
64
+ project: "./tsconfig-eslint.json"
54
65
  }
55
66
  },
56
67
  rules: {
57
68
  ...import_eslint_plugin_react.default.configs.flat.recommended.rules,
58
- /* 'react-hooks/rules-of-hooks': 'error',
59
- 'react-hooks/exhaustive-deps': [
60
- 'warn',
69
+ "react-hooks/rules-of-hooks": "error",
70
+ "react-hooks/exhaustive-deps": [
71
+ "warn",
61
72
  {
62
- additionalHooks: '(useAsyncEffect|usePromise)',
63
- },
64
- ], */
73
+ additionalHooks: "(useAsyncEffect|usePromise)"
74
+ }
75
+ ],
65
76
  "react/prop-types": [
66
77
  "off"
67
78
  ],
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport { Linter } from 'eslint'\n\nimport { reactConfig } from './react/index.ts'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.ts'\n","import { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\n// import reactHooksPlugin from 'eslint-plugin-react-hooks'\nimport globals from 'globals'\n\nexport const reactConfig: Linter.FlatConfig = {\n plugins: {\n react: reactPlugin,\n // 'react-hooks': reactHooksPlugin,\n },\n files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],\n languageOptions: {\n ...reactPlugin.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n },\n rules: {\n ...reactPlugin.configs.flat.recommended.rules,\n /* 'react-hooks/rules-of-hooks': 'error',\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ], */\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['warn'],\n },\n settings: {\n ...reactPlugin.configs.flat.recommended.settings,\n react: {\n version: 'detect',\n },\n },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;gCAAmC;;;ACCnC,iCAAwB;AAExB,qBAAoB;AAEb,IAAMA,cAAiC;EAC5CC,SAAS;IACPC,OAAOC,2BAAAA;EAET;EACAC,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGF,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYH;IACxCI,SAAS;MACP,GAAGA,eAAAA,QAAQC;MACX,GAAGD,eAAAA,QAAQE;IACb;EACF;EACAC,OAAO;IACL,GAAGT,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYI;;;;;;;;IAQxC,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGV,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYK;IACxCX,OAAO;MACLY,SAAS;IACX;EACF;AACF;;;AD/BO,IAAMC,SAA8B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","plugins","react","reactPlugin","files","languageOptions","configs","flat","recommended","globals","serviceworker","browser","rules","settings","version","config","xyConfig","reactConfig"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport { Linter } from 'eslint'\n\nimport { reactConfig } from './react/index.ts'\n\nexport const config: Linter.Config[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.ts'\n","import tsParser from '@typescript-eslint/parser'\nimport { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport reactHooksPlugin from 'eslint-plugin-react-hooks'\nimport globals from 'globals'\n\nexport const reactConfig: Linter.Config = {\n plugins: {\n 'react': reactPlugin,\n 'react-hooks': reactHooksPlugin,\n },\n files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],\n languageOptions: {\n ...reactPlugin.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\n },\n },\n rules: {\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-hooks/rules-of-hooks': 'error',\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ],\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['warn'],\n },\n settings: {\n ...reactPlugin.configs.flat.recommended.settings,\n react: {\n version: 'detect',\n },\n },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;gCAAmC;;;ACAnC,oBAAqB;AAErB,iCAAwB;AACxB,uCAA6B;AAC7B,qBAAoB;AAEb,IAAMA,cAA6B;EACxCC,SAAS;IACP,SAASC,2BAAAA;IACT,eAAeC,iCAAAA;EACjB;EACAC,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGH,2BAAAA,QAAYI,QAAQC,KAAKC,YAAYH;IACxCI,SAAS;MACP,GAAGA,eAAAA,QAAQC;MACX,GAAGD,eAAAA,QAAQE;IACb;IACAC,QAAQC,cAAAA;IACRC,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGjB,2BAAAA,QAAYI,QAAQC,KAAKC,YAAYW;IACxC,8BAA8B;IAC9B,+BAA+B;MAC7B;MACA;QACEC,iBAAiB;MACnB;;IAEF,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGnB,2BAAAA,QAAYI,QAAQC,KAAKC,YAAYa;IACxCC,OAAO;MACLC,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","plugins","reactPlugin","reactHooksPlugin","files","languageOptions","configs","flat","recommended","globals","serviceworker","browser","parser","tsParser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","rules","additionalHooks","settings","react","version","config","xyConfig","reactConfig"]}
@@ -1,4 +1,4 @@
1
1
  import { Linter } from 'eslint';
2
- export declare const config: Linter.FlatConfig[];
2
+ export declare const config: Linter.Config[];
3
3
  export { reactConfig } from './react/index.ts';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,UAAU,EAA+B,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAA+B,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { Linter } from 'eslint';
2
- export declare const config: Linter.FlatConfig[];
2
+ export declare const config: Linter.Config[];
3
3
  export { reactConfig } from './react/index.ts';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,UAAU,EAA+B,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAA+B,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { Linter } from 'eslint';
2
- export declare const config: Linter.FlatConfig[];
2
+ export declare const config: Linter.Config[];
3
3
  export { reactConfig } from './react/index.ts';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,UAAU,EAA+B,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAA+B,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
@@ -2,11 +2,14 @@
2
2
  import { config as xyConfig } from "@xylabs/eslint-config-flat";
3
3
 
4
4
  // src/react/index.ts
5
+ import tsParser from "@typescript-eslint/parser";
5
6
  import reactPlugin from "eslint-plugin-react";
7
+ import reactHooksPlugin from "eslint-plugin-react-hooks";
6
8
  import globals from "globals";
7
9
  var reactConfig = {
8
10
  plugins: {
9
- react: reactPlugin
11
+ "react": reactPlugin,
12
+ "react-hooks": reactHooksPlugin
10
13
  },
11
14
  files: [
12
15
  "**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"
@@ -16,17 +19,25 @@ var reactConfig = {
16
19
  globals: {
17
20
  ...globals.serviceworker,
18
21
  ...globals.browser
22
+ },
23
+ parser: tsParser,
24
+ parserOptions: {
25
+ ecmaFeatures: {
26
+ modules: true
27
+ },
28
+ ecmaVersion: "latest",
29
+ project: "./tsconfig-eslint.json"
19
30
  }
20
31
  },
21
32
  rules: {
22
33
  ...reactPlugin.configs.flat.recommended.rules,
23
- /* 'react-hooks/rules-of-hooks': 'error',
24
- 'react-hooks/exhaustive-deps': [
25
- 'warn',
34
+ "react-hooks/rules-of-hooks": "error",
35
+ "react-hooks/exhaustive-deps": [
36
+ "warn",
26
37
  {
27
- additionalHooks: '(useAsyncEffect|usePromise)',
28
- },
29
- ], */
38
+ additionalHooks: "(useAsyncEffect|usePromise)"
39
+ }
40
+ ],
30
41
  "react/prop-types": [
31
42
  "off"
32
43
  ],
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport { Linter } from 'eslint'\n\nimport { reactConfig } from './react/index.ts'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.ts'\n","import { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\n// import reactHooksPlugin from 'eslint-plugin-react-hooks'\nimport globals from 'globals'\n\nexport const reactConfig: Linter.FlatConfig = {\n plugins: {\n react: reactPlugin,\n // 'react-hooks': reactHooksPlugin,\n },\n files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],\n languageOptions: {\n ...reactPlugin.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n },\n rules: {\n ...reactPlugin.configs.flat.recommended.rules,\n /* 'react-hooks/rules-of-hooks': 'error',\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ], */\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['warn'],\n },\n settings: {\n ...reactPlugin.configs.flat.recommended.settings,\n react: {\n version: 'detect',\n },\n },\n}\n"],"mappings":";AAAA,SAASA,UAAUC,gBAAgB;;;ACCnC,OAAOC,iBAAiB;AAExB,OAAOC,aAAa;AAEb,IAAMC,cAAiC;EAC5CC,SAAS;IACPC,OAAOJ;EAET;EACAK,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGN,YAAYO,QAAQC,KAAKC,YAAYH;IACxCL,SAAS;MACP,GAAGA,QAAQS;MACX,GAAGT,QAAQU;IACb;EACF;EACAC,OAAO;IACL,GAAGZ,YAAYO,QAAQC,KAAKC,YAAYG;;;;;;;;IAQxC,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGb,YAAYO,QAAQC,KAAKC,YAAYI;IACxCT,OAAO;MACLU,SAAS;IACX;EACF;AACF;;;AD/BO,IAAMC,SAA8B;KAAIC;EAAUC;;","names":["config","xyConfig","reactPlugin","globals","reactConfig","plugins","react","files","languageOptions","configs","flat","recommended","serviceworker","browser","rules","settings","version","config","xyConfig","reactConfig"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport { Linter } from 'eslint'\n\nimport { reactConfig } from './react/index.ts'\n\nexport const config: Linter.Config[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.ts'\n","import tsParser from '@typescript-eslint/parser'\nimport { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport reactHooksPlugin from 'eslint-plugin-react-hooks'\nimport globals from 'globals'\n\nexport const reactConfig: Linter.Config = {\n plugins: {\n 'react': reactPlugin,\n 'react-hooks': reactHooksPlugin,\n },\n files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],\n languageOptions: {\n ...reactPlugin.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\n },\n },\n rules: {\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-hooks/rules-of-hooks': 'error',\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ],\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['warn'],\n },\n settings: {\n ...reactPlugin.configs.flat.recommended.settings,\n react: {\n version: 'detect',\n },\n },\n}\n"],"mappings":";AAAA,SAASA,UAAUC,gBAAgB;;;ACAnC,OAAOC,cAAc;AAErB,OAAOC,iBAAiB;AACxB,OAAOC,sBAAsB;AAC7B,OAAOC,aAAa;AAEb,IAAMC,cAA6B;EACxCC,SAAS;IACP,SAASJ;IACT,eAAeC;EACjB;EACAI,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGN,YAAYO,QAAQC,KAAKC,YAAYH;IACxCJ,SAAS;MACP,GAAGA,QAAQQ;MACX,GAAGR,QAAQS;IACb;IACAC,QAAQb;IACRc,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGlB,YAAYO,QAAQC,KAAKC,YAAYS;IACxC,8BAA8B;IAC9B,+BAA+B;MAC7B;MACA;QACEC,iBAAiB;MACnB;;IAEF,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGpB,YAAYO,QAAQC,KAAKC,YAAYW;IACxCC,OAAO;MACLC,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","tsParser","reactPlugin","reactHooksPlugin","globals","reactConfig","plugins","files","languageOptions","configs","flat","recommended","serviceworker","browser","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","rules","additionalHooks","settings","react","version","config","xyConfig","reactConfig"]}
@@ -1,3 +1,3 @@
1
1
  import { Linter } from 'eslint';
2
- export declare const reactConfig: Linter.FlatConfig;
2
+ export declare const reactConfig: Linter.Config;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UA+BhC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAqChC,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { Linter } from 'eslint';
2
- export declare const reactConfig: Linter.FlatConfig;
2
+ export declare const reactConfig: Linter.Config;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UA+BhC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAqChC,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { Linter } from 'eslint';
2
- export declare const reactConfig: Linter.FlatConfig;
2
+ export declare const reactConfig: Linter.Config;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UA+BhC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAqChC,CAAA"}
package/package.json CHANGED
@@ -10,15 +10,15 @@
10
10
  "url": "https://github.com/xylabs/eslint-config/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/eslint-config-flat": "^3.15.9",
13
+ "@xylabs/eslint-config-flat": "^3.15.11",
14
14
  "eslint-plugin-react": "^7.35.0",
15
15
  "eslint-plugin-react-hooks": "^4.6.2",
16
16
  "globals": "^15.9.0"
17
17
  },
18
18
  "description": "ESLint Config used throughout XY Labs TypeScript/JavaScript libraries and react projects",
19
19
  "devDependencies": {
20
- "@xylabs/ts-scripts-yarn3": "^3.15.9",
21
- "@xylabs/tsconfig": "^3.15.9",
20
+ "@xylabs/ts-scripts-yarn3": "^3.15.11",
21
+ "@xylabs/tsconfig": "^3.15.11",
22
22
  "eslint": "^9.8.0",
23
23
  "typescript": "^5.5.4"
24
24
  },
@@ -62,6 +62,6 @@
62
62
  "url": "https://github.com/xylabs/config.git"
63
63
  },
64
64
  "sideEffects": false,
65
- "version": "3.15.9",
65
+ "version": "3.15.11",
66
66
  "type": "module"
67
67
  }
package/src/index.ts CHANGED
@@ -3,6 +3,6 @@ import { Linter } from 'eslint'
3
3
 
4
4
  import { reactConfig } from './react/index.ts'
5
5
 
6
- export const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]
6
+ export const config: Linter.Config[] = [...xyConfig, reactConfig]
7
7
 
8
8
  export { reactConfig } from './react/index.ts'
@@ -1,12 +1,13 @@
1
+ import tsParser from '@typescript-eslint/parser'
1
2
  import { Linter } from 'eslint'
2
3
  import reactPlugin from 'eslint-plugin-react'
3
- // import reactHooksPlugin from 'eslint-plugin-react-hooks'
4
+ import reactHooksPlugin from 'eslint-plugin-react-hooks'
4
5
  import globals from 'globals'
5
6
 
6
- export const reactConfig: Linter.FlatConfig = {
7
+ export const reactConfig: Linter.Config = {
7
8
  plugins: {
8
- react: reactPlugin,
9
- // 'react-hooks': reactHooksPlugin,
9
+ 'react': reactPlugin,
10
+ 'react-hooks': reactHooksPlugin,
10
11
  },
11
12
  files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
12
13
  languageOptions: {
@@ -15,16 +16,22 @@ export const reactConfig: Linter.FlatConfig = {
15
16
  ...globals.serviceworker,
16
17
  ...globals.browser,
17
18
  },
19
+ parser: tsParser,
20
+ parserOptions: {
21
+ ecmaFeatures: { modules: true },
22
+ ecmaVersion: 'latest',
23
+ project: './tsconfig-eslint.json',
24
+ },
18
25
  },
19
26
  rules: {
20
27
  ...reactPlugin.configs.flat.recommended.rules,
21
- /* 'react-hooks/rules-of-hooks': 'error',
28
+ 'react-hooks/rules-of-hooks': 'error',
22
29
  'react-hooks/exhaustive-deps': [
23
30
  'warn',
24
31
  {
25
32
  additionalHooks: '(useAsyncEffect|usePromise)',
26
33
  },
27
- ], */
34
+ ],
28
35
  'react/prop-types': ['off'],
29
36
  'react/react-in-jsx-scope': ['warn'],
30
37
  },