@xylabs/eslint-config-react-flat 3.15.9 → 3.15.11
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 +18 -7
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.d.cts +1 -1
- package/dist/neutral/index.d.cts.map +1 -1
- package/dist/neutral/index.d.mts +1 -1
- package/dist/neutral/index.d.mts.map +1 -1
- package/dist/neutral/index.d.ts +1 -1
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +18 -7
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/react/index.d.cts +1 -1
- package/dist/neutral/react/index.d.cts.map +1 -1
- package/dist/neutral/react/index.d.mts +1 -1
- package/dist/neutral/react/index.d.mts.map +1 -1
- package/dist/neutral/react/index.d.ts +1 -1
- package/dist/neutral/react/index.d.ts.map +1 -1
- package/dist/node/index.cjs +18 -7
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +1 -1
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.mts +1 -1
- package/dist/node/index.d.mts.map +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.mjs +18 -7
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/react/index.d.cts +1 -1
- package/dist/node/react/index.d.cts.map +1 -1
- package/dist/node/react/index.d.mts +1 -1
- package/dist/node/react/index.d.mts.map +1 -1
- package/dist/node/react/index.d.ts +1 -1
- package/dist/node/react/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +1 -1
- package/src/react/index.ts +13 -6
package/dist/neutral/index.cjs
CHANGED
|
@@ -37,11 +37,14 @@ 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_parser = __toESM(require("@typescript-eslint/parser"), 1);
|
|
40
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);
|
|
41
43
|
var import_globals = __toESM(require("globals"), 1);
|
|
42
44
|
var reactConfig = {
|
|
43
45
|
plugins: {
|
|
44
|
-
react: import_eslint_plugin_react.default
|
|
46
|
+
"react": import_eslint_plugin_react.default,
|
|
47
|
+
"react-hooks": import_eslint_plugin_react_hooks.default
|
|
45
48
|
},
|
|
46
49
|
files: [
|
|
47
50
|
"**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"
|
|
@@ -51,17 +54,25 @@ var reactConfig = {
|
|
|
51
54
|
globals: {
|
|
52
55
|
...import_globals.default.serviceworker,
|
|
53
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"
|
|
54
65
|
}
|
|
55
66
|
},
|
|
56
67
|
rules: {
|
|
57
68
|
...import_eslint_plugin_react.default.configs.flat.recommended.rules,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
69
|
+
"react-hooks/rules-of-hooks": "error",
|
|
70
|
+
"react-hooks/exhaustive-deps": [
|
|
71
|
+
"warn",
|
|
61
72
|
{
|
|
62
|
-
additionalHooks:
|
|
63
|
-
}
|
|
64
|
-
],
|
|
73
|
+
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
65
76
|
"react/prop-types": [
|
|
66
77
|
"off"
|
|
67
78
|
],
|
|
@@ -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.
|
|
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 tsParser from '@typescript-eslint/parser'\nimport { 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.Config = {\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 parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\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;;;;;;gCAAmC;;;ACAnC,oBAAqB;AAErB,iCAAwB;AACxB,uCAA6B;AAC7B,qBAAoB;AAEb,IAAMA,cAA6B;EACxCC,SAAS;IACP,SAASC,2BAAAA;IACT,eAAeC,iCAAAA;EACjB;EACAC,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGH,2BAAAA,QAAYI,QAAQC,KAAKC,YAAYH;IACxCI,SAAS;MACP,GAAGA,eAAAA,QAAQC;MACX,GAAGD,eAAAA,QAAQE;IACb;IACAC,QAAQC,cAAAA;IACRC,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGjB,2BAAAA,QAAYI,QAAQC,KAAKC,YAAYW;IACxC,8BAA8B;IAC9B,+BAA+B;MAC7B;MACA;QACEC,iBAAiB;MACnB;;IAEF,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGnB,2BAAAA,QAAYI,QAAQC,KAAKC,YAAYa;IACxCC,OAAO;MACLC,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","plugins","reactPlugin","reactHooksPlugin","files","languageOptions","configs","flat","recommended","globals","serviceworker","browser","parser","tsParser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","rules","additionalHooks","settings","react","version","config","xyConfig","reactConfig"]}
|
package/dist/neutral/index.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAA+B,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/neutral/index.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAA+B,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAA+B,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
import { config as xyConfig } from "@xylabs/eslint-config-flat";
|
|
3
3
|
|
|
4
4
|
// src/react/index.ts
|
|
5
|
+
import tsParser from "@typescript-eslint/parser";
|
|
5
6
|
import reactPlugin from "eslint-plugin-react";
|
|
7
|
+
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
6
8
|
import globals from "globals";
|
|
7
9
|
var reactConfig = {
|
|
8
10
|
plugins: {
|
|
9
|
-
react: reactPlugin
|
|
11
|
+
"react": reactPlugin,
|
|
12
|
+
"react-hooks": reactHooksPlugin
|
|
10
13
|
},
|
|
11
14
|
files: [
|
|
12
15
|
"**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"
|
|
@@ -16,17 +19,25 @@ var reactConfig = {
|
|
|
16
19
|
globals: {
|
|
17
20
|
...globals.serviceworker,
|
|
18
21
|
...globals.browser
|
|
22
|
+
},
|
|
23
|
+
parser: tsParser,
|
|
24
|
+
parserOptions: {
|
|
25
|
+
ecmaFeatures: {
|
|
26
|
+
modules: true
|
|
27
|
+
},
|
|
28
|
+
ecmaVersion: "latest",
|
|
29
|
+
project: "./tsconfig-eslint.json"
|
|
19
30
|
}
|
|
20
31
|
},
|
|
21
32
|
rules: {
|
|
22
33
|
...reactPlugin.configs.flat.recommended.rules,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
34
|
+
"react-hooks/rules-of-hooks": "error",
|
|
35
|
+
"react-hooks/exhaustive-deps": [
|
|
36
|
+
"warn",
|
|
26
37
|
{
|
|
27
|
-
additionalHooks:
|
|
28
|
-
}
|
|
29
|
-
],
|
|
38
|
+
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
30
41
|
"react/prop-types": [
|
|
31
42
|
"off"
|
|
32
43
|
],
|
|
@@ -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.
|
|
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 tsParser from '@typescript-eslint/parser'\nimport { 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.Config = {\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 parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\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,SAASA,UAAUC,gBAAgB;;;ACAnC,OAAOC,cAAc;AAErB,OAAOC,iBAAiB;AACxB,OAAOC,sBAAsB;AAC7B,OAAOC,aAAa;AAEb,IAAMC,cAA6B;EACxCC,SAAS;IACP,SAASJ;IACT,eAAeC;EACjB;EACAI,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGN,YAAYO,QAAQC,KAAKC,YAAYH;IACxCJ,SAAS;MACP,GAAGA,QAAQQ;MACX,GAAGR,QAAQS;IACb;IACAC,QAAQb;IACRc,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGlB,YAAYO,QAAQC,KAAKC,YAAYS;IACxC,8BAA8B;IAC9B,+BAA+B;MAC7B;MACA;QACEC,iBAAiB;MACnB;;IAEF,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGpB,YAAYO,QAAQC,KAAKC,YAAYW;IACxCC,OAAO;MACLC,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","tsParser","reactPlugin","reactHooksPlugin","globals","reactConfig","plugins","files","languageOptions","configs","flat","recommended","serviceworker","browser","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","rules","additionalHooks","settings","react","version","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":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAqChC,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":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAqChC,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":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAqChC,CAAA"}
|
package/dist/node/index.cjs
CHANGED
|
@@ -37,11 +37,14 @@ 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_parser = __toESM(require("@typescript-eslint/parser"), 1);
|
|
40
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);
|
|
41
43
|
var import_globals = __toESM(require("globals"), 1);
|
|
42
44
|
var reactConfig = {
|
|
43
45
|
plugins: {
|
|
44
|
-
react: import_eslint_plugin_react.default
|
|
46
|
+
"react": import_eslint_plugin_react.default,
|
|
47
|
+
"react-hooks": import_eslint_plugin_react_hooks.default
|
|
45
48
|
},
|
|
46
49
|
files: [
|
|
47
50
|
"**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"
|
|
@@ -51,17 +54,25 @@ var reactConfig = {
|
|
|
51
54
|
globals: {
|
|
52
55
|
...import_globals.default.serviceworker,
|
|
53
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"
|
|
54
65
|
}
|
|
55
66
|
},
|
|
56
67
|
rules: {
|
|
57
68
|
...import_eslint_plugin_react.default.configs.flat.recommended.rules,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
69
|
+
"react-hooks/rules-of-hooks": "error",
|
|
70
|
+
"react-hooks/exhaustive-deps": [
|
|
71
|
+
"warn",
|
|
61
72
|
{
|
|
62
|
-
additionalHooks:
|
|
63
|
-
}
|
|
64
|
-
],
|
|
73
|
+
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
65
76
|
"react/prop-types": [
|
|
66
77
|
"off"
|
|
67
78
|
],
|
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.
|
|
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 tsParser from '@typescript-eslint/parser'\nimport { 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.Config = {\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 parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\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;;;;;;gCAAmC;;;ACAnC,oBAAqB;AAErB,iCAAwB;AACxB,uCAA6B;AAC7B,qBAAoB;AAEb,IAAMA,cAA6B;EACxCC,SAAS;IACP,SAASC,2BAAAA;IACT,eAAeC,iCAAAA;EACjB;EACAC,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGH,2BAAAA,QAAYI,QAAQC,KAAKC,YAAYH;IACxCI,SAAS;MACP,GAAGA,eAAAA,QAAQC;MACX,GAAGD,eAAAA,QAAQE;IACb;IACAC,QAAQC,cAAAA;IACRC,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGjB,2BAAAA,QAAYI,QAAQC,KAAKC,YAAYW;IACxC,8BAA8B;IAC9B,+BAA+B;MAC7B;MACA;QACEC,iBAAiB;MACnB;;IAEF,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGnB,2BAAAA,QAAYI,QAAQC,KAAKC,YAAYa;IACxCC,OAAO;MACLC,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","plugins","reactPlugin","reactHooksPlugin","files","languageOptions","configs","flat","recommended","globals","serviceworker","browser","parser","tsParser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","rules","additionalHooks","settings","react","version","config","xyConfig","reactConfig"]}
|
package/dist/node/index.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAA+B,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAA+B,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/node/index.d.ts
CHANGED
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAA+B,CAAA;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/node/index.mjs
CHANGED
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
import { config as xyConfig } from "@xylabs/eslint-config-flat";
|
|
3
3
|
|
|
4
4
|
// src/react/index.ts
|
|
5
|
+
import tsParser from "@typescript-eslint/parser";
|
|
5
6
|
import reactPlugin from "eslint-plugin-react";
|
|
7
|
+
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
6
8
|
import globals from "globals";
|
|
7
9
|
var reactConfig = {
|
|
8
10
|
plugins: {
|
|
9
|
-
react: reactPlugin
|
|
11
|
+
"react": reactPlugin,
|
|
12
|
+
"react-hooks": reactHooksPlugin
|
|
10
13
|
},
|
|
11
14
|
files: [
|
|
12
15
|
"**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"
|
|
@@ -16,17 +19,25 @@ var reactConfig = {
|
|
|
16
19
|
globals: {
|
|
17
20
|
...globals.serviceworker,
|
|
18
21
|
...globals.browser
|
|
22
|
+
},
|
|
23
|
+
parser: tsParser,
|
|
24
|
+
parserOptions: {
|
|
25
|
+
ecmaFeatures: {
|
|
26
|
+
modules: true
|
|
27
|
+
},
|
|
28
|
+
ecmaVersion: "latest",
|
|
29
|
+
project: "./tsconfig-eslint.json"
|
|
19
30
|
}
|
|
20
31
|
},
|
|
21
32
|
rules: {
|
|
22
33
|
...reactPlugin.configs.flat.recommended.rules,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
34
|
+
"react-hooks/rules-of-hooks": "error",
|
|
35
|
+
"react-hooks/exhaustive-deps": [
|
|
36
|
+
"warn",
|
|
26
37
|
{
|
|
27
|
-
additionalHooks:
|
|
28
|
-
}
|
|
29
|
-
],
|
|
38
|
+
additionalHooks: "(useAsyncEffect|usePromise)"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
30
41
|
"react/prop-types": [
|
|
31
42
|
"off"
|
|
32
43
|
],
|
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.
|
|
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 tsParser from '@typescript-eslint/parser'\nimport { 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.Config = {\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 parser: tsParser,\n parserOptions: {\n ecmaFeatures: { modules: true },\n ecmaVersion: 'latest',\n project: './tsconfig-eslint.json',\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,SAASA,UAAUC,gBAAgB;;;ACAnC,OAAOC,cAAc;AAErB,OAAOC,iBAAiB;AACxB,OAAOC,sBAAsB;AAC7B,OAAOC,aAAa;AAEb,IAAMC,cAA6B;EACxCC,SAAS;IACP,SAASJ;IACT,eAAeC;EACjB;EACAI,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGN,YAAYO,QAAQC,KAAKC,YAAYH;IACxCJ,SAAS;MACP,GAAGA,QAAQQ;MACX,GAAGR,QAAQS;IACb;IACAC,QAAQb;IACRc,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGlB,YAAYO,QAAQC,KAAKC,YAAYS;IACxC,8BAA8B;IAC9B,+BAA+B;MAC7B;MACA;QACEC,iBAAiB;MACnB;;IAEF,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGpB,YAAYO,QAAQC,KAAKC,YAAYW;IACxCC,OAAO;MACLC,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","tsParser","reactPlugin","reactHooksPlugin","globals","reactConfig","plugins","files","languageOptions","configs","flat","recommended","serviceworker","browser","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","rules","additionalHooks","settings","react","version","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":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAqChC,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":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAqChC,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":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAqChC,CAAA"}
|
package/package.json
CHANGED
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
"url": "https://github.com/xylabs/eslint-config/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/eslint-config-flat": "^3.15.
|
|
13
|
+
"@xylabs/eslint-config-flat": "^3.15.11",
|
|
14
14
|
"eslint-plugin-react": "^7.35.0",
|
|
15
15
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
16
16
|
"globals": "^15.9.0"
|
|
17
17
|
},
|
|
18
18
|
"description": "ESLint Config used throughout XY Labs TypeScript/JavaScript libraries and react projects",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@xylabs/ts-scripts-yarn3": "^3.15.
|
|
21
|
-
"@xylabs/tsconfig": "^3.15.
|
|
20
|
+
"@xylabs/ts-scripts-yarn3": "^3.15.11",
|
|
21
|
+
"@xylabs/tsconfig": "^3.15.11",
|
|
22
22
|
"eslint": "^9.8.0",
|
|
23
23
|
"typescript": "^5.5.4"
|
|
24
24
|
},
|
|
@@ -62,6 +62,6 @@
|
|
|
62
62
|
"url": "https://github.com/xylabs/config.git"
|
|
63
63
|
},
|
|
64
64
|
"sideEffects": false,
|
|
65
|
-
"version": "3.15.
|
|
65
|
+
"version": "3.15.11",
|
|
66
66
|
"type": "module"
|
|
67
67
|
}
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,6 @@ import { Linter } from 'eslint'
|
|
|
3
3
|
|
|
4
4
|
import { reactConfig } from './react/index.ts'
|
|
5
5
|
|
|
6
|
-
export const config: Linter.
|
|
6
|
+
export const config: Linter.Config[] = [...xyConfig, reactConfig]
|
|
7
7
|
|
|
8
8
|
export { reactConfig } from './react/index.ts'
|
package/src/react/index.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import tsParser from '@typescript-eslint/parser'
|
|
1
2
|
import { Linter } from 'eslint'
|
|
2
3
|
import reactPlugin from 'eslint-plugin-react'
|
|
3
|
-
|
|
4
|
+
import reactHooksPlugin from 'eslint-plugin-react-hooks'
|
|
4
5
|
import globals from 'globals'
|
|
5
6
|
|
|
6
|
-
export const reactConfig: Linter.
|
|
7
|
+
export const reactConfig: Linter.Config = {
|
|
7
8
|
plugins: {
|
|
8
|
-
react: reactPlugin,
|
|
9
|
-
|
|
9
|
+
'react': reactPlugin,
|
|
10
|
+
'react-hooks': reactHooksPlugin,
|
|
10
11
|
},
|
|
11
12
|
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
|
|
12
13
|
languageOptions: {
|
|
@@ -15,16 +16,22 @@ export const reactConfig: Linter.FlatConfig = {
|
|
|
15
16
|
...globals.serviceworker,
|
|
16
17
|
...globals.browser,
|
|
17
18
|
},
|
|
19
|
+
parser: tsParser,
|
|
20
|
+
parserOptions: {
|
|
21
|
+
ecmaFeatures: { modules: true },
|
|
22
|
+
ecmaVersion: 'latest',
|
|
23
|
+
project: './tsconfig-eslint.json',
|
|
24
|
+
},
|
|
18
25
|
},
|
|
19
26
|
rules: {
|
|
20
27
|
...reactPlugin.configs.flat.recommended.rules,
|
|
21
|
-
|
|
28
|
+
'react-hooks/rules-of-hooks': 'error',
|
|
22
29
|
'react-hooks/exhaustive-deps': [
|
|
23
30
|
'warn',
|
|
24
31
|
{
|
|
25
32
|
additionalHooks: '(useAsyncEffect|usePromise)',
|
|
26
33
|
},
|
|
27
|
-
],
|
|
34
|
+
],
|
|
28
35
|
'react/prop-types': ['off'],
|
|
29
36
|
'react/react-in-jsx-scope': ['warn'],
|
|
30
37
|
},
|