@xylabs/eslint-config-react-flat 3.15.13 → 3.15.15
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 +33 -1
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.mjs +35 -3
- package/dist/neutral/index.mjs.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 +33 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +35 -3
- package/dist/node/index.mjs.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 +5 -4
- package/src/react/index.ts +32 -2
- package/src/types.d.ts +3 -0
package/dist/neutral/index.cjs
CHANGED
|
@@ -39,13 +39,45 @@ var import_eslint_config_flat = require("@xylabs/eslint-config-flat");
|
|
|
39
39
|
// src/react/index.ts
|
|
40
40
|
var import_eslint_plugin = __toESM(require("@eslint-react/eslint-plugin"), 1);
|
|
41
41
|
var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
|
|
42
|
+
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
|
|
43
|
+
var import_globals = __toESM(require("globals"), 1);
|
|
42
44
|
var reactConfig = {
|
|
43
45
|
files: [
|
|
44
46
|
"**/*.{ts,tsx}"
|
|
45
47
|
],
|
|
46
48
|
...import_eslint_plugin.default.configs.recommended,
|
|
49
|
+
plugins: {
|
|
50
|
+
react: import_eslint_plugin_react.default,
|
|
51
|
+
...import_eslint_plugin.default.configs.recommended.plugins
|
|
52
|
+
},
|
|
53
|
+
settings: {
|
|
54
|
+
react: {
|
|
55
|
+
version: "detect"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
47
58
|
languageOptions: {
|
|
48
|
-
parser: import_parser.default
|
|
59
|
+
parser: import_parser.default,
|
|
60
|
+
parserOptions: {
|
|
61
|
+
ecmaFeatures: {
|
|
62
|
+
jsx: true
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
globals: {
|
|
66
|
+
...import_globals.default.browser
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
rules: {
|
|
70
|
+
...import_eslint_plugin.default.configs.recommended.rules,
|
|
71
|
+
...import_eslint_plugin_react.default.configs.flat.recommended.rules,
|
|
72
|
+
"react-hooks/exhaustive-deps": [
|
|
73
|
+
"warn",
|
|
74
|
+
{
|
|
75
|
+
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"react/prop-types": [
|
|
79
|
+
"off"
|
|
80
|
+
]
|
|
49
81
|
}
|
|
50
82
|
};
|
|
51
83
|
|
|
@@ -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
|
|
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 eslintReactPlugin from '@eslint-react/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\nimport { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport globals from 'globals'\n\nexport const reactConfig = {\n files: ['**/*.{ts,tsx}'],\n ...eslintReactPlugin.configs.recommended,\n plugins: {\n react: reactPlugin,\n ...eslintReactPlugin.configs.recommended.plugins,\n },\n settings: {\n react: {\n version: 'detect',\n },\n },\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n globals: {\n ...globals.browser,\n },\n },\n rules: {\n ...eslintReactPlugin.configs.recommended.rules,\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ],\n 'react/prop-types': ['off'],\n },\n} as unknown as Linter.Config\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;gCAAmC;;;ACAnC,2BAA8B;AAC9B,oBAAqB;AAErB,iCAAwB;AACxB,qBAAoB;AAEb,IAAMA,cAAc;EACzBC,OAAO;IAAC;;EACR,GAAGC,qBAAAA,QAAkBC,QAAQC;EAC7BC,SAAS;IACPC,OAAOC,2BAAAA;IACP,GAAGL,qBAAAA,QAAkBC,QAAQC,YAAYC;EAC3C;EACAG,UAAU;IACRF,OAAO;MACLG,SAAS;IACX;EACF;EACAC,iBAAiB;IACfC,QAAQC,cAAAA;IACRC,eAAe;MACbC,cAAc;QACZC,KAAK;MACP;IACF;IACAC,SAAS;MACP,GAAGA,eAAAA,QAAQC;IACb;EACF;EACAC,OAAO;IACL,GAAGhB,qBAAAA,QAAkBC,QAAQC,YAAYc;IACzC,GAAGX,2BAAAA,QAAYJ,QAAQgB,KAAKf,YAAYc;IACxC,+BAA+B;MAC7B;MACA;QACEE,iBAAiB;MACnB;;IAEF,oBAAoB;MAAC;;EACvB;AACF;;;ADnCO,IAAMC,SAA0B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","files","eslintReactPlugin","configs","recommended","plugins","react","reactPlugin","settings","version","languageOptions","parser","tsParser","parserOptions","ecmaFeatures","jsx","globals","browser","rules","flat","additionalHooks","config","xyConfig","reactConfig"]}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -2,15 +2,47 @@
|
|
|
2
2
|
import { config as xyConfig } from "@xylabs/eslint-config-flat";
|
|
3
3
|
|
|
4
4
|
// src/react/index.ts
|
|
5
|
-
import
|
|
5
|
+
import eslintReactPlugin from "@eslint-react/eslint-plugin";
|
|
6
6
|
import tsParser from "@typescript-eslint/parser";
|
|
7
|
+
import reactPlugin from "eslint-plugin-react";
|
|
8
|
+
import globals from "globals";
|
|
7
9
|
var reactConfig = {
|
|
8
10
|
files: [
|
|
9
11
|
"**/*.{ts,tsx}"
|
|
10
12
|
],
|
|
11
|
-
...
|
|
13
|
+
...eslintReactPlugin.configs.recommended,
|
|
14
|
+
plugins: {
|
|
15
|
+
react: reactPlugin,
|
|
16
|
+
...eslintReactPlugin.configs.recommended.plugins
|
|
17
|
+
},
|
|
18
|
+
settings: {
|
|
19
|
+
react: {
|
|
20
|
+
version: "detect"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
12
23
|
languageOptions: {
|
|
13
|
-
parser: tsParser
|
|
24
|
+
parser: tsParser,
|
|
25
|
+
parserOptions: {
|
|
26
|
+
ecmaFeatures: {
|
|
27
|
+
jsx: true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
globals: {
|
|
31
|
+
...globals.browser
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
rules: {
|
|
35
|
+
...eslintReactPlugin.configs.recommended.rules,
|
|
36
|
+
...reactPlugin.configs.flat.recommended.rules,
|
|
37
|
+
"react-hooks/exhaustive-deps": [
|
|
38
|
+
"warn",
|
|
39
|
+
{
|
|
40
|
+
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"react/prop-types": [
|
|
44
|
+
"off"
|
|
45
|
+
]
|
|
14
46
|
}
|
|
15
47
|
};
|
|
16
48
|
|
|
@@ -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
|
|
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 eslintReactPlugin from '@eslint-react/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\nimport { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport globals from 'globals'\n\nexport const reactConfig = {\n files: ['**/*.{ts,tsx}'],\n ...eslintReactPlugin.configs.recommended,\n plugins: {\n react: reactPlugin,\n ...eslintReactPlugin.configs.recommended.plugins,\n },\n settings: {\n react: {\n version: 'detect',\n },\n },\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n globals: {\n ...globals.browser,\n },\n },\n rules: {\n ...eslintReactPlugin.configs.recommended.rules,\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ],\n 'react/prop-types': ['off'],\n },\n} as unknown as Linter.Config\n"],"mappings":";AAAA,SAASA,UAAUC,gBAAgB;;;ACAnC,OAAOC,uBAAuB;AAC9B,OAAOC,cAAc;AAErB,OAAOC,iBAAiB;AACxB,OAAOC,aAAa;AAEb,IAAMC,cAAc;EACzBC,OAAO;IAAC;;EACR,GAAGL,kBAAkBM,QAAQC;EAC7BC,SAAS;IACPC,OAAOP;IACP,GAAGF,kBAAkBM,QAAQC,YAAYC;EAC3C;EACAE,UAAU;IACRD,OAAO;MACLE,SAAS;IACX;EACF;EACAC,iBAAiB;IACfC,QAAQZ;IACRa,eAAe;MACbC,cAAc;QACZC,KAAK;MACP;IACF;IACAb,SAAS;MACP,GAAGA,QAAQc;IACb;EACF;EACAC,OAAO;IACL,GAAGlB,kBAAkBM,QAAQC,YAAYW;IACzC,GAAGhB,YAAYI,QAAQa,KAAKZ,YAAYW;IACxC,+BAA+B;MAC7B;MACA;QACEE,iBAAiB;MACnB;;IAEF,oBAAoB;MAAC;;EACvB;AACF;;;ADnCO,IAAMC,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","eslintReactPlugin","tsParser","reactPlugin","globals","reactConfig","files","configs","recommended","plugins","react","settings","version","languageOptions","parser","parserOptions","ecmaFeatures","jsx","browser","rules","flat","additionalHooks","config","xyConfig","reactConfig"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAkCR,MAAM,CAAC,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAkCR,MAAM,CAAC,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAkCR,MAAM,CAAC,MAAM,CAAA"}
|
package/dist/node/index.cjs
CHANGED
|
@@ -39,13 +39,45 @@ var import_eslint_config_flat = require("@xylabs/eslint-config-flat");
|
|
|
39
39
|
// src/react/index.ts
|
|
40
40
|
var import_eslint_plugin = __toESM(require("@eslint-react/eslint-plugin"), 1);
|
|
41
41
|
var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
|
|
42
|
+
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
|
|
43
|
+
var import_globals = __toESM(require("globals"), 1);
|
|
42
44
|
var reactConfig = {
|
|
43
45
|
files: [
|
|
44
46
|
"**/*.{ts,tsx}"
|
|
45
47
|
],
|
|
46
48
|
...import_eslint_plugin.default.configs.recommended,
|
|
49
|
+
plugins: {
|
|
50
|
+
react: import_eslint_plugin_react.default,
|
|
51
|
+
...import_eslint_plugin.default.configs.recommended.plugins
|
|
52
|
+
},
|
|
53
|
+
settings: {
|
|
54
|
+
react: {
|
|
55
|
+
version: "detect"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
47
58
|
languageOptions: {
|
|
48
|
-
parser: import_parser.default
|
|
59
|
+
parser: import_parser.default,
|
|
60
|
+
parserOptions: {
|
|
61
|
+
ecmaFeatures: {
|
|
62
|
+
jsx: true
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
globals: {
|
|
66
|
+
...import_globals.default.browser
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
rules: {
|
|
70
|
+
...import_eslint_plugin.default.configs.recommended.rules,
|
|
71
|
+
...import_eslint_plugin_react.default.configs.flat.recommended.rules,
|
|
72
|
+
"react-hooks/exhaustive-deps": [
|
|
73
|
+
"warn",
|
|
74
|
+
{
|
|
75
|
+
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"react/prop-types": [
|
|
79
|
+
"off"
|
|
80
|
+
]
|
|
49
81
|
}
|
|
50
82
|
};
|
|
51
83
|
|
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.ts'\n\nexport const config: Linter.Config[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.ts'\n","import
|
|
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 eslintReactPlugin from '@eslint-react/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\nimport { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport globals from 'globals'\n\nexport const reactConfig = {\n files: ['**/*.{ts,tsx}'],\n ...eslintReactPlugin.configs.recommended,\n plugins: {\n react: reactPlugin,\n ...eslintReactPlugin.configs.recommended.plugins,\n },\n settings: {\n react: {\n version: 'detect',\n },\n },\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n globals: {\n ...globals.browser,\n },\n },\n rules: {\n ...eslintReactPlugin.configs.recommended.rules,\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ],\n 'react/prop-types': ['off'],\n },\n} as unknown as Linter.Config\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;gCAAmC;;;ACAnC,2BAA8B;AAC9B,oBAAqB;AAErB,iCAAwB;AACxB,qBAAoB;AAEb,IAAMA,cAAc;EACzBC,OAAO;IAAC;;EACR,GAAGC,qBAAAA,QAAkBC,QAAQC;EAC7BC,SAAS;IACPC,OAAOC,2BAAAA;IACP,GAAGL,qBAAAA,QAAkBC,QAAQC,YAAYC;EAC3C;EACAG,UAAU;IACRF,OAAO;MACLG,SAAS;IACX;EACF;EACAC,iBAAiB;IACfC,QAAQC,cAAAA;IACRC,eAAe;MACbC,cAAc;QACZC,KAAK;MACP;IACF;IACAC,SAAS;MACP,GAAGA,eAAAA,QAAQC;IACb;EACF;EACAC,OAAO;IACL,GAAGhB,qBAAAA,QAAkBC,QAAQC,YAAYc;IACzC,GAAGX,2BAAAA,QAAYJ,QAAQgB,KAAKf,YAAYc;IACxC,+BAA+B;MAC7B;MACA;QACEE,iBAAiB;MACnB;;IAEF,oBAAoB;MAAC;;EACvB;AACF;;;ADnCO,IAAMC,SAA0B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","files","eslintReactPlugin","configs","recommended","plugins","react","reactPlugin","settings","version","languageOptions","parser","tsParser","parserOptions","ecmaFeatures","jsx","globals","browser","rules","flat","additionalHooks","config","xyConfig","reactConfig"]}
|
package/dist/node/index.mjs
CHANGED
|
@@ -2,15 +2,47 @@
|
|
|
2
2
|
import { config as xyConfig } from "@xylabs/eslint-config-flat";
|
|
3
3
|
|
|
4
4
|
// src/react/index.ts
|
|
5
|
-
import
|
|
5
|
+
import eslintReactPlugin from "@eslint-react/eslint-plugin";
|
|
6
6
|
import tsParser from "@typescript-eslint/parser";
|
|
7
|
+
import reactPlugin from "eslint-plugin-react";
|
|
8
|
+
import globals from "globals";
|
|
7
9
|
var reactConfig = {
|
|
8
10
|
files: [
|
|
9
11
|
"**/*.{ts,tsx}"
|
|
10
12
|
],
|
|
11
|
-
...
|
|
13
|
+
...eslintReactPlugin.configs.recommended,
|
|
14
|
+
plugins: {
|
|
15
|
+
react: reactPlugin,
|
|
16
|
+
...eslintReactPlugin.configs.recommended.plugins
|
|
17
|
+
},
|
|
18
|
+
settings: {
|
|
19
|
+
react: {
|
|
20
|
+
version: "detect"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
12
23
|
languageOptions: {
|
|
13
|
-
parser: tsParser
|
|
24
|
+
parser: tsParser,
|
|
25
|
+
parserOptions: {
|
|
26
|
+
ecmaFeatures: {
|
|
27
|
+
jsx: true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
globals: {
|
|
31
|
+
...globals.browser
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
rules: {
|
|
35
|
+
...eslintReactPlugin.configs.recommended.rules,
|
|
36
|
+
...reactPlugin.configs.flat.recommended.rules,
|
|
37
|
+
"react-hooks/exhaustive-deps": [
|
|
38
|
+
"warn",
|
|
39
|
+
{
|
|
40
|
+
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"react/prop-types": [
|
|
44
|
+
"off"
|
|
45
|
+
]
|
|
14
46
|
}
|
|
15
47
|
};
|
|
16
48
|
|
package/dist/node/index.mjs.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.ts'\n\nexport const config: Linter.Config[] = [...xyConfig, reactConfig]\n\nexport { reactConfig } from './react/index.ts'\n","import
|
|
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 eslintReactPlugin from '@eslint-react/eslint-plugin'\nimport tsParser from '@typescript-eslint/parser'\nimport { Linter } from 'eslint'\nimport reactPlugin from 'eslint-plugin-react'\nimport globals from 'globals'\n\nexport const reactConfig = {\n files: ['**/*.{ts,tsx}'],\n ...eslintReactPlugin.configs.recommended,\n plugins: {\n react: reactPlugin,\n ...eslintReactPlugin.configs.recommended.plugins,\n },\n settings: {\n react: {\n version: 'detect',\n },\n },\n languageOptions: {\n parser: tsParser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n globals: {\n ...globals.browser,\n },\n },\n rules: {\n ...eslintReactPlugin.configs.recommended.rules,\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-hooks/exhaustive-deps': [\n 'warn',\n {\n additionalHooks: '(useAsyncEffect|usePromise)',\n },\n ],\n 'react/prop-types': ['off'],\n },\n} as unknown as Linter.Config\n"],"mappings":";AAAA,SAASA,UAAUC,gBAAgB;;;ACAnC,OAAOC,uBAAuB;AAC9B,OAAOC,cAAc;AAErB,OAAOC,iBAAiB;AACxB,OAAOC,aAAa;AAEb,IAAMC,cAAc;EACzBC,OAAO;IAAC;;EACR,GAAGL,kBAAkBM,QAAQC;EAC7BC,SAAS;IACPC,OAAOP;IACP,GAAGF,kBAAkBM,QAAQC,YAAYC;EAC3C;EACAE,UAAU;IACRD,OAAO;MACLE,SAAS;IACX;EACF;EACAC,iBAAiB;IACfC,QAAQZ;IACRa,eAAe;MACbC,cAAc;QACZC,KAAK;MACP;IACF;IACAb,SAAS;MACP,GAAGA,QAAQc;IACb;EACF;EACAC,OAAO;IACL,GAAGlB,kBAAkBM,QAAQC,YAAYW;IACzC,GAAGhB,YAAYI,QAAQa,KAAKZ,YAAYW;IACxC,+BAA+B;MAC7B;MACA;QACEE,iBAAiB;MACnB;;IAEF,oBAAoB;MAAC;;EACvB;AACF;;;ADnCO,IAAMC,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","eslintReactPlugin","tsParser","reactPlugin","globals","reactConfig","files","configs","recommended","plugins","react","settings","version","languageOptions","parser","parserOptions","ecmaFeatures","jsx","browser","rules","flat","additionalHooks","config","xyConfig","reactConfig"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAkCR,MAAM,CAAC,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAkCR,MAAM,CAAC,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,WAAW,EAkCR,MAAM,CAAC,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -11,13 +11,14 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@eslint-react/eslint-plugin": "^1.8.2",
|
|
14
|
-
"@xylabs/eslint-config-flat": "^3.15.
|
|
14
|
+
"@xylabs/eslint-config-flat": "^3.15.15",
|
|
15
|
+
"eslint-plugin-react": "^7.35.0",
|
|
15
16
|
"globals": "^15.9.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.15.
|
|
20
|
-
"@xylabs/tsconfig": "^3.15.
|
|
20
|
+
"@xylabs/ts-scripts-yarn3": "^3.15.15",
|
|
21
|
+
"@xylabs/tsconfig": "^3.15.15",
|
|
21
22
|
"eslint": "^9.8.0",
|
|
22
23
|
"typescript": "^5.5.4"
|
|
23
24
|
},
|
|
@@ -61,6 +62,6 @@
|
|
|
61
62
|
"url": "https://github.com/xylabs/config.git"
|
|
62
63
|
},
|
|
63
64
|
"sideEffects": false,
|
|
64
|
-
"version": "3.15.
|
|
65
|
+
"version": "3.15.15",
|
|
65
66
|
"type": "module"
|
|
66
67
|
}
|
package/src/react/index.ts
CHANGED
|
@@ -1,11 +1,41 @@
|
|
|
1
|
-
import
|
|
1
|
+
import eslintReactPlugin from '@eslint-react/eslint-plugin'
|
|
2
2
|
import tsParser from '@typescript-eslint/parser'
|
|
3
3
|
import { Linter } from 'eslint'
|
|
4
|
+
import reactPlugin from 'eslint-plugin-react'
|
|
5
|
+
import globals from 'globals'
|
|
4
6
|
|
|
5
7
|
export const reactConfig = {
|
|
6
8
|
files: ['**/*.{ts,tsx}'],
|
|
7
|
-
...
|
|
9
|
+
...eslintReactPlugin.configs.recommended,
|
|
10
|
+
plugins: {
|
|
11
|
+
react: reactPlugin,
|
|
12
|
+
...eslintReactPlugin.configs.recommended.plugins,
|
|
13
|
+
},
|
|
14
|
+
settings: {
|
|
15
|
+
react: {
|
|
16
|
+
version: 'detect',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
8
19
|
languageOptions: {
|
|
9
20
|
parser: tsParser,
|
|
21
|
+
parserOptions: {
|
|
22
|
+
ecmaFeatures: {
|
|
23
|
+
jsx: true,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
globals: {
|
|
27
|
+
...globals.browser,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
rules: {
|
|
31
|
+
...eslintReactPlugin.configs.recommended.rules,
|
|
32
|
+
...reactPlugin.configs.flat.recommended.rules,
|
|
33
|
+
'react-hooks/exhaustive-deps': [
|
|
34
|
+
'warn',
|
|
35
|
+
{
|
|
36
|
+
additionalHooks: '(useAsyncEffect|usePromise)',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
'react/prop-types': ['off'],
|
|
10
40
|
},
|
|
11
41
|
} as unknown as Linter.Config
|
package/src/types.d.ts
ADDED