@xylabs/eslint-config-react-flat 3.13.7 → 3.13.8
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/neutral/index.cjs +10 -3
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.js +10 -3
- package/dist/neutral/index.js.map +1 -1
- package/dist/neutral/react/index.d.cts.map +1 -1
- package/dist/neutral/react/index.d.mts.map +1 -1
- package/dist/neutral/react/index.d.ts.map +1 -1
- package/dist/node/index.cjs +10 -3
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +10 -3
- package/dist/node/index.js.map +1 -1
- package/dist/node/react/index.d.cts.map +1 -1
- package/dist/node/react/index.d.mts.map +1 -1
- package/dist/node/react/index.d.ts.map +1 -1
- package/package.json +6 -5
- package/src/react/index.ts +10 -3
package/dist/neutral/index.cjs
CHANGED
|
@@ -39,16 +39,23 @@ var import_eslint_config_flat = require("@xylabs/eslint-config-flat");
|
|
|
39
39
|
// src/react/index.ts
|
|
40
40
|
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
|
|
41
41
|
var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
|
|
42
|
+
var import_globals = __toESM(require("globals"), 1);
|
|
42
43
|
var reactConfig = {
|
|
43
44
|
plugins: {
|
|
44
|
-
|
|
45
|
+
react: import_eslint_plugin_react.default,
|
|
45
46
|
"react-hooks": import_eslint_plugin_react_hooks.default
|
|
46
47
|
},
|
|
47
|
-
files: ["
|
|
48
|
+
files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
|
|
49
|
+
languageOptions: {
|
|
50
|
+
...import_eslint_plugin_react.default.configs.flat.recommended.languageOptions,
|
|
51
|
+
globals: {
|
|
52
|
+
...import_globals.default.serviceworker,
|
|
53
|
+
...import_globals.default.browser
|
|
54
|
+
}
|
|
55
|
+
},
|
|
48
56
|
rules: {
|
|
49
57
|
...import_eslint_plugin_react.default.configs.flat.recommended.rules,
|
|
50
58
|
"react-hooks/rules-of-hooks": "error",
|
|
51
|
-
"import/no-nodejs-modules": ["error"],
|
|
52
59
|
"react-hooks/exhaustive-deps": [
|
|
53
60
|
"warn",
|
|
54
61
|
{
|
|
@@ -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
|
|
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'\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 },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;;;ACCnC,iCAAwB;AACxB,uCAA6B;AAC7B,qBAAoB;AAEb,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,OAAO,2BAAAA;AAAA,IACP,eAAe,iCAAAC;AAAA,EACjB;AAAA,EACA,OAAO,CAAC,wCAAwC;AAAA,EAChD,iBAAiB;AAAA,IACf,GAAG,2BAAAD,QAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,SAAS;AAAA,MACP,GAAG,eAAAE,QAAQ;AAAA,MACX,GAAG,eAAAA,QAAQ;AAAA,IACb;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL,GAAG,2BAAAF,QAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,8BAA8B;AAAA,IAC9B,+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;;;AD5BO,IAAM,SAA8B,CAAC,GAAG,0BAAAG,QAAU,WAAW;","names":["reactPlugin","reactHooksPlugin","globals","xyConfig"]}
|
package/dist/neutral/index.js
CHANGED
|
@@ -4,16 +4,23 @@ import { config as xyConfig } from "@xylabs/eslint-config-flat";
|
|
|
4
4
|
// src/react/index.ts
|
|
5
5
|
import reactPlugin from "eslint-plugin-react";
|
|
6
6
|
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
7
|
+
import globals from "globals";
|
|
7
8
|
var reactConfig = {
|
|
8
9
|
plugins: {
|
|
9
|
-
|
|
10
|
+
react: reactPlugin,
|
|
10
11
|
"react-hooks": reactHooksPlugin
|
|
11
12
|
},
|
|
12
|
-
files: ["
|
|
13
|
+
files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
|
|
14
|
+
languageOptions: {
|
|
15
|
+
...reactPlugin.configs.flat.recommended.languageOptions,
|
|
16
|
+
globals: {
|
|
17
|
+
...globals.serviceworker,
|
|
18
|
+
...globals.browser
|
|
19
|
+
}
|
|
20
|
+
},
|
|
13
21
|
rules: {
|
|
14
22
|
...reactPlugin.configs.flat.recommended.rules,
|
|
15
23
|
"react-hooks/rules-of-hooks": "error",
|
|
16
|
-
"import/no-nodejs-modules": ["error"],
|
|
17
24
|
"react-hooks/exhaustive-deps": [
|
|
18
25
|
"warn",
|
|
19
26
|
{
|
|
@@ -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
|
|
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'\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 },\n}\n"],"mappings":";AAAA,SAAS,UAAU,gBAAgB;;;ACCnC,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAC7B,OAAO,aAAa;AAEb,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,OAAO;AAAA,IACP,eAAe;AAAA,EACjB;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,IACxC,8BAA8B;AAAA,IAC9B,+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;;;AD5BO,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;
|
|
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,UA4BhC,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;
|
|
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,UA4BhC,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;
|
|
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,UA4BhC,CAAA"}
|
package/dist/node/index.cjs
CHANGED
|
@@ -39,16 +39,23 @@ var import_eslint_config_flat = require("@xylabs/eslint-config-flat");
|
|
|
39
39
|
// src/react/index.ts
|
|
40
40
|
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
|
|
41
41
|
var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
|
|
42
|
+
var import_globals = __toESM(require("globals"), 1);
|
|
42
43
|
var reactConfig = {
|
|
43
44
|
plugins: {
|
|
44
|
-
|
|
45
|
+
react: import_eslint_plugin_react.default,
|
|
45
46
|
"react-hooks": import_eslint_plugin_react_hooks.default
|
|
46
47
|
},
|
|
47
|
-
files: ["
|
|
48
|
+
files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
|
|
49
|
+
languageOptions: {
|
|
50
|
+
...import_eslint_plugin_react.default.configs.flat.recommended.languageOptions,
|
|
51
|
+
globals: {
|
|
52
|
+
...import_globals.default.serviceworker,
|
|
53
|
+
...import_globals.default.browser
|
|
54
|
+
}
|
|
55
|
+
},
|
|
48
56
|
rules: {
|
|
49
57
|
...import_eslint_plugin_react.default.configs.flat.recommended.rules,
|
|
50
58
|
"react-hooks/rules-of-hooks": "error",
|
|
51
|
-
"import/no-nodejs-modules": ["error"],
|
|
52
59
|
"react-hooks/exhaustive-deps": [
|
|
53
60
|
"warn",
|
|
54
61
|
{
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -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
|
|
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'\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 },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;;;ACCnC,iCAAwB;AACxB,uCAA6B;AAC7B,qBAAoB;AAEb,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,OAAO,2BAAAA;AAAA,IACP,eAAe,iCAAAC;AAAA,EACjB;AAAA,EACA,OAAO,CAAC,wCAAwC;AAAA,EAChD,iBAAiB;AAAA,IACf,GAAG,2BAAAD,QAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,SAAS;AAAA,MACP,GAAG,eAAAE,QAAQ;AAAA,MACX,GAAG,eAAAA,QAAQ;AAAA,IACb;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL,GAAG,2BAAAF,QAAY,QAAQ,KAAK,YAAY;AAAA,IACxC,8BAA8B;AAAA,IAC9B,+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;;;AD5BO,IAAM,SAA8B,CAAC,GAAG,0BAAAG,QAAU,WAAW;","names":["reactPlugin","reactHooksPlugin","globals","xyConfig"]}
|
package/dist/node/index.js
CHANGED
|
@@ -4,16 +4,23 @@ import { config as xyConfig } from "@xylabs/eslint-config-flat";
|
|
|
4
4
|
// src/react/index.ts
|
|
5
5
|
import reactPlugin from "eslint-plugin-react";
|
|
6
6
|
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
7
|
+
import globals from "globals";
|
|
7
8
|
var reactConfig = {
|
|
8
9
|
plugins: {
|
|
9
|
-
|
|
10
|
+
react: reactPlugin,
|
|
10
11
|
"react-hooks": reactHooksPlugin
|
|
11
12
|
},
|
|
12
|
-
files: ["
|
|
13
|
+
files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
|
|
14
|
+
languageOptions: {
|
|
15
|
+
...reactPlugin.configs.flat.recommended.languageOptions,
|
|
16
|
+
globals: {
|
|
17
|
+
...globals.serviceworker,
|
|
18
|
+
...globals.browser
|
|
19
|
+
}
|
|
20
|
+
},
|
|
13
21
|
rules: {
|
|
14
22
|
...reactPlugin.configs.flat.recommended.rules,
|
|
15
23
|
"react-hooks/rules-of-hooks": "error",
|
|
16
|
-
"import/no-nodejs-modules": ["error"],
|
|
17
24
|
"react-hooks/exhaustive-deps": [
|
|
18
25
|
"warn",
|
|
19
26
|
{
|
package/dist/node/index.js.map
CHANGED
|
@@ -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
|
|
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'\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 },\n}\n"],"mappings":";AAAA,SAAS,UAAU,gBAAgB;;;ACCnC,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAC7B,OAAO,aAAa;AAEb,IAAM,cAAiC;AAAA,EAC5C,SAAS;AAAA,IACP,OAAO;AAAA,IACP,eAAe;AAAA,EACjB;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,IACxC,8BAA8B;AAAA,IAC9B,+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;;;AD5BO,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;
|
|
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,UA4BhC,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;
|
|
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,UA4BhC,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;
|
|
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,UA4BhC,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.
|
|
13
|
+
"@xylabs/eslint-config-flat": "^3.13.8",
|
|
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.
|
|
20
|
-
"@xylabs/tsconfig": "^3.13.
|
|
20
|
+
"@xylabs/ts-scripts-yarn3": "^3.13.8",
|
|
21
|
+
"@xylabs/tsconfig": "^3.13.8",
|
|
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.
|
|
65
|
+
"version": "3.13.8",
|
|
65
66
|
"type": "module"
|
|
66
67
|
}
|
package/src/react/index.ts
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { Linter } from 'eslint'
|
|
2
2
|
import reactPlugin from 'eslint-plugin-react'
|
|
3
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
|
-
|
|
8
|
+
react: reactPlugin,
|
|
8
9
|
'react-hooks': reactHooksPlugin,
|
|
9
10
|
},
|
|
10
|
-
files: ['
|
|
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
|
+
},
|
|
18
|
+
},
|
|
11
19
|
rules: {
|
|
12
20
|
...reactPlugin.configs.flat.recommended.rules,
|
|
13
21
|
'react-hooks/rules-of-hooks': 'error',
|
|
14
|
-
'import/no-nodejs-modules': ['error'],
|
|
15
22
|
'react-hooks/exhaustive-deps': [
|
|
16
23
|
'warn',
|
|
17
24
|
{
|