@xylabs/eslint-config-react-flat 3.13.7 → 3.13.9

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.
@@ -38,28 +38,37 @@ var import_eslint_config_flat = require("@xylabs/eslint-config-flat");
38
38
 
39
39
  // src/react/index.ts
40
40
  var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
41
- var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
41
+ var import_globals = __toESM(require("globals"), 1);
42
42
  var reactConfig = {
43
43
  plugins: {
44
- ...import_eslint_plugin_react.default.configs.flat.recommended.plugins,
45
- "react-hooks": import_eslint_plugin_react_hooks.default
44
+ react: import_eslint_plugin_react.default
45
+ //'react-hooks': reactHooksPlugin,
46
+ },
47
+ files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
48
+ languageOptions: {
49
+ ...import_eslint_plugin_react.default.configs.flat.recommended.languageOptions,
50
+ globals: {
51
+ ...import_globals.default.serviceworker,
52
+ ...import_globals.default.browser
53
+ }
46
54
  },
47
- files: ["*.tsx"],
48
55
  rules: {
49
56
  ...import_eslint_plugin_react.default.configs.flat.recommended.rules,
50
- "react-hooks/rules-of-hooks": "error",
51
- "import/no-nodejs-modules": ["error"],
52
- "react-hooks/exhaustive-deps": [
53
- "warn",
57
+ /*'react-hooks/rules-of-hooks': 'error',
58
+ 'react-hooks/exhaustive-deps': [
59
+ 'warn',
54
60
  {
55
- additionalHooks: "(useAsyncEffect|usePromise)"
56
- }
57
- ],
61
+ additionalHooks: '(useAsyncEffect|usePromise)',
62
+ },
63
+ ],*/
58
64
  "react/prop-types": ["off"],
59
65
  "react/react-in-jsx-scope": ["warn"]
60
66
  },
61
67
  settings: {
62
- ...import_eslint_plugin_react.default.configs.flat.recommended.settings
68
+ ...import_eslint_plugin_react.default.configs.flat.recommended.settings,
69
+ react: {
70
+ version: "detect"
71
+ }
63
72
  }
64
73
  };
65
74
 
@@ -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.js'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.js'\n","import { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport reactHooksPlugin from 'eslint-plugin-react-hooks'\n\nexport const reactConfig: Linter.FlatConfig = {\n plugins: {\n ...reactPlugin.configs.flat.recommended.plugins,\n 'react-hooks': reactHooksPlugin,\n },\n files: ['*.tsx'],\n rules: {\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-hooks/rules-of-hooks': 'error',\n 'import/no-nodejs-modules': ['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 },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;;;ACCnC,iCAAwB;AACxB,uCAA6B;AAEtB,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,GAAG,2BAAAA,QAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,eAAe,iCAAAC;AAAA,EACjB;AAAA,EACA,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,GAAG,2BAAAD,QAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,8BAA8B;AAAA,IAC9B,4BAA4B,CAAC,OAAO;AAAA,IACpC,+BAA+B;AAAA,MAC7B;AAAA,MACA;AAAA,QACE,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,KAAK;AAAA,IAC1B,4BAA4B,CAAC,MAAM;AAAA,EACrC;AAAA,EACA,UAAU;AAAA,IACR,GAAG,2BAAAA,QAAY,QAAQ,KAAK,YAAY;AAAA,EAC1C;AACF;;;ADrBO,IAAM,SAA8B,CAAC,GAAG,0BAAAE,QAAU,WAAW;","names":["reactPlugin","reactHooksPlugin","xyConfig"]}
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.js'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.js'\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;;;ACCnC,iCAAwB;AAExB,qBAAoB;AAEb,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,OAAO,2BAAAA;AAAA;AAAA,EAET;AAAA,EACA,OAAO,CAAC,wCAAwC;AAAA,EAChD,iBAAiB;AAAA,IACf,GAAG,2BAAAA,QAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,SAAS;AAAA,MACP,GAAG,eAAAC,QAAQ;AAAA,MACX,GAAG,eAAAA,QAAQ;AAAA,IACb;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL,GAAG,2BAAAD,QAAY,QAAQ,KAAK,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQxC,oBAAoB,CAAC,KAAK;AAAA,IAC1B,4BAA4B,CAAC,MAAM;AAAA,EACrC;AAAA,EACA,UAAU;AAAA,IACR,GAAG,2BAAAA,QAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;AD/BO,IAAM,SAA8B,CAAC,GAAG,0BAAAE,QAAU,WAAW;","names":["reactPlugin","globals","xyConfig"]}
@@ -3,28 +3,37 @@ import { config as xyConfig } from "@xylabs/eslint-config-flat";
3
3
 
4
4
  // src/react/index.ts
5
5
  import reactPlugin from "eslint-plugin-react";
6
- import reactHooksPlugin from "eslint-plugin-react-hooks";
6
+ import globals from "globals";
7
7
  var reactConfig = {
8
8
  plugins: {
9
- ...reactPlugin.configs.flat.recommended.plugins,
10
- "react-hooks": reactHooksPlugin
9
+ react: reactPlugin
10
+ //'react-hooks': reactHooksPlugin,
11
+ },
12
+ files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
13
+ languageOptions: {
14
+ ...reactPlugin.configs.flat.recommended.languageOptions,
15
+ globals: {
16
+ ...globals.serviceworker,
17
+ ...globals.browser
18
+ }
11
19
  },
12
- files: ["*.tsx"],
13
20
  rules: {
14
21
  ...reactPlugin.configs.flat.recommended.rules,
15
- "react-hooks/rules-of-hooks": "error",
16
- "import/no-nodejs-modules": ["error"],
17
- "react-hooks/exhaustive-deps": [
18
- "warn",
22
+ /*'react-hooks/rules-of-hooks': 'error',
23
+ 'react-hooks/exhaustive-deps': [
24
+ 'warn',
19
25
  {
20
- additionalHooks: "(useAsyncEffect|usePromise)"
21
- }
22
- ],
26
+ additionalHooks: '(useAsyncEffect|usePromise)',
27
+ },
28
+ ],*/
23
29
  "react/prop-types": ["off"],
24
30
  "react/react-in-jsx-scope": ["warn"]
25
31
  },
26
32
  settings: {
27
- ...reactPlugin.configs.flat.recommended.settings
33
+ ...reactPlugin.configs.flat.recommended.settings,
34
+ react: {
35
+ version: "detect"
36
+ }
28
37
  }
29
38
  };
30
39
 
@@ -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.js'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.js'\n","import { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport reactHooksPlugin from 'eslint-plugin-react-hooks'\n\nexport const reactConfig: Linter.FlatConfig = {\n plugins: {\n ...reactPlugin.configs.flat.recommended.plugins,\n 'react-hooks': reactHooksPlugin,\n },\n files: ['*.tsx'],\n rules: {\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-hooks/rules-of-hooks': 'error',\n 'import/no-nodejs-modules': ['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 },\n}\n"],"mappings":";AAAA,SAAS,UAAU,gBAAgB;;;ACCnC,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAEtB,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,eAAe;AAAA,EACjB;AAAA,EACA,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,8BAA8B;AAAA,IAC9B,4BAA4B,CAAC,OAAO;AAAA,IACpC,+BAA+B;AAAA,MAC7B;AAAA,MACA;AAAA,QACE,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,KAAK;AAAA,IAC1B,4BAA4B,CAAC,MAAM;AAAA,EACrC;AAAA,EACA,UAAU;AAAA,IACR,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA,EAC1C;AACF;;;ADrBO,IAAM,SAA8B,CAAC,GAAG,UAAU,WAAW;","names":[]}
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.js'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.js'\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,SAAS,UAAU,gBAAgB;;;ACCnC,OAAO,iBAAiB;AAExB,OAAO,aAAa;AAEb,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,OAAO;AAAA;AAAA,EAET;AAAA,EACA,OAAO,CAAC,wCAAwC;AAAA,EAChD,iBAAiB;AAAA,IACf,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,SAAS;AAAA,MACP,GAAG,QAAQ;AAAA,MACX,GAAG,QAAQ;AAAA,IACb;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQxC,oBAAoB,CAAC,KAAK;AAAA,IAC1B,4BAA4B,CAAC,MAAM;AAAA,EACrC;AAAA,EACA,UAAU;AAAA,IACR,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;AD/BO,IAAM,SAA8B,CAAC,GAAG,UAAU,WAAW;","names":[]}
@@ -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;AAI/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAsBhC,CAAA"}
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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAsBhC,CAAA"}
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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAsBhC,CAAA"}
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"}
@@ -38,28 +38,37 @@ var import_eslint_config_flat = require("@xylabs/eslint-config-flat");
38
38
 
39
39
  // src/react/index.ts
40
40
  var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
41
- var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
41
+ var import_globals = __toESM(require("globals"), 1);
42
42
  var reactConfig = {
43
43
  plugins: {
44
- ...import_eslint_plugin_react.default.configs.flat.recommended.plugins,
45
- "react-hooks": import_eslint_plugin_react_hooks.default
44
+ react: import_eslint_plugin_react.default
45
+ //'react-hooks': reactHooksPlugin,
46
+ },
47
+ files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
48
+ languageOptions: {
49
+ ...import_eslint_plugin_react.default.configs.flat.recommended.languageOptions,
50
+ globals: {
51
+ ...import_globals.default.serviceworker,
52
+ ...import_globals.default.browser
53
+ }
46
54
  },
47
- files: ["*.tsx"],
48
55
  rules: {
49
56
  ...import_eslint_plugin_react.default.configs.flat.recommended.rules,
50
- "react-hooks/rules-of-hooks": "error",
51
- "import/no-nodejs-modules": ["error"],
52
- "react-hooks/exhaustive-deps": [
53
- "warn",
57
+ /*'react-hooks/rules-of-hooks': 'error',
58
+ 'react-hooks/exhaustive-deps': [
59
+ 'warn',
54
60
  {
55
- additionalHooks: "(useAsyncEffect|usePromise)"
56
- }
57
- ],
61
+ additionalHooks: '(useAsyncEffect|usePromise)',
62
+ },
63
+ ],*/
58
64
  "react/prop-types": ["off"],
59
65
  "react/react-in-jsx-scope": ["warn"]
60
66
  },
61
67
  settings: {
62
- ...import_eslint_plugin_react.default.configs.flat.recommended.settings
68
+ ...import_eslint_plugin_react.default.configs.flat.recommended.settings,
69
+ react: {
70
+ version: "detect"
71
+ }
63
72
  }
64
73
  };
65
74
 
@@ -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.js'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.js'\n","import { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport reactHooksPlugin from 'eslint-plugin-react-hooks'\n\nexport const reactConfig: Linter.FlatConfig = {\n plugins: {\n ...reactPlugin.configs.flat.recommended.plugins,\n 'react-hooks': reactHooksPlugin,\n },\n files: ['*.tsx'],\n rules: {\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-hooks/rules-of-hooks': 'error',\n 'import/no-nodejs-modules': ['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 },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;;;ACCnC,iCAAwB;AACxB,uCAA6B;AAEtB,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,GAAG,2BAAAA,QAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,eAAe,iCAAAC;AAAA,EACjB;AAAA,EACA,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,GAAG,2BAAAD,QAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,8BAA8B;AAAA,IAC9B,4BAA4B,CAAC,OAAO;AAAA,IACpC,+BAA+B;AAAA,MAC7B;AAAA,MACA;AAAA,QACE,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,KAAK;AAAA,IAC1B,4BAA4B,CAAC,MAAM;AAAA,EACrC;AAAA,EACA,UAAU;AAAA,IACR,GAAG,2BAAAA,QAAY,QAAQ,KAAK,YAAY;AAAA,EAC1C;AACF;;;ADrBO,IAAM,SAA8B,CAAC,GAAG,0BAAAE,QAAU,WAAW;","names":["reactPlugin","reactHooksPlugin","xyConfig"]}
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.js'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.js'\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;;;ACCnC,iCAAwB;AAExB,qBAAoB;AAEb,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,OAAO,2BAAAA;AAAA;AAAA,EAET;AAAA,EACA,OAAO,CAAC,wCAAwC;AAAA,EAChD,iBAAiB;AAAA,IACf,GAAG,2BAAAA,QAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,SAAS;AAAA,MACP,GAAG,eAAAC,QAAQ;AAAA,MACX,GAAG,eAAAA,QAAQ;AAAA,IACb;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL,GAAG,2BAAAD,QAAY,QAAQ,KAAK,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQxC,oBAAoB,CAAC,KAAK;AAAA,IAC1B,4BAA4B,CAAC,MAAM;AAAA,EACrC;AAAA,EACA,UAAU;AAAA,IACR,GAAG,2BAAAA,QAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;AD/BO,IAAM,SAA8B,CAAC,GAAG,0BAAAE,QAAU,WAAW;","names":["reactPlugin","globals","xyConfig"]}
@@ -3,28 +3,37 @@ import { config as xyConfig } from "@xylabs/eslint-config-flat";
3
3
 
4
4
  // src/react/index.ts
5
5
  import reactPlugin from "eslint-plugin-react";
6
- import reactHooksPlugin from "eslint-plugin-react-hooks";
6
+ import globals from "globals";
7
7
  var reactConfig = {
8
8
  plugins: {
9
- ...reactPlugin.configs.flat.recommended.plugins,
10
- "react-hooks": reactHooksPlugin
9
+ react: reactPlugin
10
+ //'react-hooks': reactHooksPlugin,
11
+ },
12
+ files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
13
+ languageOptions: {
14
+ ...reactPlugin.configs.flat.recommended.languageOptions,
15
+ globals: {
16
+ ...globals.serviceworker,
17
+ ...globals.browser
18
+ }
11
19
  },
12
- files: ["*.tsx"],
13
20
  rules: {
14
21
  ...reactPlugin.configs.flat.recommended.rules,
15
- "react-hooks/rules-of-hooks": "error",
16
- "import/no-nodejs-modules": ["error"],
17
- "react-hooks/exhaustive-deps": [
18
- "warn",
22
+ /*'react-hooks/rules-of-hooks': 'error',
23
+ 'react-hooks/exhaustive-deps': [
24
+ 'warn',
19
25
  {
20
- additionalHooks: "(useAsyncEffect|usePromise)"
21
- }
22
- ],
26
+ additionalHooks: '(useAsyncEffect|usePromise)',
27
+ },
28
+ ],*/
23
29
  "react/prop-types": ["off"],
24
30
  "react/react-in-jsx-scope": ["warn"]
25
31
  },
26
32
  settings: {
27
- ...reactPlugin.configs.flat.recommended.settings
33
+ ...reactPlugin.configs.flat.recommended.settings,
34
+ react: {
35
+ version: "detect"
36
+ }
28
37
  }
29
38
  };
30
39
 
@@ -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.js'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.js'\n","import { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport reactHooksPlugin from 'eslint-plugin-react-hooks'\n\nexport const reactConfig: Linter.FlatConfig = {\n plugins: {\n ...reactPlugin.configs.flat.recommended.plugins,\n 'react-hooks': reactHooksPlugin,\n },\n files: ['*.tsx'],\n rules: {\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-hooks/rules-of-hooks': 'error',\n 'import/no-nodejs-modules': ['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 },\n}\n"],"mappings":";AAAA,SAAS,UAAU,gBAAgB;;;ACCnC,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAEtB,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,eAAe;AAAA,EACjB;AAAA,EACA,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,8BAA8B;AAAA,IAC9B,4BAA4B,CAAC,OAAO;AAAA,IACpC,+BAA+B;AAAA,MAC7B;AAAA,MACA;AAAA,QACE,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,oBAAoB,CAAC,KAAK;AAAA,IAC1B,4BAA4B,CAAC,MAAM;AAAA,EACrC;AAAA,EACA,UAAU;AAAA,IACR,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA,EAC1C;AACF;;;ADrBO,IAAM,SAA8B,CAAC,GAAG,UAAU,WAAW;","names":[]}
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.js'\n\nexport const config: Linter.FlatConfig[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.js'\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,SAAS,UAAU,gBAAgB;;;ACCnC,OAAO,iBAAiB;AAExB,OAAO,aAAa;AAEb,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,OAAO;AAAA;AAAA,EAET;AAAA,EACA,OAAO,CAAC,wCAAwC;AAAA,EAChD,iBAAiB;AAAA,IACf,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,SAAS;AAAA,MACP,GAAG,QAAQ;AAAA,MACX,GAAG,QAAQ;AAAA,IACb;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQxC,oBAAoB,CAAC,KAAK;AAAA,IAC1B,4BAA4B,CAAC,MAAM;AAAA,EACrC;AAAA,EACA,UAAU;AAAA,IACR,GAAG,YAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;AD/BO,IAAM,SAA8B,CAAC,GAAG,UAAU,WAAW;","names":[]}
@@ -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;AAI/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAsBhC,CAAA"}
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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAsBhC,CAAA"}
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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAsBhC,CAAA"}
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"}
package/package.json CHANGED
@@ -10,14 +10,15 @@
10
10
  "url": "https://github.com/xylabs/eslint-config/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/eslint-config-flat": "^3.13.7",
13
+ "@xylabs/eslint-config-flat": "^3.13.9",
14
14
  "eslint-plugin-react": "^7.34.4",
15
- "eslint-plugin-react-hooks": "^4.6.2"
15
+ "eslint-plugin-react-hooks": "^4.6.2",
16
+ "globals": "^15.8.0"
16
17
  },
17
18
  "description": "ESLint Config used throughout XY Labs TypeScript/JavaScript libraries and react projects",
18
19
  "devDependencies": {
19
- "@xylabs/ts-scripts-yarn3": "^3.13.7",
20
- "@xylabs/tsconfig": "^3.13.7",
20
+ "@xylabs/ts-scripts-yarn3": "^3.13.9",
21
+ "@xylabs/tsconfig": "^3.13.9",
21
22
  "eslint": "^9.7.0",
22
23
  "typescript": "^5.5.3"
23
24
  },
@@ -61,6 +62,6 @@
61
62
  "url": "https://github.com/xylabs/config.git"
62
63
  },
63
64
  "sideEffects": false,
64
- "version": "3.13.7",
65
+ "version": "3.13.9",
65
66
  "type": "module"
66
67
  }
@@ -1,27 +1,37 @@
1
1
  import { Linter } from 'eslint'
2
2
  import reactPlugin from 'eslint-plugin-react'
3
- import reactHooksPlugin from 'eslint-plugin-react-hooks'
3
+ //import reactHooksPlugin from 'eslint-plugin-react-hooks'
4
+ import globals from 'globals'
4
5
 
5
6
  export const reactConfig: Linter.FlatConfig = {
6
7
  plugins: {
7
- ...reactPlugin.configs.flat.recommended.plugins,
8
- 'react-hooks': reactHooksPlugin,
8
+ react: reactPlugin,
9
+ //'react-hooks': reactHooksPlugin,
10
+ },
11
+ files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
12
+ languageOptions: {
13
+ ...reactPlugin.configs.flat.recommended.languageOptions,
14
+ globals: {
15
+ ...globals.serviceworker,
16
+ ...globals.browser,
17
+ },
9
18
  },
10
- files: ['*.tsx'],
11
19
  rules: {
12
20
  ...reactPlugin.configs.flat.recommended.rules,
13
- 'react-hooks/rules-of-hooks': 'error',
14
- 'import/no-nodejs-modules': ['error'],
21
+ /*'react-hooks/rules-of-hooks': 'error',
15
22
  'react-hooks/exhaustive-deps': [
16
23
  'warn',
17
24
  {
18
25
  additionalHooks: '(useAsyncEffect|usePromise)',
19
26
  },
20
- ],
27
+ ],*/
21
28
  'react/prop-types': ['off'],
22
29
  'react/react-in-jsx-scope': ['warn'],
23
30
  },
24
31
  settings: {
25
32
  ...reactPlugin.configs.flat.recommended.settings,
33
+ react: {
34
+ version: 'detect',
35
+ },
26
36
  },
27
37
  }