@xylabs/eslint-config-react-flat 4.0.0-rc.9 → 4.0.0
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.mjs +9 -1
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/node/index.mjs +9 -1
- package/dist/node/index.mjs.map +1 -1
- package/package.json +32 -40
- package/src/index.ts +1 -1
- package/src/react/index.ts +10 -15
- package/src/types.d.ts +4 -0
- package/xy.config.ts +2 -6
package/dist/neutral/index.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { config as xyConfig } from "@xylabs/eslint-config-flat";
|
|
|
5
5
|
import eslintReactPlugin from "@eslint-react/eslint-plugin";
|
|
6
6
|
import tsParser from "@typescript-eslint/parser";
|
|
7
7
|
import reactPlugin from "eslint-plugin-react";
|
|
8
|
+
import eslintReactRefreshPlugin from "eslint-plugin-react-refresh";
|
|
8
9
|
import globals from "globals";
|
|
9
10
|
var reactConfig = {
|
|
10
11
|
files: [
|
|
@@ -12,7 +13,8 @@ var reactConfig = {
|
|
|
12
13
|
],
|
|
13
14
|
...eslintReactPlugin.configs.recommended,
|
|
14
15
|
plugins: {
|
|
15
|
-
react: reactPlugin,
|
|
16
|
+
"react": reactPlugin,
|
|
17
|
+
"react-refresh": eslintReactRefreshPlugin,
|
|
16
18
|
...eslintReactPlugin.configs.recommended.plugins
|
|
17
19
|
},
|
|
18
20
|
settings: {
|
|
@@ -34,6 +36,12 @@ var reactConfig = {
|
|
|
34
36
|
rules: {
|
|
35
37
|
...eslintReactPlugin.configs.recommended.rules,
|
|
36
38
|
...reactPlugin.configs.flat.recommended.rules,
|
|
39
|
+
"react-refresh/only-export-components": [
|
|
40
|
+
"warn",
|
|
41
|
+
{
|
|
42
|
+
allowConstantExport: true
|
|
43
|
+
}
|
|
44
|
+
],
|
|
37
45
|
"react/prop-types": [
|
|
38
46
|
"off"
|
|
39
47
|
]
|
|
@@ -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 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: {
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport type { 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 type { Linter } from 'eslint'\n// This rule is disabled since we still need the in-scope react rule\n// eslint-disable-next-line depend/ban-dependencies\nimport reactPlugin from 'eslint-plugin-react'\nimport eslintReactRefreshPlugin from 'eslint-plugin-react-refresh'\nimport globals from 'globals'\n\nexport const reactConfig = {\n files: ['**/*.{ts,tsx}'],\n ...eslintReactPlugin.configs.recommended,\n plugins: {\n 'react': reactPlugin,\n 'react-refresh': eslintReactRefreshPlugin,\n ...eslintReactPlugin.configs.recommended.plugins,\n },\n settings: { react: { version: 'detect' } },\n languageOptions: {\n parser: tsParser,\n parserOptions: { ecmaFeatures: { jsx: true } },\n globals: { ...globals.browser },\n },\n rules: {\n ...eslintReactPlugin.configs.recommended.rules,\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],\n 'react/prop-types': ['off'],\n },\n} as unknown as Linter.Config\n"],"mappings":";AAAA,SAASA,UAAUC,gBAAgB;;;ACAnC,OAAOC,uBAAuB;AAC9B,OAAOC,cAAc;AAIrB,OAAOC,iBAAiB;AACxB,OAAOC,8BAA8B;AACrC,OAAOC,aAAa;AAEb,IAAMC,cAAc;EACzBC,OAAO;IAAC;;EACR,GAAGN,kBAAkBO,QAAQC;EAC7BC,SAAS;IACP,SAASP;IACT,iBAAiBC;IACjB,GAAGH,kBAAkBO,QAAQC,YAAYC;EAC3C;EACAC,UAAU;IAAEC,OAAO;MAAEC,SAAS;IAAS;EAAE;EACzCC,iBAAiB;IACfC,QAAQb;IACRc,eAAe;MAAEC,cAAc;QAAEC,KAAK;MAAK;IAAE;IAC7Cb,SAAS;MAAE,GAAGA,QAAQc;IAAQ;EAChC;EACAC,OAAO;IACL,GAAGnB,kBAAkBO,QAAQC,YAAYW;IACzC,GAAGjB,YAAYK,QAAQa,KAAKZ,YAAYW;IACxC,wCAAwC;MAAC;MAAQ;QAAEE,qBAAqB;MAAK;;IAC7E,oBAAoB;MAAC;;EACvB;AACF;;;ADxBO,IAAMC,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","eslintReactPlugin","tsParser","reactPlugin","eslintReactRefreshPlugin","globals","reactConfig","files","configs","recommended","plugins","settings","react","version","languageOptions","parser","parserOptions","ecmaFeatures","jsx","browser","rules","flat","allowConstantExport","config","xyConfig","reactConfig"]}
|
package/dist/node/index.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { config as xyConfig } from "@xylabs/eslint-config-flat";
|
|
|
5
5
|
import eslintReactPlugin from "@eslint-react/eslint-plugin";
|
|
6
6
|
import tsParser from "@typescript-eslint/parser";
|
|
7
7
|
import reactPlugin from "eslint-plugin-react";
|
|
8
|
+
import eslintReactRefreshPlugin from "eslint-plugin-react-refresh";
|
|
8
9
|
import globals from "globals";
|
|
9
10
|
var reactConfig = {
|
|
10
11
|
files: [
|
|
@@ -12,7 +13,8 @@ var reactConfig = {
|
|
|
12
13
|
],
|
|
13
14
|
...eslintReactPlugin.configs.recommended,
|
|
14
15
|
plugins: {
|
|
15
|
-
react: reactPlugin,
|
|
16
|
+
"react": reactPlugin,
|
|
17
|
+
"react-refresh": eslintReactRefreshPlugin,
|
|
16
18
|
...eslintReactPlugin.configs.recommended.plugins
|
|
17
19
|
},
|
|
18
20
|
settings: {
|
|
@@ -34,6 +36,12 @@ var reactConfig = {
|
|
|
34
36
|
rules: {
|
|
35
37
|
...eslintReactPlugin.configs.recommended.rules,
|
|
36
38
|
...reactPlugin.configs.flat.recommended.rules,
|
|
39
|
+
"react-refresh/only-export-components": [
|
|
40
|
+
"warn",
|
|
41
|
+
{
|
|
42
|
+
allowConstantExport: true
|
|
43
|
+
}
|
|
44
|
+
],
|
|
37
45
|
"react/prop-types": [
|
|
38
46
|
"off"
|
|
39
47
|
]
|
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 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: {
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/react/index.ts"],"sourcesContent":["import { config as xyConfig } from '@xylabs/eslint-config-flat'\nimport type { 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 type { Linter } from 'eslint'\n// This rule is disabled since we still need the in-scope react rule\n// eslint-disable-next-line depend/ban-dependencies\nimport reactPlugin from 'eslint-plugin-react'\nimport eslintReactRefreshPlugin from 'eslint-plugin-react-refresh'\nimport globals from 'globals'\n\nexport const reactConfig = {\n files: ['**/*.{ts,tsx}'],\n ...eslintReactPlugin.configs.recommended,\n plugins: {\n 'react': reactPlugin,\n 'react-refresh': eslintReactRefreshPlugin,\n ...eslintReactPlugin.configs.recommended.plugins,\n },\n settings: { react: { version: 'detect' } },\n languageOptions: {\n parser: tsParser,\n parserOptions: { ecmaFeatures: { jsx: true } },\n globals: { ...globals.browser },\n },\n rules: {\n ...eslintReactPlugin.configs.recommended.rules,\n ...reactPlugin.configs.flat.recommended.rules,\n 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],\n 'react/prop-types': ['off'],\n },\n} as unknown as Linter.Config\n"],"mappings":";AAAA,SAASA,UAAUC,gBAAgB;;;ACAnC,OAAOC,uBAAuB;AAC9B,OAAOC,cAAc;AAIrB,OAAOC,iBAAiB;AACxB,OAAOC,8BAA8B;AACrC,OAAOC,aAAa;AAEb,IAAMC,cAAc;EACzBC,OAAO;IAAC;;EACR,GAAGN,kBAAkBO,QAAQC;EAC7BC,SAAS;IACP,SAASP;IACT,iBAAiBC;IACjB,GAAGH,kBAAkBO,QAAQC,YAAYC;EAC3C;EACAC,UAAU;IAAEC,OAAO;MAAEC,SAAS;IAAS;EAAE;EACzCC,iBAAiB;IACfC,QAAQb;IACRc,eAAe;MAAEC,cAAc;QAAEC,KAAK;MAAK;IAAE;IAC7Cb,SAAS;MAAE,GAAGA,QAAQc;IAAQ;EAChC;EACAC,OAAO;IACL,GAAGnB,kBAAkBO,QAAQC,YAAYW;IACzC,GAAGjB,YAAYK,QAAQa,KAAKZ,YAAYW;IACxC,wCAAwC;MAAC;MAAQ;QAAEE,qBAAqB;MAAK;;IAC7E,oBAAoB;MAAC;;EACvB;AACF;;;ADxBO,IAAMC,SAA0B;KAAIC;EAAUC;;","names":["config","xyConfig","eslintReactPlugin","tsParser","reactPlugin","eslintReactRefreshPlugin","globals","reactConfig","files","configs","recommended","plugins","settings","react","version","languageOptions","parser","parserOptions","ecmaFeatures","jsx","browser","rules","flat","allowConstantExport","config","xyConfig","reactConfig"]}
|
package/package.json
CHANGED
|
@@ -1,43 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json.schemastore.org/package.json",
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
"name": "XY Labs Development Team",
|
|
6
|
-
"url": "https://xylabs.com"
|
|
7
|
-
},
|
|
8
|
-
"bugs": {
|
|
9
|
-
"email": "support@xylabs.com",
|
|
10
|
-
"url": "https://github.com/xylabs/eslint-config/issues"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@eslint-react/eslint-plugin": "^1.9.0",
|
|
14
|
-
"@xylabs/eslint-config-flat": "^4.0.0-rc.9",
|
|
15
|
-
"eslint-plugin-react": "^7.35.0",
|
|
16
|
-
"globals": "^15.9.0"
|
|
17
|
-
},
|
|
3
|
+
"name": "@xylabs/eslint-config-react-flat",
|
|
4
|
+
"version": "4.0.0",
|
|
18
5
|
"description": "ESLint Config used throughout XY Labs TypeScript/JavaScript libraries and react projects",
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.9",
|
|
21
|
-
"@xylabs/tsconfig": "^4.0.0-rc.9",
|
|
22
|
-
"eslint": "^9.8.0",
|
|
23
|
-
"typescript": "^5.5.4"
|
|
24
|
-
},
|
|
25
|
-
"peerDependencies": {
|
|
26
|
-
"eslint": "*"
|
|
27
|
-
},
|
|
28
|
-
"peerDependenciesMeta": {
|
|
29
|
-
"eslint": {
|
|
30
|
-
"optional": true
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"homepage": "https://github.com/xylabs/eslint-config.git",
|
|
34
6
|
"keywords": [
|
|
35
7
|
"xylabs",
|
|
36
8
|
"utility",
|
|
37
9
|
"typescript",
|
|
38
10
|
"eslint"
|
|
39
11
|
],
|
|
12
|
+
"homepage": "https://github.com/xylabs/eslint-config.git",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "git+https://github.com/xylabs/eslint-config/issues",
|
|
15
|
+
"email": "support@xylabs.com"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/xylabs/config.git"
|
|
20
|
+
},
|
|
40
21
|
"license": "LGPL-3.0-only",
|
|
22
|
+
"author": {
|
|
23
|
+
"name": "XY Labs Development Team",
|
|
24
|
+
"email": "support@xylabs.com",
|
|
25
|
+
"url": "https://xylabs.com"
|
|
26
|
+
},
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"type": "module",
|
|
41
29
|
"exports": {
|
|
42
30
|
"node": {
|
|
43
31
|
"import": {
|
|
@@ -48,16 +36,20 @@
|
|
|
48
36
|
},
|
|
49
37
|
"module": "./dist/node/index.mjs",
|
|
50
38
|
"types": "./dist/node/index.d.ts",
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
"
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@eslint-react/eslint-plugin": "^1.12.0",
|
|
41
|
+
"@xylabs/eslint-config-flat": "^4.0.0",
|
|
42
|
+
"eslint": "^9.9.0",
|
|
43
|
+
"eslint-plugin-react": "^7.35.0",
|
|
44
|
+
"eslint-plugin-react-refresh": "^0.4.10",
|
|
45
|
+
"globals": "^15.9.0"
|
|
54
46
|
},
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.0",
|
|
49
|
+
"@xylabs/tsconfig": "^4.0.0",
|
|
50
|
+
"typescript": "^5.5.4"
|
|
58
51
|
},
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"stableVersion": "3.15.16"
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
}
|
|
63
55
|
}
|
package/src/index.ts
CHANGED
package/src/react/index.ts
CHANGED
|
@@ -1,35 +1,30 @@
|
|
|
1
1
|
import eslintReactPlugin from '@eslint-react/eslint-plugin'
|
|
2
2
|
import tsParser from '@typescript-eslint/parser'
|
|
3
|
-
import { Linter } from 'eslint'
|
|
3
|
+
import type { Linter } from 'eslint'
|
|
4
|
+
// This rule is disabled since we still need the in-scope react rule
|
|
5
|
+
// eslint-disable-next-line depend/ban-dependencies
|
|
4
6
|
import reactPlugin from 'eslint-plugin-react'
|
|
7
|
+
import eslintReactRefreshPlugin from 'eslint-plugin-react-refresh'
|
|
5
8
|
import globals from 'globals'
|
|
6
9
|
|
|
7
10
|
export const reactConfig = {
|
|
8
11
|
files: ['**/*.{ts,tsx}'],
|
|
9
12
|
...eslintReactPlugin.configs.recommended,
|
|
10
13
|
plugins: {
|
|
11
|
-
react: reactPlugin,
|
|
14
|
+
'react': reactPlugin,
|
|
15
|
+
'react-refresh': eslintReactRefreshPlugin,
|
|
12
16
|
...eslintReactPlugin.configs.recommended.plugins,
|
|
13
17
|
},
|
|
14
|
-
settings: {
|
|
15
|
-
react: {
|
|
16
|
-
version: 'detect',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
18
|
+
settings: { react: { version: 'detect' } },
|
|
19
19
|
languageOptions: {
|
|
20
20
|
parser: tsParser,
|
|
21
|
-
parserOptions: {
|
|
22
|
-
|
|
23
|
-
jsx: true,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
globals: {
|
|
27
|
-
...globals.browser,
|
|
28
|
-
},
|
|
21
|
+
parserOptions: { ecmaFeatures: { jsx: true } },
|
|
22
|
+
globals: { ...globals.browser },
|
|
29
23
|
},
|
|
30
24
|
rules: {
|
|
31
25
|
...eslintReactPlugin.configs.recommended.rules,
|
|
32
26
|
...reactPlugin.configs.flat.recommended.rules,
|
|
27
|
+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
|
|
33
28
|
'react/prop-types': ['off'],
|
|
34
29
|
},
|
|
35
30
|
} as unknown as Linter.Config
|
package/src/types.d.ts
CHANGED
package/xy.config.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
|
|
2
|
-
const config: XyTsupConfig = {
|
|
3
|
-
compile: {
|
|
4
|
-
browser: {},
|
|
5
|
-
},
|
|
6
|
-
}
|
|
1
|
+
import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
|
|
2
|
+
const config: XyTsupConfig = { compile: { browser: {} } }
|
|
7
3
|
|
|
8
4
|
export default config
|