@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.
- package/dist/neutral/index.cjs +4 -41
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.mjs +4 -41
- 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 -41
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.mjs +4 -41
- 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,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
|
-
"**/*.{
|
|
44
|
+
"**/*.{ts,tsx}"
|
|
49
45
|
],
|
|
46
|
+
...import_eslint_plugin.default.configs.recommended,
|
|
50
47
|
languageOptions: {
|
|
51
|
-
|
|
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
|
|
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,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
|
-
"**/*.{
|
|
9
|
+
"**/*.{ts,tsx}"
|
|
14
10
|
],
|
|
11
|
+
...reactPlugin.configs.recommended,
|
|
15
12
|
languageOptions: {
|
|
16
|
-
|
|
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
|
|
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,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
|
-
"**/*.{
|
|
44
|
+
"**/*.{ts,tsx}"
|
|
49
45
|
],
|
|
46
|
+
...import_eslint_plugin.default.configs.recommended,
|
|
50
47
|
languageOptions: {
|
|
51
|
-
|
|
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
|
|
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,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
|
-
"**/*.{
|
|
9
|
+
"**/*.{ts,tsx}"
|
|
14
10
|
],
|
|
11
|
+
...reactPlugin.configs.recommended,
|
|
15
12
|
languageOptions: {
|
|
16
|
-
|
|
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
|
|
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
|