react-tab-set 2.1.2 → 2.1.4
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/eslint.config.mjs +94 -10
- package/package.json +4 -3
package/eslint.config.mjs
CHANGED
|
@@ -1,16 +1,65 @@
|
|
|
1
1
|
import globals from 'globals'
|
|
2
2
|
import standard from '@sequencemedia/eslint-config-standard/merge'
|
|
3
3
|
import typescript from '@sequencemedia/eslint-config-typescript/merge'
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import babelParser from '@babel/eslint-parser'
|
|
5
|
+
import typescriptParser from '@typescript-eslint/parser'
|
|
6
|
+
import reactPlugin from 'eslint-plugin-react'
|
|
7
|
+
|
|
8
|
+
const reactParserOptions = {
|
|
9
|
+
ecmaFeatures: {
|
|
10
|
+
jsx: true
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const reactRules = {
|
|
15
|
+
'no-unused-vars': [
|
|
16
|
+
'error',
|
|
17
|
+
{
|
|
18
|
+
varsIgnorePattern: 'React'
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
quotes: [
|
|
22
|
+
'error',
|
|
23
|
+
'single'
|
|
24
|
+
],
|
|
25
|
+
'jsx-quotes': [
|
|
26
|
+
'error',
|
|
27
|
+
'prefer-single'
|
|
28
|
+
],
|
|
29
|
+
'react/jsx-indent': [
|
|
30
|
+
'error',
|
|
31
|
+
2,
|
|
32
|
+
{
|
|
33
|
+
checkAttributes: true,
|
|
34
|
+
indentLogicalExpressions: true
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const reactSettings = {
|
|
40
|
+
react: {
|
|
41
|
+
version: 'detect'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
6
44
|
|
|
7
45
|
export default [
|
|
46
|
+
/**
|
|
47
|
+
* React config for all `jsx` and `tsx` files
|
|
48
|
+
*/
|
|
49
|
+
{
|
|
50
|
+
files: [
|
|
51
|
+
'**/*.tsx',
|
|
52
|
+
'**/*.jsx'
|
|
53
|
+
],
|
|
54
|
+
...reactPlugin.configs.flat.recommended
|
|
55
|
+
},
|
|
8
56
|
...standard({
|
|
9
57
|
files: [
|
|
10
58
|
'**/*.{mjs,cjs}'
|
|
11
59
|
],
|
|
12
60
|
ignores: [
|
|
13
|
-
'src'
|
|
61
|
+
'src',
|
|
62
|
+
'stories'
|
|
14
63
|
],
|
|
15
64
|
languageOptions: {
|
|
16
65
|
globals: {
|
|
@@ -28,12 +77,40 @@ export default [
|
|
|
28
77
|
}
|
|
29
78
|
}
|
|
30
79
|
}),
|
|
80
|
+
/**
|
|
81
|
+
* Standard config for all `jsx` and `tsx` files
|
|
82
|
+
*/
|
|
83
|
+
...standard({
|
|
84
|
+
files: [
|
|
85
|
+
'**/*.tsx',
|
|
86
|
+
'**/*.jsx'
|
|
87
|
+
],
|
|
88
|
+
plugins: {
|
|
89
|
+
react: reactPlugin
|
|
90
|
+
},
|
|
91
|
+
languageOptions: {
|
|
92
|
+
parser: babelParser,
|
|
93
|
+
parserOptions: {
|
|
94
|
+
...reactParserOptions
|
|
95
|
+
},
|
|
96
|
+
globals: {
|
|
97
|
+
...globals.browser
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
rules: {
|
|
101
|
+
...reactRules
|
|
102
|
+
},
|
|
103
|
+
settings: {
|
|
104
|
+
...reactSettings
|
|
105
|
+
}
|
|
106
|
+
}),
|
|
31
107
|
...typescript({
|
|
32
108
|
files: [
|
|
33
109
|
'**/*.{mts,cts}'
|
|
34
110
|
],
|
|
35
111
|
ignores: [
|
|
36
|
-
'src'
|
|
112
|
+
'src',
|
|
113
|
+
'stories'
|
|
37
114
|
],
|
|
38
115
|
languageOptions: {
|
|
39
116
|
globals: {
|
|
@@ -51,24 +128,31 @@ export default [
|
|
|
51
128
|
}
|
|
52
129
|
}
|
|
53
130
|
}),
|
|
131
|
+
/**
|
|
132
|
+
* TypeScript config for only `tsx` files
|
|
133
|
+
*/
|
|
54
134
|
...typescript({
|
|
55
135
|
files: [
|
|
56
136
|
'src/**/*.tsx'
|
|
57
137
|
],
|
|
58
138
|
plugins: {
|
|
59
|
-
react
|
|
139
|
+
react: reactPlugin
|
|
60
140
|
},
|
|
61
141
|
languageOptions: {
|
|
62
|
-
parser,
|
|
142
|
+
parser: typescriptParser,
|
|
63
143
|
parserOptions: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
jsx: true
|
|
67
|
-
}
|
|
144
|
+
...reactParserOptions,
|
|
145
|
+
project: 'tsconfig.json'
|
|
68
146
|
},
|
|
69
147
|
globals: {
|
|
70
148
|
...globals.browser
|
|
71
149
|
}
|
|
150
|
+
},
|
|
151
|
+
rules: {
|
|
152
|
+
...reactRules
|
|
153
|
+
},
|
|
154
|
+
settings: {
|
|
155
|
+
...reactSettings
|
|
72
156
|
}
|
|
73
157
|
})
|
|
74
158
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-tab-set",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "A React Tab Set component",
|
|
5
5
|
"main": "./src/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -30,14 +30,15 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@babel/core": "^7.26.0",
|
|
33
|
+
"@babel/eslint-parser": "^7.25.9",
|
|
33
34
|
"@babel/plugin-syntax-jsx": "^7.25.9",
|
|
34
35
|
"@babel/plugin-transform-typescript": "^7.26.3",
|
|
35
36
|
"@babel/preset-env": "^7.26.0",
|
|
36
37
|
"@babel/preset-react": "^7.26.3",
|
|
37
38
|
"@babel/preset-typescript": "^7.26.0",
|
|
38
39
|
"@babel/register": "^7.25.9",
|
|
39
|
-
"@sequencemedia/eslint-config-standard": "^0.1.
|
|
40
|
-
"@sequencemedia/eslint-config-typescript": "^0.0.
|
|
40
|
+
"@sequencemedia/eslint-config-standard": "^0.1.7",
|
|
41
|
+
"@sequencemedia/eslint-config-typescript": "^0.0.6",
|
|
41
42
|
"@storybook/addon-essentials": "7.6.20",
|
|
42
43
|
"@storybook/react": "7.6.20",
|
|
43
44
|
"@storybook/react-webpack5": "7.6.20",
|