@xylabs/eslint-config-react-flat 3.15.10 → 3.15.12

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,52 +37,15 @@ 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_eslint_plugin = __toESM(require("@eslint-react/eslint-plugin"), 1);
40
41
  var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
41
- var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
42
- var import_globals = __toESM(require("globals"), 1);
43
42
  var reactConfig = {
44
- plugins: {
45
- react: import_eslint_plugin_react.default
46
- },
47
43
  files: [
48
- "**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"
44
+ "**/*.{ts,tsx}"
49
45
  ],
46
+ ...import_eslint_plugin.default.configs.recommended,
50
47
  languageOptions: {
51
- ...import_eslint_plugin_react.default.configs.flat.recommended.languageOptions,
52
- globals: {
53
- ...import_globals.default.serviceworker,
54
- ...import_globals.default.browser
55
- },
56
- parser: import_parser.default,
57
- parserOptions: {
58
- ecmaFeatures: {
59
- modules: true
60
- },
61
- ecmaVersion: "latest",
62
- project: "./tsconfig-eslint.json"
63
- }
64
- },
65
- rules: {
66
- ...import_eslint_plugin_react.default.configs.flat.recommended.rules,
67
- /* 'react-hooks/rules-of-hooks': 'error',
68
- 'react-hooks/exhaustive-deps': [
69
- 'warn',
70
- {
71
- additionalHooks: '(useAsyncEffect|usePromise)',
72
- },
73
- ], */
74
- "react/prop-types": [
75
- "off"
76
- ],
77
- "react/react-in-jsx-scope": [
78
- "warn"
79
- ]
80
- },
81
- settings: {
82
- ...import_eslint_plugin_react.default.configs.flat.recommended.settings,
83
- react: {
84
- version: "detect"
85
- }
48
+ parser: import_parser.default
86
49
  }
87
50
  };
88
51
 
@@ -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.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'\n// import 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;AAExB,qBAAoB;AAEb,IAAMA,cAA6B;EACxCC,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;IACAC,QAAQC,cAAAA;IACRC,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGhB,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYW;;;;;;;;IAQxC,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGjB,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYY;IACxClB,OAAO;MACLmB,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","plugins","react","reactPlugin","files","languageOptions","configs","flat","recommended","globals","serviceworker","browser","parser","tsParser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","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 reactPlugin from '@eslint-react/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\nimport { Linter } from 'eslint'\n\nexport const reactConfig = {\n files: ['**/*.{ts,tsx}'],\n ...reactPlugin.configs.recommended,\n languageOptions: {\n parser: tsParser,\n },\n} as unknown as Linter.Config\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;gCAAmC;;;ACAnC,2BAAwB;AACxB,oBAAqB;AAGd,IAAMA,cAAc;EACzBC,OAAO;IAAC;;EACR,GAAGC,qBAAAA,QAAYC,QAAQC;EACvBC,iBAAiB;IACfC,QAAQC,cAAAA;EACV;AACF;;;ADLO,IAAMC,SAA0B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","files","reactPlugin","configs","recommended","languageOptions","parser","tsParser","config","xyConfig","reactConfig"]}
@@ -2,52 +2,15 @@
2
2
  import { config as xyConfig } from "@xylabs/eslint-config-flat";
3
3
 
4
4
  // src/react/index.ts
5
+ import reactPlugin from "@eslint-react/eslint-plugin";
5
6
  import tsParser from "@typescript-eslint/parser";
6
- import reactPlugin from "eslint-plugin-react";
7
- import globals from "globals";
8
7
  var reactConfig = {
9
- plugins: {
10
- react: reactPlugin
11
- },
12
8
  files: [
13
- "**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"
9
+ "**/*.{ts,tsx}"
14
10
  ],
11
+ ...reactPlugin.configs.recommended,
15
12
  languageOptions: {
16
- ...reactPlugin.configs.flat.recommended.languageOptions,
17
- globals: {
18
- ...globals.serviceworker,
19
- ...globals.browser
20
- },
21
- parser: tsParser,
22
- parserOptions: {
23
- ecmaFeatures: {
24
- modules: true
25
- },
26
- ecmaVersion: "latest",
27
- project: "./tsconfig-eslint.json"
28
- }
29
- },
30
- rules: {
31
- ...reactPlugin.configs.flat.recommended.rules,
32
- /* 'react-hooks/rules-of-hooks': 'error',
33
- 'react-hooks/exhaustive-deps': [
34
- 'warn',
35
- {
36
- additionalHooks: '(useAsyncEffect|usePromise)',
37
- },
38
- ], */
39
- "react/prop-types": [
40
- "off"
41
- ],
42
- "react/react-in-jsx-scope": [
43
- "warn"
44
- ]
45
- },
46
- settings: {
47
- ...reactPlugin.configs.flat.recommended.settings,
48
- react: {
49
- version: "detect"
50
- }
13
+ parser: tsParser
51
14
  }
52
15
  };
53
16
 
@@ -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.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'\n// import 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;AAExB,OAAOC,aAAa;AAEb,IAAMC,cAA6B;EACxCC,SAAS;IACPC,OAAOJ;EAET;EACAK,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGN,YAAYO,QAAQC,KAAKC,YAAYH;IACxCL,SAAS;MACP,GAAGA,QAAQS;MACX,GAAGT,QAAQU;IACb;IACAC,QAAQb;IACRc,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGlB,YAAYO,QAAQC,KAAKC,YAAYS;;;;;;;;IAQxC,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGnB,YAAYO,QAAQC,KAAKC,YAAYU;IACxCf,OAAO;MACLgB,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","tsParser","reactPlugin","globals","reactConfig","plugins","react","files","languageOptions","configs","flat","recommended","serviceworker","browser","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","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 reactPlugin from '@eslint-react/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\nimport { Linter } from 'eslint'\n\nexport const reactConfig = {\n files: ['**/*.{ts,tsx}'],\n ...reactPlugin.configs.recommended,\n languageOptions: {\n parser: tsParser,\n },\n} as unknown as Linter.Config\n"],"mappings":";AAAA,SAASA,UAAUC,gBAAgB;;;ACAnC,OAAOC,iBAAiB;AACxB,OAAOC,cAAc;AAGd,IAAMC,cAAc;EACzBC,OAAO;IAAC;;EACR,GAAGH,YAAYI,QAAQC;EACvBC,iBAAiB;IACfC,QAAQN;EACV;AACF;;;ADLO,IAAMO,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","reactPlugin","tsParser","reactConfig","files","configs","recommended","languageOptions","parser","config","xyConfig","reactConfig"]}
@@ -1 +1 @@
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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,eAAO,MAAM,WAAW,EAMR,MAAM,CAAC,MAAM,CAAA"}
@@ -1 +1 @@
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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,eAAO,MAAM,WAAW,EAMR,MAAM,CAAC,MAAM,CAAA"}
@@ -1 +1 @@
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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,eAAO,MAAM,WAAW,EAMR,MAAM,CAAC,MAAM,CAAA"}
@@ -37,52 +37,15 @@ 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_eslint_plugin = __toESM(require("@eslint-react/eslint-plugin"), 1);
40
41
  var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
41
- var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
42
- var import_globals = __toESM(require("globals"), 1);
43
42
  var reactConfig = {
44
- plugins: {
45
- react: import_eslint_plugin_react.default
46
- },
47
43
  files: [
48
- "**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"
44
+ "**/*.{ts,tsx}"
49
45
  ],
46
+ ...import_eslint_plugin.default.configs.recommended,
50
47
  languageOptions: {
51
- ...import_eslint_plugin_react.default.configs.flat.recommended.languageOptions,
52
- globals: {
53
- ...import_globals.default.serviceworker,
54
- ...import_globals.default.browser
55
- },
56
- parser: import_parser.default,
57
- parserOptions: {
58
- ecmaFeatures: {
59
- modules: true
60
- },
61
- ecmaVersion: "latest",
62
- project: "./tsconfig-eslint.json"
63
- }
64
- },
65
- rules: {
66
- ...import_eslint_plugin_react.default.configs.flat.recommended.rules,
67
- /* 'react-hooks/rules-of-hooks': 'error',
68
- 'react-hooks/exhaustive-deps': [
69
- 'warn',
70
- {
71
- additionalHooks: '(useAsyncEffect|usePromise)',
72
- },
73
- ], */
74
- "react/prop-types": [
75
- "off"
76
- ],
77
- "react/react-in-jsx-scope": [
78
- "warn"
79
- ]
80
- },
81
- settings: {
82
- ...import_eslint_plugin_react.default.configs.flat.recommended.settings,
83
- react: {
84
- version: "detect"
85
- }
48
+ parser: import_parser.default
86
49
  }
87
50
  };
88
51
 
@@ -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.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'\n// import 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;AAExB,qBAAoB;AAEb,IAAMA,cAA6B;EACxCC,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;IACAC,QAAQC,cAAAA;IACRC,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGhB,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYW;;;;;;;;IAQxC,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGjB,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYY;IACxClB,OAAO;MACLmB,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","plugins","react","reactPlugin","files","languageOptions","configs","flat","recommended","globals","serviceworker","browser","parser","tsParser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","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 reactPlugin from '@eslint-react/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\nimport { Linter } from 'eslint'\n\nexport const reactConfig = {\n files: ['**/*.{ts,tsx}'],\n ...reactPlugin.configs.recommended,\n languageOptions: {\n parser: tsParser,\n },\n} as unknown as Linter.Config\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;gCAAmC;;;ACAnC,2BAAwB;AACxB,oBAAqB;AAGd,IAAMA,cAAc;EACzBC,OAAO;IAAC;;EACR,GAAGC,qBAAAA,QAAYC,QAAQC;EACvBC,iBAAiB;IACfC,QAAQC,cAAAA;EACV;AACF;;;ADLO,IAAMC,SAA0B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","files","reactPlugin","configs","recommended","languageOptions","parser","tsParser","config","xyConfig","reactConfig"]}
@@ -2,52 +2,15 @@
2
2
  import { config as xyConfig } from "@xylabs/eslint-config-flat";
3
3
 
4
4
  // src/react/index.ts
5
+ import reactPlugin from "@eslint-react/eslint-plugin";
5
6
  import tsParser from "@typescript-eslint/parser";
6
- import reactPlugin from "eslint-plugin-react";
7
- import globals from "globals";
8
7
  var reactConfig = {
9
- plugins: {
10
- react: reactPlugin
11
- },
12
8
  files: [
13
- "**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"
9
+ "**/*.{ts,tsx}"
14
10
  ],
11
+ ...reactPlugin.configs.recommended,
15
12
  languageOptions: {
16
- ...reactPlugin.configs.flat.recommended.languageOptions,
17
- globals: {
18
- ...globals.serviceworker,
19
- ...globals.browser
20
- },
21
- parser: tsParser,
22
- parserOptions: {
23
- ecmaFeatures: {
24
- modules: true
25
- },
26
- ecmaVersion: "latest",
27
- project: "./tsconfig-eslint.json"
28
- }
29
- },
30
- rules: {
31
- ...reactPlugin.configs.flat.recommended.rules,
32
- /* 'react-hooks/rules-of-hooks': 'error',
33
- 'react-hooks/exhaustive-deps': [
34
- 'warn',
35
- {
36
- additionalHooks: '(useAsyncEffect|usePromise)',
37
- },
38
- ], */
39
- "react/prop-types": [
40
- "off"
41
- ],
42
- "react/react-in-jsx-scope": [
43
- "warn"
44
- ]
45
- },
46
- settings: {
47
- ...reactPlugin.configs.flat.recommended.settings,
48
- react: {
49
- version: "detect"
50
- }
13
+ parser: tsParser
51
14
  }
52
15
  };
53
16
 
@@ -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.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'\n// import 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;AAExB,OAAOC,aAAa;AAEb,IAAMC,cAA6B;EACxCC,SAAS;IACPC,OAAOJ;EAET;EACAK,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGN,YAAYO,QAAQC,KAAKC,YAAYH;IACxCL,SAAS;MACP,GAAGA,QAAQS;MACX,GAAGT,QAAQU;IACb;IACAC,QAAQb;IACRc,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGlB,YAAYO,QAAQC,KAAKC,YAAYS;;;;;;;;IAQxC,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGnB,YAAYO,QAAQC,KAAKC,YAAYU;IACxCf,OAAO;MACLgB,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","tsParser","reactPlugin","globals","reactConfig","plugins","react","files","languageOptions","configs","flat","recommended","serviceworker","browser","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","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 reactPlugin from '@eslint-react/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\nimport { Linter } from 'eslint'\n\nexport const reactConfig = {\n files: ['**/*.{ts,tsx}'],\n ...reactPlugin.configs.recommended,\n languageOptions: {\n parser: tsParser,\n },\n} as unknown as Linter.Config\n"],"mappings":";AAAA,SAASA,UAAUC,gBAAgB;;;ACAnC,OAAOC,iBAAiB;AACxB,OAAOC,cAAc;AAGd,IAAMC,cAAc;EACzBC,OAAO;IAAC;;EACR,GAAGH,YAAYI,QAAQC;EACvBC,iBAAiB;IACfC,QAAQN;EACV;AACF;;;ADLO,IAAMO,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","reactPlugin","tsParser","reactConfig","files","configs","recommended","languageOptions","parser","config","xyConfig","reactConfig"]}
@@ -1 +1 @@
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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,eAAO,MAAM,WAAW,EAMR,MAAM,CAAC,MAAM,CAAA"}
@@ -1 +1 @@
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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,eAAO,MAAM,WAAW,EAMR,MAAM,CAAC,MAAM,CAAA"}
@@ -1 +1 @@
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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,eAAO,MAAM,WAAW,EAMR,MAAM,CAAC,MAAM,CAAA"}
package/package.json CHANGED
@@ -10,15 +10,14 @@
10
10
  "url": "https://github.com/xylabs/eslint-config/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/eslint-config-flat": "^3.15.10",
14
- "eslint-plugin-react": "^7.35.0",
15
- "eslint-plugin-react-hooks": "^4.6.2",
13
+ "@eslint-react/eslint-plugin": "^1.8.2",
14
+ "@xylabs/eslint-config-flat": "^3.15.12",
16
15
  "globals": "^15.9.0"
17
16
  },
18
17
  "description": "ESLint Config used throughout XY Labs TypeScript/JavaScript libraries and react projects",
19
18
  "devDependencies": {
20
- "@xylabs/ts-scripts-yarn3": "^3.15.10",
21
- "@xylabs/tsconfig": "^3.15.10",
19
+ "@xylabs/ts-scripts-yarn3": "^3.15.12",
20
+ "@xylabs/tsconfig": "^3.15.12",
22
21
  "eslint": "^9.8.0",
23
22
  "typescript": "^5.5.4"
24
23
  },
@@ -62,6 +61,6 @@
62
61
  "url": "https://github.com/xylabs/config.git"
63
62
  },
64
63
  "sideEffects": false,
65
- "version": "3.15.10",
64
+ "version": "3.15.12",
66
65
  "type": "module"
67
66
  }
@@ -1,44 +1,11 @@
1
+ import reactPlugin from '@eslint-react/eslint-plugin'
1
2
  import tsParser from '@typescript-eslint/parser'
2
3
  import { Linter } from 'eslint'
3
- import reactPlugin from 'eslint-plugin-react'
4
- // import reactHooksPlugin from 'eslint-plugin-react-hooks'
5
- import globals from 'globals'
6
4
 
7
- export const reactConfig: Linter.Config = {
8
- plugins: {
9
- react: reactPlugin,
10
- // 'react-hooks': reactHooksPlugin,
11
- },
12
- files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
5
+ export const reactConfig = {
6
+ files: ['**/*.{ts,tsx}'],
7
+ ...reactPlugin.configs.recommended,
13
8
  languageOptions: {
14
- ...reactPlugin.configs.flat.recommended.languageOptions,
15
- globals: {
16
- ...globals.serviceworker,
17
- ...globals.browser,
18
- },
19
9
  parser: tsParser,
20
- parserOptions: {
21
- ecmaFeatures: { modules: true },
22
- ecmaVersion: 'latest',
23
- project: './tsconfig-eslint.json',
24
- },
25
- },
26
- rules: {
27
- ...reactPlugin.configs.flat.recommended.rules,
28
- /* 'react-hooks/rules-of-hooks': 'error',
29
- 'react-hooks/exhaustive-deps': [
30
- 'warn',
31
- {
32
- additionalHooks: '(useAsyncEffect|usePromise)',
33
- },
34
- ], */
35
- 'react/prop-types': ['off'],
36
- 'react/react-in-jsx-scope': ['warn'],
37
- },
38
- settings: {
39
- ...reactPlugin.configs.flat.recommended.settings,
40
- react: {
41
- version: 'detect',
42
- },
43
10
  },
44
- }
11
+ } as unknown as Linter.Config
package/src/types.d.ts DELETED
@@ -1,7 +0,0 @@
1
- declare module 'eslint-plugin-react' {
2
- const configs: Linter.Plugin
3
- }
4
-
5
- declare module 'eslint-plugin-react-hooks' {
6
- const configs: Linter.Plugin
7
- }