@xylabs/eslint-config-react-flat 3.15.11 → 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.
- package/dist/neutral/index.cjs +4 -43
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.mjs +4 -43
- 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 +4 -43
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +4 -43
- 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 -6
- package/src/react/index.ts +5 -38
- package/src/types.d.ts +0 -7
package/dist/neutral/index.cjs
CHANGED
|
@@ -37,54 +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_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
|
|
43
|
-
var import_globals = __toESM(require("globals"), 1);
|
|
44
42
|
var reactConfig = {
|
|
45
|
-
plugins: {
|
|
46
|
-
"react": import_eslint_plugin_react.default,
|
|
47
|
-
"react-hooks": import_eslint_plugin_react_hooks.default
|
|
48
|
-
},
|
|
49
43
|
files: [
|
|
50
|
-
"**/*.{
|
|
44
|
+
"**/*.{ts,tsx}"
|
|
51
45
|
],
|
|
46
|
+
...import_eslint_plugin.default.configs.recommended,
|
|
52
47
|
languageOptions: {
|
|
53
|
-
|
|
54
|
-
globals: {
|
|
55
|
-
...import_globals.default.serviceworker,
|
|
56
|
-
...import_globals.default.browser
|
|
57
|
-
},
|
|
58
|
-
parser: import_parser.default,
|
|
59
|
-
parserOptions: {
|
|
60
|
-
ecmaFeatures: {
|
|
61
|
-
modules: true
|
|
62
|
-
},
|
|
63
|
-
ecmaVersion: "latest",
|
|
64
|
-
project: "./tsconfig-eslint.json"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
rules: {
|
|
68
|
-
...import_eslint_plugin_react.default.configs.flat.recommended.rules,
|
|
69
|
-
"react-hooks/rules-of-hooks": "error",
|
|
70
|
-
"react-hooks/exhaustive-deps": [
|
|
71
|
-
"warn",
|
|
72
|
-
{
|
|
73
|
-
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"react/prop-types": [
|
|
77
|
-
"off"
|
|
78
|
-
],
|
|
79
|
-
"react/react-in-jsx-scope": [
|
|
80
|
-
"warn"
|
|
81
|
-
]
|
|
82
|
-
},
|
|
83
|
-
settings: {
|
|
84
|
-
...import_eslint_plugin_react.default.configs.flat.recommended.settings,
|
|
85
|
-
react: {
|
|
86
|
-
version: "detect"
|
|
87
|
-
}
|
|
48
|
+
parser: import_parser.default
|
|
88
49
|
}
|
|
89
50
|
};
|
|
90
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
|
|
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"]}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -2,54 +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 reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
8
|
-
import globals from "globals";
|
|
9
7
|
var reactConfig = {
|
|
10
|
-
plugins: {
|
|
11
|
-
"react": reactPlugin,
|
|
12
|
-
"react-hooks": reactHooksPlugin
|
|
13
|
-
},
|
|
14
8
|
files: [
|
|
15
|
-
"**/*.{
|
|
9
|
+
"**/*.{ts,tsx}"
|
|
16
10
|
],
|
|
11
|
+
...reactPlugin.configs.recommended,
|
|
17
12
|
languageOptions: {
|
|
18
|
-
|
|
19
|
-
globals: {
|
|
20
|
-
...globals.serviceworker,
|
|
21
|
-
...globals.browser
|
|
22
|
-
},
|
|
23
|
-
parser: tsParser,
|
|
24
|
-
parserOptions: {
|
|
25
|
-
ecmaFeatures: {
|
|
26
|
-
modules: true
|
|
27
|
-
},
|
|
28
|
-
ecmaVersion: "latest",
|
|
29
|
-
project: "./tsconfig-eslint.json"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
rules: {
|
|
33
|
-
...reactPlugin.configs.flat.recommended.rules,
|
|
34
|
-
"react-hooks/rules-of-hooks": "error",
|
|
35
|
-
"react-hooks/exhaustive-deps": [
|
|
36
|
-
"warn",
|
|
37
|
-
{
|
|
38
|
-
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"react/prop-types": [
|
|
42
|
-
"off"
|
|
43
|
-
],
|
|
44
|
-
"react/react-in-jsx-scope": [
|
|
45
|
-
"warn"
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
settings: {
|
|
49
|
-
...reactPlugin.configs.flat.recommended.settings,
|
|
50
|
-
react: {
|
|
51
|
-
version: "detect"
|
|
52
|
-
}
|
|
13
|
+
parser: tsParser
|
|
53
14
|
}
|
|
54
15
|
};
|
|
55
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
|
|
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":"
|
|
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":"
|
|
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":"
|
|
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/dist/node/index.cjs
CHANGED
|
@@ -37,54 +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_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
|
|
43
|
-
var import_globals = __toESM(require("globals"), 1);
|
|
44
42
|
var reactConfig = {
|
|
45
|
-
plugins: {
|
|
46
|
-
"react": import_eslint_plugin_react.default,
|
|
47
|
-
"react-hooks": import_eslint_plugin_react_hooks.default
|
|
48
|
-
},
|
|
49
43
|
files: [
|
|
50
|
-
"**/*.{
|
|
44
|
+
"**/*.{ts,tsx}"
|
|
51
45
|
],
|
|
46
|
+
...import_eslint_plugin.default.configs.recommended,
|
|
52
47
|
languageOptions: {
|
|
53
|
-
|
|
54
|
-
globals: {
|
|
55
|
-
...import_globals.default.serviceworker,
|
|
56
|
-
...import_globals.default.browser
|
|
57
|
-
},
|
|
58
|
-
parser: import_parser.default,
|
|
59
|
-
parserOptions: {
|
|
60
|
-
ecmaFeatures: {
|
|
61
|
-
modules: true
|
|
62
|
-
},
|
|
63
|
-
ecmaVersion: "latest",
|
|
64
|
-
project: "./tsconfig-eslint.json"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
rules: {
|
|
68
|
-
...import_eslint_plugin_react.default.configs.flat.recommended.rules,
|
|
69
|
-
"react-hooks/rules-of-hooks": "error",
|
|
70
|
-
"react-hooks/exhaustive-deps": [
|
|
71
|
-
"warn",
|
|
72
|
-
{
|
|
73
|
-
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"react/prop-types": [
|
|
77
|
-
"off"
|
|
78
|
-
],
|
|
79
|
-
"react/react-in-jsx-scope": [
|
|
80
|
-
"warn"
|
|
81
|
-
]
|
|
82
|
-
},
|
|
83
|
-
settings: {
|
|
84
|
-
...import_eslint_plugin_react.default.configs.flat.recommended.settings,
|
|
85
|
-
react: {
|
|
86
|
-
version: "detect"
|
|
87
|
-
}
|
|
48
|
+
parser: import_parser.default
|
|
88
49
|
}
|
|
89
50
|
};
|
|
90
51
|
|
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 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"]}
|
package/dist/node/index.mjs
CHANGED
|
@@ -2,54 +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 reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
8
|
-
import globals from "globals";
|
|
9
7
|
var reactConfig = {
|
|
10
|
-
plugins: {
|
|
11
|
-
"react": reactPlugin,
|
|
12
|
-
"react-hooks": reactHooksPlugin
|
|
13
|
-
},
|
|
14
8
|
files: [
|
|
15
|
-
"**/*.{
|
|
9
|
+
"**/*.{ts,tsx}"
|
|
16
10
|
],
|
|
11
|
+
...reactPlugin.configs.recommended,
|
|
17
12
|
languageOptions: {
|
|
18
|
-
|
|
19
|
-
globals: {
|
|
20
|
-
...globals.serviceworker,
|
|
21
|
-
...globals.browser
|
|
22
|
-
},
|
|
23
|
-
parser: tsParser,
|
|
24
|
-
parserOptions: {
|
|
25
|
-
ecmaFeatures: {
|
|
26
|
-
modules: true
|
|
27
|
-
},
|
|
28
|
-
ecmaVersion: "latest",
|
|
29
|
-
project: "./tsconfig-eslint.json"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
rules: {
|
|
33
|
-
...reactPlugin.configs.flat.recommended.rules,
|
|
34
|
-
"react-hooks/rules-of-hooks": "error",
|
|
35
|
-
"react-hooks/exhaustive-deps": [
|
|
36
|
-
"warn",
|
|
37
|
-
{
|
|
38
|
-
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"react/prop-types": [
|
|
42
|
-
"off"
|
|
43
|
-
],
|
|
44
|
-
"react/react-in-jsx-scope": [
|
|
45
|
-
"warn"
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
settings: {
|
|
49
|
-
...reactPlugin.configs.flat.recommended.settings,
|
|
50
|
-
react: {
|
|
51
|
-
version: "detect"
|
|
52
|
-
}
|
|
13
|
+
parser: tsParser
|
|
53
14
|
}
|
|
54
15
|
};
|
|
55
16
|
|
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 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":"
|
|
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":"
|
|
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":"
|
|
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
|
-
"@
|
|
14
|
-
"eslint-
|
|
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.
|
|
21
|
-
"@xylabs/tsconfig": "^3.15.
|
|
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.
|
|
64
|
+
"version": "3.15.12",
|
|
66
65
|
"type": "module"
|
|
67
66
|
}
|
package/src/react/index.ts
CHANGED
|
@@ -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
|
|
8
|
-
|
|
9
|
-
|
|
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
|