@xylabs/eslint-config-react-flat 3.15.8 → 3.15.10
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 +9 -0
- 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 +9 -0
- 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 +9 -0
- 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 +9 -0
- 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 +8 -1
package/dist/neutral/index.cjs
CHANGED
|
@@ -37,6 +37,7 @@ 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);
|
|
41
42
|
var import_globals = __toESM(require("globals"), 1);
|
|
42
43
|
var reactConfig = {
|
|
@@ -51,6 +52,14 @@ var reactConfig = {
|
|
|
51
52
|
globals: {
|
|
52
53
|
...import_globals.default.serviceworker,
|
|
53
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"
|
|
54
63
|
}
|
|
55
64
|
},
|
|
56
65
|
rules: {
|
|
@@ -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'\n// import 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;AAExB,qBAAoB;AAEb,IAAMA,cAA6B;EACxCC,SAAS;IACPC,OAAOC,2BAAAA;EAET;EACAC,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGF,2BAAAA,QAAYG,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,GAAGhB,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYW;;;;;;;;IAQxC,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGjB,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYY;IACxClB,OAAO;MACLmB,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","plugins","react","reactPlugin","files","languageOptions","configs","flat","recommended","globals","serviceworker","browser","parser","tsParser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","rules","settings","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,6 +2,7 @@
|
|
|
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";
|
|
6
7
|
import globals from "globals";
|
|
7
8
|
var reactConfig = {
|
|
@@ -16,6 +17,14 @@ var reactConfig = {
|
|
|
16
17
|
globals: {
|
|
17
18
|
...globals.serviceworker,
|
|
18
19
|
...globals.browser
|
|
20
|
+
},
|
|
21
|
+
parser: tsParser,
|
|
22
|
+
parserOptions: {
|
|
23
|
+
ecmaFeatures: {
|
|
24
|
+
modules: true
|
|
25
|
+
},
|
|
26
|
+
ecmaVersion: "latest",
|
|
27
|
+
project: "./tsconfig-eslint.json"
|
|
19
28
|
}
|
|
20
29
|
},
|
|
21
30
|
rules: {
|
|
@@ -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'\n// import 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;AAExB,OAAOC,aAAa;AAEb,IAAMC,cAA6B;EACxCC,SAAS;IACPC,OAAOJ;EAET;EACAK,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGN,YAAYO,QAAQC,KAAKC,YAAYH;IACxCL,SAAS;MACP,GAAGA,QAAQS;MACX,GAAGT,QAAQU;IACb;IACAC,QAAQb;IACRc,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGlB,YAAYO,QAAQC,KAAKC,YAAYS;;;;;;;;IAQxC,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGnB,YAAYO,QAAQC,KAAKC,YAAYU;IACxCf,OAAO;MACLgB,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","tsParser","reactPlugin","globals","reactConfig","plugins","react","files","languageOptions","configs","flat","recommended","serviceworker","browser","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","rules","settings","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,6 +37,7 @@ 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);
|
|
41
42
|
var import_globals = __toESM(require("globals"), 1);
|
|
42
43
|
var reactConfig = {
|
|
@@ -51,6 +52,14 @@ var reactConfig = {
|
|
|
51
52
|
globals: {
|
|
52
53
|
...import_globals.default.serviceworker,
|
|
53
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"
|
|
54
63
|
}
|
|
55
64
|
},
|
|
56
65
|
rules: {
|
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'\n// import 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;AAExB,qBAAoB;AAEb,IAAMA,cAA6B;EACxCC,SAAS;IACPC,OAAOC,2BAAAA;EAET;EACAC,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGF,2BAAAA,QAAYG,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,GAAGhB,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYW;;;;;;;;IAQxC,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGjB,2BAAAA,QAAYG,QAAQC,KAAKC,YAAYY;IACxClB,OAAO;MACLmB,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC,0BAAAA;EAAUC;;","names":["reactConfig","plugins","react","reactPlugin","files","languageOptions","configs","flat","recommended","globals","serviceworker","browser","parser","tsParser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","rules","settings","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,6 +2,7 @@
|
|
|
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";
|
|
6
7
|
import globals from "globals";
|
|
7
8
|
var reactConfig = {
|
|
@@ -16,6 +17,14 @@ var reactConfig = {
|
|
|
16
17
|
globals: {
|
|
17
18
|
...globals.serviceworker,
|
|
18
19
|
...globals.browser
|
|
20
|
+
},
|
|
21
|
+
parser: tsParser,
|
|
22
|
+
parserOptions: {
|
|
23
|
+
ecmaFeatures: {
|
|
24
|
+
modules: true
|
|
25
|
+
},
|
|
26
|
+
ecmaVersion: "latest",
|
|
27
|
+
project: "./tsconfig-eslint.json"
|
|
19
28
|
}
|
|
20
29
|
},
|
|
21
30
|
rules: {
|
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'\n// import 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;AAExB,OAAOC,aAAa;AAEb,IAAMC,cAA6B;EACxCC,SAAS;IACPC,OAAOJ;EAET;EACAK,OAAO;IAAC;;EACRC,iBAAiB;IACf,GAAGN,YAAYO,QAAQC,KAAKC,YAAYH;IACxCL,SAAS;MACP,GAAGA,QAAQS;MACX,GAAGT,QAAQU;IACb;IACAC,QAAQb;IACRc,eAAe;MACbC,cAAc;QAAEC,SAAS;MAAK;MAC9BC,aAAa;MACbC,SAAS;IACX;EACF;EACAC,OAAO;IACL,GAAGlB,YAAYO,QAAQC,KAAKC,YAAYS;;;;;;;;IAQxC,oBAAoB;MAAC;;IACrB,4BAA4B;MAAC;;EAC/B;EACAC,UAAU;IACR,GAAGnB,YAAYO,QAAQC,KAAKC,YAAYU;IACxCf,OAAO;MACLgB,SAAS;IACX;EACF;AACF;;;ADtCO,IAAMC,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","tsParser","reactPlugin","globals","reactConfig","plugins","react","files","languageOptions","configs","flat","recommended","serviceworker","browser","parser","parserOptions","ecmaFeatures","modules","ecmaVersion","project","rules","settings","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.10",
|
|
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.10",
|
|
21
|
+
"@xylabs/tsconfig": "^3.15.10",
|
|
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.10",
|
|
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,9 +1,10 @@
|
|
|
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
9
|
react: reactPlugin,
|
|
9
10
|
// 'react-hooks': reactHooksPlugin,
|
|
@@ -15,6 +16,12 @@ 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,
|