@eslint-react/eslint-plugin 1.52.10-beta.0 → 1.52.10-beta.1

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/index.mjs CHANGED
@@ -1,472 +1,454 @@
1
- import reactDebug from 'eslint-plugin-react-debug';
2
- import reactDom from 'eslint-plugin-react-dom';
3
- import reactHooksExtra from 'eslint-plugin-react-hooks-extra';
4
- import reactNamingConvention from 'eslint-plugin-react-naming-convention';
5
- import reactWebApi from 'eslint-plugin-react-web-api';
6
- import react from 'eslint-plugin-react-x';
7
- import { DEFAULT_ESLINT_REACT_SETTINGS } from '@eslint-react/shared';
1
+ import { __export } from "./chunk-B9dir_RE.mjs";
2
+ import reactDebug from "eslint-plugin-react-debug";
3
+ import reactDom from "eslint-plugin-react-dom";
4
+ import reactHooksExtra from "eslint-plugin-react-hooks-extra";
5
+ import reactNamingConvention from "eslint-plugin-react-naming-convention";
6
+ import reactWebApi from "eslint-plugin-react-web-api";
7
+ import react from "eslint-plugin-react-x";
8
+ import { DEFAULT_ESLINT_REACT_SETTINGS } from "@eslint-react/shared";
8
9
 
9
- var __defProp = Object.defineProperty;
10
- var __export = (target, all) => {
11
- for (var name14 in all)
12
- __defProp(target, name14, { get: all[name14], enumerable: true });
13
- };
14
-
15
- // package.json
10
+ //#region package.json
16
11
  var name = "@eslint-react/eslint-plugin";
17
- var version = "1.52.10-beta.0";
18
-
19
- // src/configs/all.ts
20
- var all_exports = {};
21
- __export(all_exports, {
22
- name: () => name4,
23
- plugins: () => plugins3,
24
- rules: () => rules3,
25
- settings: () => settings3
26
- });
12
+ var version = "1.52.10-beta.1";
27
13
 
28
- // src/configs/dom.ts
14
+ //#endregion
15
+ //#region src/configs/dom.ts
29
16
  var dom_exports = {};
30
17
  __export(dom_exports, {
31
- name: () => name2,
32
- plugins: () => plugins,
33
- rules: () => rules,
34
- settings: () => settings
18
+ name: () => name$12,
19
+ plugins: () => plugins$7,
20
+ rules: () => rules$8,
21
+ settings: () => settings$6
35
22
  });
36
- var name2 = "@eslint-react/dom";
37
- var rules = {
38
- "@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
39
- "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
40
- "@eslint-react/dom/no-find-dom-node": "error",
41
- "@eslint-react/dom/no-flush-sync": "error",
42
- "@eslint-react/dom/no-hydrate": "error",
43
- "@eslint-react/dom/no-missing-button-type": "warn",
44
- "@eslint-react/dom/no-missing-iframe-sandbox": "warn",
45
- "@eslint-react/dom/no-namespace": "error",
46
- "@eslint-react/dom/no-render": "error",
47
- "@eslint-react/dom/no-render-return-value": "error",
48
- "@eslint-react/dom/no-script-url": "warn",
49
- "@eslint-react/dom/no-unsafe-iframe-sandbox": "warn",
50
- "@eslint-react/dom/no-unsafe-target-blank": "warn",
51
- "@eslint-react/dom/no-use-form-state": "error",
52
- "@eslint-react/dom/no-void-elements-with-children": "error"
53
- };
54
- var plugins = {
55
- "@eslint-react/dom": reactDom
56
- };
57
- var settings = {
58
- "react-x": DEFAULT_ESLINT_REACT_SETTINGS
23
+ const name$12 = "@eslint-react/dom";
24
+ const rules$8 = {
25
+ "@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
26
+ "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
27
+ "@eslint-react/dom/no-find-dom-node": "error",
28
+ "@eslint-react/dom/no-flush-sync": "error",
29
+ "@eslint-react/dom/no-hydrate": "error",
30
+ "@eslint-react/dom/no-missing-button-type": "warn",
31
+ "@eslint-react/dom/no-missing-iframe-sandbox": "warn",
32
+ "@eslint-react/dom/no-namespace": "error",
33
+ "@eslint-react/dom/no-render": "error",
34
+ "@eslint-react/dom/no-render-return-value": "error",
35
+ "@eslint-react/dom/no-script-url": "warn",
36
+ "@eslint-react/dom/no-unsafe-iframe-sandbox": "warn",
37
+ "@eslint-react/dom/no-unsafe-target-blank": "warn",
38
+ "@eslint-react/dom/no-use-form-state": "error",
39
+ "@eslint-react/dom/no-void-elements-with-children": "error"
59
40
  };
41
+ const plugins$7 = { "@eslint-react/dom": reactDom };
42
+ const settings$6 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
60
43
 
61
- // src/configs/x.ts
44
+ //#endregion
45
+ //#region src/configs/x.ts
62
46
  var x_exports = {};
63
47
  __export(x_exports, {
64
- name: () => name3,
65
- plugins: () => plugins2,
66
- rules: () => rules2,
67
- settings: () => settings2
48
+ name: () => name$11,
49
+ plugins: () => plugins$6,
50
+ rules: () => rules$12,
51
+ settings: () => settings$5
68
52
  });
69
- var name3 = "@eslint-react/x";
70
- var rules2 = {
71
- "@eslint-react/jsx-key-before-spread": "warn",
72
- "@eslint-react/jsx-no-duplicate-props": "warn",
73
- "@eslint-react/jsx-uses-react": "warn",
74
- "@eslint-react/jsx-uses-vars": "warn",
75
- "@eslint-react/no-access-state-in-setstate": "error",
76
- "@eslint-react/no-array-index-key": "warn",
77
- "@eslint-react/no-children-count": "warn",
78
- "@eslint-react/no-children-for-each": "warn",
79
- "@eslint-react/no-children-map": "warn",
80
- "@eslint-react/no-children-only": "warn",
81
- "@eslint-react/no-children-to-array": "warn",
82
- "@eslint-react/no-clone-element": "warn",
83
- "@eslint-react/no-comment-textnodes": "warn",
84
- "@eslint-react/no-component-will-mount": "error",
85
- "@eslint-react/no-component-will-receive-props": "error",
86
- "@eslint-react/no-component-will-update": "error",
87
- "@eslint-react/no-context-provider": "warn",
88
- "@eslint-react/no-create-ref": "error",
89
- "@eslint-react/no-default-props": "error",
90
- "@eslint-react/no-direct-mutation-state": "error",
91
- "@eslint-react/no-duplicate-key": "warn",
92
- "@eslint-react/no-forward-ref": "warn",
93
- "@eslint-react/no-implicit-key": "warn",
94
- "@eslint-react/no-missing-key": "error",
95
- "@eslint-react/no-misused-capture-owner-stack": "error",
96
- "@eslint-react/no-nested-component-definitions": "error",
97
- "@eslint-react/no-nested-lazy-component-declarations": "warn",
98
- "@eslint-react/no-prop-types": "error",
99
- "@eslint-react/no-redundant-should-component-update": "error",
100
- "@eslint-react/no-set-state-in-component-did-mount": "warn",
101
- "@eslint-react/no-set-state-in-component-did-update": "warn",
102
- "@eslint-react/no-set-state-in-component-will-update": "warn",
103
- "@eslint-react/no-string-refs": "error",
104
- "@eslint-react/no-unsafe-component-will-mount": "warn",
105
- "@eslint-react/no-unsafe-component-will-receive-props": "warn",
106
- "@eslint-react/no-unsafe-component-will-update": "warn",
107
- "@eslint-react/no-unstable-context-value": "warn",
108
- "@eslint-react/no-unstable-default-props": "warn",
109
- "@eslint-react/no-unused-class-component-members": "warn",
110
- "@eslint-react/no-unused-state": "warn",
111
- "@eslint-react/no-use-context": "warn",
112
- "@eslint-react/no-useless-forward-ref": "warn"
113
- };
114
- var plugins2 = {
115
- "@eslint-react": react
116
- };
117
- var settings2 = {
118
- "react-x": DEFAULT_ESLINT_REACT_SETTINGS
53
+ const name$11 = "@eslint-react/x";
54
+ const rules$12 = {
55
+ "@eslint-react/jsx-key-before-spread": "warn",
56
+ "@eslint-react/jsx-no-duplicate-props": "warn",
57
+ "@eslint-react/jsx-uses-react": "warn",
58
+ "@eslint-react/jsx-uses-vars": "warn",
59
+ "@eslint-react/no-access-state-in-setstate": "error",
60
+ "@eslint-react/no-array-index-key": "warn",
61
+ "@eslint-react/no-children-count": "warn",
62
+ "@eslint-react/no-children-for-each": "warn",
63
+ "@eslint-react/no-children-map": "warn",
64
+ "@eslint-react/no-children-only": "warn",
65
+ "@eslint-react/no-children-to-array": "warn",
66
+ "@eslint-react/no-clone-element": "warn",
67
+ "@eslint-react/no-comment-textnodes": "warn",
68
+ "@eslint-react/no-component-will-mount": "error",
69
+ "@eslint-react/no-component-will-receive-props": "error",
70
+ "@eslint-react/no-component-will-update": "error",
71
+ "@eslint-react/no-context-provider": "warn",
72
+ "@eslint-react/no-create-ref": "error",
73
+ "@eslint-react/no-default-props": "error",
74
+ "@eslint-react/no-direct-mutation-state": "error",
75
+ "@eslint-react/no-duplicate-key": "warn",
76
+ "@eslint-react/no-forward-ref": "warn",
77
+ "@eslint-react/no-implicit-key": "warn",
78
+ "@eslint-react/no-missing-key": "error",
79
+ "@eslint-react/no-misused-capture-owner-stack": "error",
80
+ "@eslint-react/no-nested-component-definitions": "error",
81
+ "@eslint-react/no-nested-lazy-component-declarations": "warn",
82
+ "@eslint-react/no-prop-types": "error",
83
+ "@eslint-react/no-redundant-should-component-update": "error",
84
+ "@eslint-react/no-set-state-in-component-did-mount": "warn",
85
+ "@eslint-react/no-set-state-in-component-did-update": "warn",
86
+ "@eslint-react/no-set-state-in-component-will-update": "warn",
87
+ "@eslint-react/no-string-refs": "error",
88
+ "@eslint-react/no-unsafe-component-will-mount": "warn",
89
+ "@eslint-react/no-unsafe-component-will-receive-props": "warn",
90
+ "@eslint-react/no-unsafe-component-will-update": "warn",
91
+ "@eslint-react/no-unstable-context-value": "warn",
92
+ "@eslint-react/no-unstable-default-props": "warn",
93
+ "@eslint-react/no-unused-class-component-members": "warn",
94
+ "@eslint-react/no-unused-state": "warn",
95
+ "@eslint-react/no-use-context": "warn",
96
+ "@eslint-react/no-useless-forward-ref": "warn"
119
97
  };
98
+ const plugins$6 = { "@eslint-react": react };
99
+ const settings$5 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
120
100
 
121
- // src/configs/all.ts
122
- var name4 = "@eslint-react/all";
123
- var rules3 = {
124
- "@eslint-react/avoid-shorthand-boolean": "warn",
125
- "@eslint-react/avoid-shorthand-fragment": "warn",
126
- "@eslint-react/jsx-key-before-spread": "warn",
127
- "@eslint-react/jsx-no-duplicate-props": "warn",
128
- "@eslint-react/jsx-no-iife": "warn",
129
- "@eslint-react/jsx-no-undef": "error",
130
- "@eslint-react/jsx-uses-react": "warn",
131
- "@eslint-react/jsx-uses-vars": "warn",
132
- "@eslint-react/no-access-state-in-setstate": "error",
133
- "@eslint-react/no-array-index-key": "warn",
134
- "@eslint-react/no-children-count": "warn",
135
- "@eslint-react/no-children-for-each": "warn",
136
- "@eslint-react/no-children-map": "warn",
137
- "@eslint-react/no-children-only": "warn",
138
- "@eslint-react/no-children-prop": "warn",
139
- "@eslint-react/no-children-to-array": "warn",
140
- "@eslint-react/no-class-component": "warn",
141
- "@eslint-react/no-clone-element": "warn",
142
- "@eslint-react/no-comment-textnodes": "warn",
143
- "@eslint-react/no-complex-conditional-rendering": "warn",
144
- "@eslint-react/no-component-will-mount": "error",
145
- "@eslint-react/no-component-will-receive-props": "error",
146
- "@eslint-react/no-component-will-update": "error",
147
- "@eslint-react/no-context-provider": "warn",
148
- "@eslint-react/no-create-ref": "error",
149
- "@eslint-react/no-default-props": "error",
150
- "@eslint-react/no-direct-mutation-state": "error",
151
- "@eslint-react/no-duplicate-key": "warn",
152
- "@eslint-react/no-forward-ref": "warn",
153
- "@eslint-react/no-implicit-key": "warn",
154
- // "@eslint-react/no-leaked-conditional-rendering": "warn",
155
- "@eslint-react/no-missing-component-display-name": "warn",
156
- "@eslint-react/no-missing-context-display-name": "warn",
157
- "@eslint-react/no-missing-key": "error",
158
- "@eslint-react/no-misused-capture-owner-stack": "error",
159
- "@eslint-react/no-nested-component-definitions": "error",
160
- "@eslint-react/no-nested-lazy-component-declarations": "warn",
161
- "@eslint-react/no-prop-types": "error",
162
- "@eslint-react/no-redundant-should-component-update": "error",
163
- "@eslint-react/no-set-state-in-component-did-mount": "warn",
164
- "@eslint-react/no-set-state-in-component-did-update": "warn",
165
- "@eslint-react/no-set-state-in-component-will-update": "warn",
166
- "@eslint-react/no-string-refs": "error",
167
- "@eslint-react/no-unsafe-component-will-mount": "warn",
168
- "@eslint-react/no-unsafe-component-will-receive-props": "warn",
169
- "@eslint-react/no-unsafe-component-will-update": "warn",
170
- "@eslint-react/no-unstable-context-value": "warn",
171
- "@eslint-react/no-unstable-default-props": "warn",
172
- "@eslint-react/no-unused-class-component-members": "warn",
173
- "@eslint-react/no-unused-state": "warn",
174
- "@eslint-react/no-use-context": "warn",
175
- "@eslint-react/no-useless-forward-ref": "warn",
176
- "@eslint-react/no-useless-fragment": "warn",
177
- "@eslint-react/prefer-destructuring-assignment": "warn",
178
- "@eslint-react/prefer-react-namespace-import": "warn",
179
- // "@eslint-react/prefer-read-only-props": "warn",
180
- "@eslint-react/prefer-shorthand-boolean": "off",
181
- "@eslint-react/prefer-shorthand-fragment": "off",
182
- "@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
183
- "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
184
- "@eslint-react/dom/no-find-dom-node": "error",
185
- "@eslint-react/dom/no-flush-sync": "error",
186
- "@eslint-react/dom/no-hydrate": "error",
187
- "@eslint-react/dom/no-missing-button-type": "warn",
188
- "@eslint-react/dom/no-missing-iframe-sandbox": "warn",
189
- "@eslint-react/dom/no-namespace": "error",
190
- "@eslint-react/dom/no-render": "error",
191
- "@eslint-react/dom/no-render-return-value": "error",
192
- "@eslint-react/dom/no-script-url": "warn",
193
- "@eslint-react/dom/no-unknown-property": "warn",
194
- "@eslint-react/dom/no-unsafe-iframe-sandbox": "warn",
195
- "@eslint-react/dom/no-unsafe-target-blank": "warn",
196
- "@eslint-react/dom/no-use-form-state": "error",
197
- "@eslint-react/dom/no-void-elements-with-children": "error",
198
- "@eslint-react/web-api/no-leaked-event-listener": "warn",
199
- "@eslint-react/web-api/no-leaked-interval": "warn",
200
- "@eslint-react/web-api/no-leaked-resize-observer": "warn",
201
- "@eslint-react/web-api/no-leaked-timeout": "warn",
202
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
203
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "warn",
204
- "@eslint-react/hooks-extra/no-unnecessary-use-callback": "warn",
205
- "@eslint-react/hooks-extra/no-unnecessary-use-memo": "warn",
206
- "@eslint-react/hooks-extra/no-unnecessary-use-prefix": "warn",
207
- "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
208
- "@eslint-react/naming-convention/component-name": "warn",
209
- "@eslint-react/naming-convention/context-name": "warn",
210
- "@eslint-react/naming-convention/filename": "warn",
211
- "@eslint-react/naming-convention/filename-extension": "warn",
212
- "@eslint-react/naming-convention/use-state": "warn"
213
- };
214
- var plugins3 = {
215
- ...plugins2,
216
- ...plugins,
217
- "@eslint-react/debug": reactDebug,
218
- "@eslint-react/hooks-extra": reactHooksExtra,
219
- "@eslint-react/naming-convention": reactNamingConvention,
220
- "@eslint-react/web-api": reactWebApi
101
+ //#endregion
102
+ //#region src/configs/all.ts
103
+ var all_exports = {};
104
+ __export(all_exports, {
105
+ name: () => name$10,
106
+ plugins: () => plugins$5,
107
+ rules: () => rules$3,
108
+ settings: () => settings$4
109
+ });
110
+ const name$10 = "@eslint-react/all";
111
+ const rules$3 = {
112
+ "@eslint-react/avoid-shorthand-boolean": "warn",
113
+ "@eslint-react/avoid-shorthand-fragment": "warn",
114
+ "@eslint-react/jsx-key-before-spread": "warn",
115
+ "@eslint-react/jsx-no-duplicate-props": "warn",
116
+ "@eslint-react/jsx-no-iife": "warn",
117
+ "@eslint-react/jsx-no-undef": "error",
118
+ "@eslint-react/jsx-uses-react": "warn",
119
+ "@eslint-react/jsx-uses-vars": "warn",
120
+ "@eslint-react/no-access-state-in-setstate": "error",
121
+ "@eslint-react/no-array-index-key": "warn",
122
+ "@eslint-react/no-children-count": "warn",
123
+ "@eslint-react/no-children-for-each": "warn",
124
+ "@eslint-react/no-children-map": "warn",
125
+ "@eslint-react/no-children-only": "warn",
126
+ "@eslint-react/no-children-prop": "warn",
127
+ "@eslint-react/no-children-to-array": "warn",
128
+ "@eslint-react/no-class-component": "warn",
129
+ "@eslint-react/no-clone-element": "warn",
130
+ "@eslint-react/no-comment-textnodes": "warn",
131
+ "@eslint-react/no-complex-conditional-rendering": "warn",
132
+ "@eslint-react/no-component-will-mount": "error",
133
+ "@eslint-react/no-component-will-receive-props": "error",
134
+ "@eslint-react/no-component-will-update": "error",
135
+ "@eslint-react/no-context-provider": "warn",
136
+ "@eslint-react/no-create-ref": "error",
137
+ "@eslint-react/no-default-props": "error",
138
+ "@eslint-react/no-direct-mutation-state": "error",
139
+ "@eslint-react/no-duplicate-key": "warn",
140
+ "@eslint-react/no-forward-ref": "warn",
141
+ "@eslint-react/no-implicit-key": "warn",
142
+ "@eslint-react/no-missing-component-display-name": "warn",
143
+ "@eslint-react/no-missing-context-display-name": "warn",
144
+ "@eslint-react/no-missing-key": "error",
145
+ "@eslint-react/no-misused-capture-owner-stack": "error",
146
+ "@eslint-react/no-nested-component-definitions": "error",
147
+ "@eslint-react/no-nested-lazy-component-declarations": "warn",
148
+ "@eslint-react/no-prop-types": "error",
149
+ "@eslint-react/no-redundant-should-component-update": "error",
150
+ "@eslint-react/no-set-state-in-component-did-mount": "warn",
151
+ "@eslint-react/no-set-state-in-component-did-update": "warn",
152
+ "@eslint-react/no-set-state-in-component-will-update": "warn",
153
+ "@eslint-react/no-string-refs": "error",
154
+ "@eslint-react/no-unsafe-component-will-mount": "warn",
155
+ "@eslint-react/no-unsafe-component-will-receive-props": "warn",
156
+ "@eslint-react/no-unsafe-component-will-update": "warn",
157
+ "@eslint-react/no-unstable-context-value": "warn",
158
+ "@eslint-react/no-unstable-default-props": "warn",
159
+ "@eslint-react/no-unused-class-component-members": "warn",
160
+ "@eslint-react/no-unused-state": "warn",
161
+ "@eslint-react/no-use-context": "warn",
162
+ "@eslint-react/no-useless-forward-ref": "warn",
163
+ "@eslint-react/no-useless-fragment": "warn",
164
+ "@eslint-react/prefer-destructuring-assignment": "warn",
165
+ "@eslint-react/prefer-react-namespace-import": "warn",
166
+ "@eslint-react/prefer-shorthand-boolean": "off",
167
+ "@eslint-react/prefer-shorthand-fragment": "off",
168
+ "@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
169
+ "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
170
+ "@eslint-react/dom/no-find-dom-node": "error",
171
+ "@eslint-react/dom/no-flush-sync": "error",
172
+ "@eslint-react/dom/no-hydrate": "error",
173
+ "@eslint-react/dom/no-missing-button-type": "warn",
174
+ "@eslint-react/dom/no-missing-iframe-sandbox": "warn",
175
+ "@eslint-react/dom/no-namespace": "error",
176
+ "@eslint-react/dom/no-render": "error",
177
+ "@eslint-react/dom/no-render-return-value": "error",
178
+ "@eslint-react/dom/no-script-url": "warn",
179
+ "@eslint-react/dom/no-unknown-property": "warn",
180
+ "@eslint-react/dom/no-unsafe-iframe-sandbox": "warn",
181
+ "@eslint-react/dom/no-unsafe-target-blank": "warn",
182
+ "@eslint-react/dom/no-use-form-state": "error",
183
+ "@eslint-react/dom/no-void-elements-with-children": "error",
184
+ "@eslint-react/web-api/no-leaked-event-listener": "warn",
185
+ "@eslint-react/web-api/no-leaked-interval": "warn",
186
+ "@eslint-react/web-api/no-leaked-resize-observer": "warn",
187
+ "@eslint-react/web-api/no-leaked-timeout": "warn",
188
+ "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
189
+ "@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "warn",
190
+ "@eslint-react/hooks-extra/no-unnecessary-use-callback": "warn",
191
+ "@eslint-react/hooks-extra/no-unnecessary-use-memo": "warn",
192
+ "@eslint-react/hooks-extra/no-unnecessary-use-prefix": "warn",
193
+ "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
194
+ "@eslint-react/naming-convention/component-name": "warn",
195
+ "@eslint-react/naming-convention/context-name": "warn",
196
+ "@eslint-react/naming-convention/filename": "warn",
197
+ "@eslint-react/naming-convention/filename-extension": "warn",
198
+ "@eslint-react/naming-convention/use-state": "warn"
221
199
  };
222
- var settings3 = {
223
- ...settings
200
+ const plugins$5 = {
201
+ ...plugins$6,
202
+ ...plugins$7,
203
+ "@eslint-react/debug": reactDebug,
204
+ "@eslint-react/hooks-extra": reactHooksExtra,
205
+ "@eslint-react/naming-convention": reactNamingConvention,
206
+ "@eslint-react/web-api": reactWebApi
224
207
  };
208
+ const settings$4 = { ...settings$6 };
225
209
 
226
- // src/configs/debug.ts
210
+ //#endregion
211
+ //#region src/configs/debug.ts
227
212
  var debug_exports = {};
228
213
  __export(debug_exports, {
229
- name: () => name5,
230
- plugins: () => plugins4,
231
- rules: () => rules4
214
+ name: () => name$9,
215
+ plugins: () => plugins$4,
216
+ rules: () => rules$10
232
217
  });
233
- var name5 = "@eslint-react/debug";
234
- var rules4 = {
235
- "@eslint-react/debug/class-component": "warn",
236
- "@eslint-react/debug/function-component": "warn",
237
- "@eslint-react/debug/hook": "warn",
238
- "@eslint-react/debug/is-from-react": "warn",
239
- "@eslint-react/debug/jsx": "warn"
240
- };
241
- var plugins4 = {
242
- "@eslint-react/debug": reactDebug
218
+ const name$9 = "@eslint-react/debug";
219
+ const rules$10 = {
220
+ "@eslint-react/debug/class-component": "warn",
221
+ "@eslint-react/debug/function-component": "warn",
222
+ "@eslint-react/debug/hook": "warn",
223
+ "@eslint-react/debug/is-from-react": "warn",
224
+ "@eslint-react/debug/jsx": "warn"
243
225
  };
226
+ const plugins$4 = { "@eslint-react/debug": reactDebug };
244
227
 
245
- // src/configs/disable-debug.ts
228
+ //#endregion
229
+ //#region src/configs/disable-debug.ts
246
230
  var disable_debug_exports = {};
247
231
  __export(disable_debug_exports, {
248
- name: () => name6,
249
- rules: () => rules5
232
+ name: () => name$8,
233
+ rules: () => rules$11
250
234
  });
251
- var name6 = "@eslint-react/disable-debug";
252
- var rules5 = Object.fromEntries(
253
- Object.entries(rules4).map(([rule]) => [rule, "off"])
254
- );
235
+ const name$8 = "@eslint-react/disable-debug";
236
+ const rules$11 = Object.fromEntries(Object.entries(rules$10).map(([rule]) => [rule, "off"]));
255
237
 
256
- // src/configs/disable-dom.ts
238
+ //#endregion
239
+ //#region src/configs/disable-dom.ts
257
240
  var disable_dom_exports = {};
258
241
  __export(disable_dom_exports, {
259
- name: () => name7,
260
- rules: () => rules6
242
+ name: () => name$7,
243
+ rules: () => rules$9
261
244
  });
262
- var name7 = "@eslint-react/disable-dom";
263
- var rules6 = Object.fromEntries(
264
- Object.entries(rules).map(([key]) => [key, "off"])
265
- );
245
+ const name$7 = "@eslint-react/disable-dom";
246
+ const rules$9 = Object.fromEntries(Object.entries(rules$8).map(([key]) => [key, "off"]));
266
247
 
267
- // src/configs/disable-type-checked.ts
248
+ //#endregion
249
+ //#region src/configs/disable-type-checked.ts
268
250
  var disable_type_checked_exports = {};
269
251
  __export(disable_type_checked_exports, {
270
- name: () => name8,
271
- rules: () => rules7
252
+ name: () => name$6,
253
+ rules: () => rules$4
272
254
  });
273
- var name8 = "@eslint-react/disable-type-checked";
274
- var rules7 = {
275
- "@eslint-react/no-leaked-conditional-rendering": "off",
276
- "@eslint-react/prefer-read-only-props": "off"
255
+ const name$6 = "@eslint-react/disable-type-checked";
256
+ const rules$4 = {
257
+ "@eslint-react/no-leaked-conditional-rendering": "off",
258
+ "@eslint-react/prefer-read-only-props": "off"
259
+ };
260
+
261
+ //#endregion
262
+ //#region src/configs/web-api.ts
263
+ const rules$6 = {
264
+ "@eslint-react/web-api/no-leaked-event-listener": "warn",
265
+ "@eslint-react/web-api/no-leaked-interval": "warn",
266
+ "@eslint-react/web-api/no-leaked-resize-observer": "warn",
267
+ "@eslint-react/web-api/no-leaked-timeout": "warn"
277
268
  };
269
+ const plugins$3 = { "@eslint-react/web-api": reactWebApi };
270
+ const settings$3 = { ...settings$6 };
278
271
 
279
- // src/configs/disable-web-api.ts
272
+ //#endregion
273
+ //#region src/configs/disable-web-api.ts
280
274
  var disable_web_api_exports = {};
281
275
  __export(disable_web_api_exports, {
282
- name: () => name9,
283
- rules: () => rules9
276
+ name: () => name$5,
277
+ rules: () => rules$7
284
278
  });
285
- var rules8 = {
286
- "@eslint-react/web-api/no-leaked-event-listener": "warn",
287
- "@eslint-react/web-api/no-leaked-interval": "warn",
288
- "@eslint-react/web-api/no-leaked-resize-observer": "warn",
289
- "@eslint-react/web-api/no-leaked-timeout": "warn"
290
- };
291
- var plugins5 = {
292
- "@eslint-react/web-api": reactWebApi
293
- };
294
-
295
- // src/configs/disable-web-api.ts
296
- var name9 = "@eslint-react/disable-web-api";
297
- var rules9 = Object.fromEntries(
298
- Object.entries(rules8).map(([key]) => [key, "off"])
299
- );
279
+ const name$5 = "@eslint-react/disable-web-api";
280
+ const rules$7 = Object.fromEntries(Object.entries(rules$6).map(([key]) => [key, "off"]));
300
281
 
301
- // src/configs/off.ts
282
+ //#endregion
283
+ //#region src/configs/off.ts
302
284
  var off_exports = {};
303
285
  __export(off_exports, {
304
- name: () => name10,
305
- rules: () => rules10
286
+ name: () => name$4,
287
+ rules: () => rules$5
306
288
  });
307
- var name10 = "@eslint-react/off";
308
- var rules10 = {
309
- ...Object.fromEntries(Object.entries(rules3).map(([key]) => [key, "off"])),
310
- ...rules7
289
+ const name$4 = "@eslint-react/off";
290
+ const rules$5 = {
291
+ ...Object.fromEntries(Object.entries(rules$3).map(([key]) => [key, "off"])),
292
+ ...rules$4
311
293
  };
312
294
 
313
- // src/configs/recommended.ts
295
+ //#endregion
296
+ //#region src/configs/recommended.ts
314
297
  var recommended_exports = {};
315
298
  __export(recommended_exports, {
316
- name: () => name11,
317
- plugins: () => plugins6,
318
- rules: () => rules11,
319
- settings: () => settings5
299
+ name: () => name$3,
300
+ plugins: () => plugins$2,
301
+ rules: () => rules$2,
302
+ settings: () => settings$2
320
303
  });
321
- var name11 = "@eslint-react/recommended";
322
- var rules11 = {
323
- ...rules2,
324
- ...rules,
325
- ...rules8,
326
- "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
327
- "@eslint-react/hooks-extra/no-unnecessary-use-prefix": "warn",
328
- "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
329
- "@eslint-react/naming-convention/context-name": "warn"
330
- // "@eslint-react/naming-convention/use-state": "warn",
304
+ const name$3 = "@eslint-react/recommended";
305
+ const rules$2 = {
306
+ ...rules$12,
307
+ ...rules$8,
308
+ ...rules$6,
309
+ "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
310
+ "@eslint-react/hooks-extra/no-unnecessary-use-prefix": "warn",
311
+ "@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
312
+ "@eslint-react/naming-convention/context-name": "warn"
331
313
  };
332
- var plugins6 = {
333
- ...plugins2,
334
- ...plugins,
335
- ...plugins5,
336
- "@eslint-react/debug": reactDebug,
337
- "@eslint-react/hooks-extra": reactHooksExtra,
338
- "@eslint-react/naming-convention": reactNamingConvention
314
+ const plugins$2 = {
315
+ ...plugins$6,
316
+ ...plugins$7,
317
+ ...plugins$3,
318
+ "@eslint-react/debug": reactDebug,
319
+ "@eslint-react/hooks-extra": reactHooksExtra,
320
+ "@eslint-react/naming-convention": reactNamingConvention
339
321
  };
340
- var settings5 = {
341
- ...settings
342
- };
343
-
344
- // src/configs/recommended-type-checked.ts
345
- var recommended_type_checked_exports = {};
346
- __export(recommended_type_checked_exports, {
347
- name: () => name13,
348
- plugins: () => plugins8,
349
- rules: () => rules13,
350
- settings: () => settings7
351
- });
322
+ const settings$2 = { ...settings$6 };
352
323
 
353
- // src/configs/recommended-typescript.ts
324
+ //#endregion
325
+ //#region src/configs/recommended-typescript.ts
354
326
  var recommended_typescript_exports = {};
355
327
  __export(recommended_typescript_exports, {
356
- name: () => name12,
357
- plugins: () => plugins7,
358
- rules: () => rules12,
359
- settings: () => settings6
328
+ name: () => name$2,
329
+ plugins: () => plugins$1,
330
+ rules: () => rules$1,
331
+ settings: () => settings$1
360
332
  });
361
- var name12 = "@eslint-react/recommended-typescript";
362
- var rules12 = {
363
- ...rules11,
364
- "@eslint-react/dom/no-unknown-property": "off",
365
- "@eslint-react/jsx-no-duplicate-props": "off",
366
- "@eslint-react/jsx-uses-react": "off",
367
- "@eslint-react/jsx-uses-vars": "off"
368
- };
369
- var plugins7 = {
370
- ...plugins6
371
- };
372
- var settings6 = {
373
- ...settings5
333
+ const name$2 = "@eslint-react/recommended-typescript";
334
+ const rules$1 = {
335
+ ...rules$2,
336
+ "@eslint-react/dom/no-unknown-property": "off",
337
+ "@eslint-react/jsx-no-duplicate-props": "off",
338
+ "@eslint-react/jsx-uses-react": "off",
339
+ "@eslint-react/jsx-uses-vars": "off"
374
340
  };
341
+ const plugins$1 = { ...plugins$2 };
342
+ const settings$1 = { ...settings$2 };
375
343
 
376
- // src/configs/recommended-type-checked.ts
377
- var name13 = "@eslint-react/recommended-type-checked";
378
- var rules13 = {
379
- ...rules12,
380
- "@eslint-react/no-leaked-conditional-rendering": "warn"
381
- // "@eslint-react/prefer-read-only-props": "warn",
382
- };
383
- var plugins8 = {
384
- ...plugins7
385
- };
386
- var settings7 = {
387
- ...settings6
344
+ //#endregion
345
+ //#region src/configs/recommended-type-checked.ts
346
+ var recommended_type_checked_exports = {};
347
+ __export(recommended_type_checked_exports, {
348
+ name: () => name$1,
349
+ plugins: () => plugins,
350
+ rules: () => rules,
351
+ settings: () => settings
352
+ });
353
+ const name$1 = "@eslint-react/recommended-type-checked";
354
+ const rules = {
355
+ ...rules$1,
356
+ "@eslint-react/no-leaked-conditional-rendering": "warn"
388
357
  };
358
+ const plugins = { ...plugins$1 };
359
+ const settings = { ...settings$1 };
389
360
 
390
- // src/utils/type-of.ts
361
+ //#endregion
362
+ //#region src/utils/type-of.ts
363
+ /**
364
+ * This is an enhanced version of the typeof operator to check the type of more complex values.
365
+ * In this case we just mind about arrays and objects. We can add more on demand.
366
+ * @param t the value to be checked
367
+ * @returns the type of the value
368
+ */
391
369
  function typeOf(t) {
392
- return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/, "$1").toLowerCase();
370
+ return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/, "$1").toLowerCase();
393
371
  }
394
372
 
395
- // src/utils/transform-keys.ts
373
+ //#endregion
374
+ //#region src/utils/transform-keys.ts
375
+ /**
376
+ * This function is used to shallowly transform the keys of an object.
377
+ * It will only be transformed at runtime, so it's not type safe.
378
+ * @param obj the object to transform.
379
+ * @param transform the function to transform the keys from string to string.
380
+ * @returns the transformed object.
381
+ * @example transformKeys({ 'foo-bar': { 'fizz-buzz': true } }, camelCase)
382
+ * // { fooBar: { 'fizz-buzz': true } }
383
+ */
396
384
  function transformKeys(obj, transform) {
397
- if (typeOf(obj) !== "object") {
398
- return obj;
399
- }
400
- const res = {};
401
- for (const key in obj) {
402
- res[transform(key)] = obj[key];
403
- }
404
- return res;
385
+ if (typeOf(obj) !== "object") return obj;
386
+ const res = {};
387
+ for (const key in obj) res[transform(key)] = obj[key];
388
+ return res;
405
389
  }
406
390
 
407
- // src/utils/pad-keys-left.ts
391
+ //#endregion
392
+ //#region src/utils/pad-keys-left.ts
408
393
  function padKeysLeft(obj, left) {
409
- return transformKeys(obj, (key) => `${left}${key}`);
394
+ return transformKeys(obj, (key) => `${left}${key}`);
410
395
  }
411
396
 
412
- // src/index.ts
413
- function toLegacyConfig({ rules: rules14 }) {
414
- return {
415
- plugins: ["@eslint-react"],
416
- rules: rules14
417
- };
397
+ //#endregion
398
+ //#region src/index.ts
399
+ function toLegacyConfig({ rules: rules$13 }) {
400
+ return {
401
+ plugins: ["@eslint-react"],
402
+ rules: rules$13
403
+ };
418
404
  }
419
- var plugin = {
420
- meta: {
421
- name,
422
- version
423
- },
424
- rules: {
425
- ...react.rules,
426
- ...padKeysLeft(reactDom.rules, "dom/"),
427
- ...padKeysLeft(reactWebApi.rules, "web-api/"),
428
- ...padKeysLeft(reactHooksExtra.rules, "hooks-extra/"),
429
- ...padKeysLeft(reactNamingConvention.rules, "naming-convention/"),
430
- ...padKeysLeft(reactDebug.rules, "debug/")
431
- }
405
+ const plugin = {
406
+ meta: {
407
+ name,
408
+ version
409
+ },
410
+ rules: {
411
+ ...react.rules,
412
+ ...padKeysLeft(reactDom.rules, "dom/"),
413
+ ...padKeysLeft(reactWebApi.rules, "web-api/"),
414
+ ...padKeysLeft(reactHooksExtra.rules, "hooks-extra/"),
415
+ ...padKeysLeft(reactNamingConvention.rules, "naming-convention/"),
416
+ ...padKeysLeft(reactDebug.rules, "debug/")
417
+ }
432
418
  };
433
- var index_default = {
434
- ...plugin,
435
- configs: {
436
- ["all"]: all_exports,
437
- ["all-legacy"]: toLegacyConfig(all_exports),
438
- ["debug"]: debug_exports,
439
- ["debug-legacy"]: toLegacyConfig(debug_exports),
440
- ["disable-debug"]: disable_debug_exports,
441
- ["disable-debug-legacy"]: toLegacyConfig(disable_debug_exports),
442
- ["disable-dom"]: disable_dom_exports,
443
- ["disable-dom-legacy"]: toLegacyConfig(disable_dom_exports),
444
- ["disable-type-checked"]: disable_type_checked_exports,
445
- ["disable-type-checked-legacy"]: toLegacyConfig(disable_type_checked_exports),
446
- ["disable-web-api"]: disable_web_api_exports,
447
- ["disable-web-api-legacy"]: toLegacyConfig(disable_web_api_exports),
448
- ["dom"]: dom_exports,
449
- ["dom-legacy"]: toLegacyConfig(dom_exports),
450
- ["off"]: off_exports,
451
- ["off-legacy"]: toLegacyConfig(off_exports),
452
- ["recommended"]: recommended_exports,
453
- ["recommended-legacy"]: toLegacyConfig(recommended_exports),
454
- ["recommended-type-checked"]: recommended_type_checked_exports,
455
- ["recommended-type-checked-legacy"]: toLegacyConfig(recommended_type_checked_exports),
456
- ["recommended-typescript"]: recommended_typescript_exports,
457
- ["recommended-typescript-legacy"]: toLegacyConfig(recommended_typescript_exports),
458
- ["x"]: x_exports,
459
- ["x-legacy"]: toLegacyConfig(x_exports),
460
- // Part: deprecated presets
461
- /** @deprecated Use `x` instead */
462
- ["core"]: x_exports,
463
- /** @deprecated Use `x-legacy` instead */
464
- ["core-legacy"]: toLegacyConfig(x_exports),
465
- /** @deprecated Use `disable-dom` instead */
466
- ["off-dom"]: disable_dom_exports,
467
- /** @deprecated Use `disable-dom-legacy` instead */
468
- ["off-dom-legacy"]: toLegacyConfig(disable_dom_exports)
469
- }
419
+ var src_default = {
420
+ ...plugin,
421
+ configs: {
422
+ ["all"]: all_exports,
423
+ ["all-legacy"]: toLegacyConfig(all_exports),
424
+ ["debug"]: debug_exports,
425
+ ["debug-legacy"]: toLegacyConfig(debug_exports),
426
+ ["disable-debug"]: disable_debug_exports,
427
+ ["disable-debug-legacy"]: toLegacyConfig(disable_debug_exports),
428
+ ["disable-dom"]: disable_dom_exports,
429
+ ["disable-dom-legacy"]: toLegacyConfig(disable_dom_exports),
430
+ ["disable-type-checked"]: disable_type_checked_exports,
431
+ ["disable-type-checked-legacy"]: toLegacyConfig(disable_type_checked_exports),
432
+ ["disable-web-api"]: disable_web_api_exports,
433
+ ["disable-web-api-legacy"]: toLegacyConfig(disable_web_api_exports),
434
+ ["dom"]: dom_exports,
435
+ ["dom-legacy"]: toLegacyConfig(dom_exports),
436
+ ["off"]: off_exports,
437
+ ["off-legacy"]: toLegacyConfig(off_exports),
438
+ ["recommended"]: recommended_exports,
439
+ ["recommended-legacy"]: toLegacyConfig(recommended_exports),
440
+ ["recommended-type-checked"]: recommended_type_checked_exports,
441
+ ["recommended-type-checked-legacy"]: toLegacyConfig(recommended_type_checked_exports),
442
+ ["recommended-typescript"]: recommended_typescript_exports,
443
+ ["recommended-typescript-legacy"]: toLegacyConfig(recommended_typescript_exports),
444
+ ["x"]: x_exports,
445
+ ["x-legacy"]: toLegacyConfig(x_exports),
446
+ ["core"]: x_exports,
447
+ ["core-legacy"]: toLegacyConfig(x_exports),
448
+ ["off-dom"]: disable_dom_exports,
449
+ ["off-dom-legacy"]: toLegacyConfig(disable_dom_exports)
450
+ }
470
451
  };
471
452
 
472
- export { index_default as default };
453
+ //#endregion
454
+ export { src_default as default };