react-tab-set 2.1.2 → 2.1.3

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.
Files changed (2) hide show
  1. package/eslint.config.mjs +82 -9
  2. package/package.json +2 -1
package/eslint.config.mjs CHANGED
@@ -1,16 +1,62 @@
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 parser from '@typescript-eslint/parser'
5
- import react from 'eslint-plugin-react'
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
+ files: [
48
+ '**/*.tsx',
49
+ '**/*.jsx'
50
+ ],
51
+ ...reactPlugin.configs.flat.recommended
52
+ },
8
53
  ...standard({
9
54
  files: [
10
55
  '**/*.{mjs,cjs}'
11
56
  ],
12
57
  ignores: [
13
- 'src'
58
+ 'src',
59
+ 'stories'
14
60
  ],
15
61
  languageOptions: {
16
62
  globals: {
@@ -28,6 +74,29 @@ export default [
28
74
  }
29
75
  }
30
76
  }),
77
+ ...standard({
78
+ files: [
79
+ 'stories/**/*.jsx'
80
+ ],
81
+ plugins: {
82
+ react: reactPlugin
83
+ },
84
+ languageOptions: {
85
+ parser: babelParser,
86
+ parserOptions: {
87
+ ...reactParserOptions
88
+ },
89
+ globals: {
90
+ ...globals.browser
91
+ }
92
+ },
93
+ rules: {
94
+ ...reactRules
95
+ },
96
+ settings: {
97
+ ...reactSettings
98
+ }
99
+ }),
31
100
  ...typescript({
32
101
  files: [
33
102
  '**/*.{mts,cts}'
@@ -56,19 +125,23 @@ export default [
56
125
  'src/**/*.tsx'
57
126
  ],
58
127
  plugins: {
59
- react
128
+ react: reactPlugin
60
129
  },
61
130
  languageOptions: {
62
- parser,
131
+ parser: typescriptParser,
63
132
  parserOptions: {
64
- project: 'tsconfig.json',
65
- ecmaFeatures: {
66
- jsx: true
67
- }
133
+ ...reactParserOptions,
134
+ project: 'tsconfig.json'
68
135
  },
69
136
  globals: {
70
137
  ...globals.browser
71
138
  }
139
+ },
140
+ rules: {
141
+ ...reactRules
142
+ },
143
+ settings: {
144
+ ...reactSettings
72
145
  }
73
146
  })
74
147
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-tab-set",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "A React Tab Set component",
5
5
  "main": "./src/index.mjs",
6
6
  "type": "module",
@@ -30,6 +30,7 @@
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",