@luxass/eslint-config 4.2.5 → 4.2.7

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 (144) hide show
  1. package/README.md +35 -54
  2. package/dist/index.cjs +166 -479
  3. package/dist/index.d.cts +733 -12
  4. package/dist/index.d.ts +733 -12
  5. package/dist/{configs/index.cjs → index.js} +300 -542
  6. package/package.json +51 -86
  7. package/dist/chunk-4YBQZLPS.mjs +0 -68
  8. package/dist/chunk-4YT54JFZ.mjs +0 -48
  9. package/dist/chunk-5NK24IKQ.mjs +0 -26
  10. package/dist/chunk-6T7MXPCT.mjs +0 -17
  11. package/dist/chunk-7ODEIBF5.mjs +0 -144
  12. package/dist/chunk-AQRBQAKE.mjs +0 -48
  13. package/dist/chunk-DAJA5AV3.mjs +0 -29
  14. package/dist/chunk-DCOLHWHC.mjs +0 -269
  15. package/dist/chunk-DVQQVCGF.mjs +0 -45
  16. package/dist/chunk-EHWA727G.mjs +0 -69
  17. package/dist/chunk-FNOIGW47.mjs +0 -104
  18. package/dist/chunk-KOXCJL3C.mjs +0 -109
  19. package/dist/chunk-MMSZW2UW.mjs +0 -92
  20. package/dist/chunk-MT5P5EKH.mjs +0 -207
  21. package/dist/chunk-O2BXTQHK.mjs +0 -117
  22. package/dist/chunk-QDSV5ONX.mjs +0 -93
  23. package/dist/chunk-QMGT2Z63.mjs +0 -57
  24. package/dist/chunk-RVSUTDCE.mjs +0 -57
  25. package/dist/chunk-SPD4DGYN.mjs +0 -274
  26. package/dist/chunk-UITQW3RA.mjs +0 -293
  27. package/dist/chunk-V57HXOSW.mjs +0 -81
  28. package/dist/chunk-WDSV2EFG.mjs +0 -7
  29. package/dist/chunk-WOBGA3K2.mjs +0 -63
  30. package/dist/chunk-WSQOWO67.mjs +0 -16
  31. package/dist/chunk-XBASVDU6.mjs +0 -215
  32. package/dist/chunk-XPKGXA67.mjs +0 -183
  33. package/dist/chunk-YGZJUKJC.mjs +0 -0
  34. package/dist/chunk-YO3IYQ2L.mjs +0 -220
  35. package/dist/configs/astro.cjs +0 -179
  36. package/dist/configs/astro.d.cts +0 -11
  37. package/dist/configs/astro.d.ts +0 -11
  38. package/dist/configs/astro.mjs +0 -8
  39. package/dist/configs/comments.cjs +0 -63
  40. package/dist/configs/comments.d.cts +0 -15
  41. package/dist/configs/comments.d.ts +0 -15
  42. package/dist/configs/comments.mjs +0 -6
  43. package/dist/configs/formatters.cjs +0 -274
  44. package/dist/configs/formatters.d.cts +0 -11
  45. package/dist/configs/formatters.d.ts +0 -11
  46. package/dist/configs/formatters.mjs +0 -9
  47. package/dist/configs/ignores.cjs +0 -96
  48. package/dist/configs/ignores.d.cts +0 -15
  49. package/dist/configs/ignores.d.ts +0 -15
  50. package/dist/configs/ignores.mjs +0 -7
  51. package/dist/configs/imports.cjs +0 -104
  52. package/dist/configs/imports.d.cts +0 -23
  53. package/dist/configs/imports.d.ts +0 -23
  54. package/dist/configs/imports.mjs +0 -7
  55. package/dist/configs/index.d.cts +0 -20
  56. package/dist/configs/index.d.ts +0 -20
  57. package/dist/configs/index.mjs +0 -104
  58. package/dist/configs/javascript.cjs +0 -324
  59. package/dist/configs/javascript.d.cts +0 -11
  60. package/dist/configs/javascript.d.ts +0 -11
  61. package/dist/configs/javascript.mjs +0 -7
  62. package/dist/configs/jsdoc.cjs +0 -85
  63. package/dist/configs/jsdoc.d.cts +0 -27
  64. package/dist/configs/jsdoc.d.ts +0 -27
  65. package/dist/configs/jsdoc.mjs +0 -7
  66. package/dist/configs/jsonc.cjs +0 -155
  67. package/dist/configs/jsonc.d.cts +0 -11
  68. package/dist/configs/jsonc.d.ts +0 -11
  69. package/dist/configs/jsonc.mjs +0 -8
  70. package/dist/configs/markdown.cjs +0 -164
  71. package/dist/configs/markdown.d.cts +0 -35
  72. package/dist/configs/markdown.d.ts +0 -35
  73. package/dist/configs/markdown.mjs +0 -8
  74. package/dist/configs/nextjs.cjs +0 -180
  75. package/dist/configs/nextjs.d.cts +0 -11
  76. package/dist/configs/nextjs.d.ts +0 -11
  77. package/dist/configs/nextjs.mjs +0 -8
  78. package/dist/configs/node.cjs +0 -60
  79. package/dist/configs/node.d.cts +0 -15
  80. package/dist/configs/node.d.ts +0 -15
  81. package/dist/configs/node.mjs +0 -6
  82. package/dist/configs/perfectionist.cjs +0 -51
  83. package/dist/configs/perfectionist.d.cts +0 -20
  84. package/dist/configs/perfectionist.d.ts +0 -20
  85. package/dist/configs/perfectionist.mjs +0 -6
  86. package/dist/configs/react.cjs +0 -379
  87. package/dist/configs/react.d.cts +0 -11
  88. package/dist/configs/react.d.ts +0 -11
  89. package/dist/configs/react.mjs +0 -8
  90. package/dist/configs/solid.cjs +0 -360
  91. package/dist/configs/solid.d.cts +0 -11
  92. package/dist/configs/solid.d.ts +0 -11
  93. package/dist/configs/solid.mjs +0 -8
  94. package/dist/configs/sort.cjs +0 -240
  95. package/dist/configs/sort.d.cts +0 -26
  96. package/dist/configs/sort.d.ts +0 -26
  97. package/dist/configs/sort.mjs +0 -8
  98. package/dist/configs/stylistic.cjs +0 -98
  99. package/dist/configs/stylistic.d.cts +0 -11
  100. package/dist/configs/stylistic.d.ts +0 -11
  101. package/dist/configs/stylistic.mjs +0 -9
  102. package/dist/configs/tailwindcss.cjs +0 -148
  103. package/dist/configs/tailwindcss.d.cts +0 -11
  104. package/dist/configs/tailwindcss.d.ts +0 -11
  105. package/dist/configs/tailwindcss.mjs +0 -8
  106. package/dist/configs/test.cjs +0 -206
  107. package/dist/configs/test.d.cts +0 -11
  108. package/dist/configs/test.d.ts +0 -11
  109. package/dist/configs/test.mjs +0 -9
  110. package/dist/configs/toml.cjs +0 -131
  111. package/dist/configs/toml.d.cts +0 -11
  112. package/dist/configs/toml.d.ts +0 -11
  113. package/dist/configs/toml.mjs +0 -8
  114. package/dist/configs/typescript.cjs +0 -291
  115. package/dist/configs/typescript.d.cts +0 -11
  116. package/dist/configs/typescript.d.ts +0 -11
  117. package/dist/configs/typescript.mjs +0 -8
  118. package/dist/configs/unicorn.cjs +0 -91
  119. package/dist/configs/unicorn.d.cts +0 -15
  120. package/dist/configs/unicorn.d.ts +0 -15
  121. package/dist/configs/unicorn.mjs +0 -6
  122. package/dist/configs/unocss.cjs +0 -133
  123. package/dist/configs/unocss.d.cts +0 -11
  124. package/dist/configs/unocss.d.ts +0 -11
  125. package/dist/configs/unocss.mjs +0 -8
  126. package/dist/configs/vue.cjs +0 -293
  127. package/dist/configs/vue.d.cts +0 -11
  128. package/dist/configs/vue.d.ts +0 -11
  129. package/dist/configs/vue.mjs +0 -8
  130. package/dist/configs/yaml.cjs +0 -143
  131. package/dist/configs/yaml.d.cts +0 -11
  132. package/dist/configs/yaml.d.ts +0 -11
  133. package/dist/configs/yaml.mjs +0 -8
  134. package/dist/custom-rules/utils.cjs +0 -31
  135. package/dist/custom-rules/utils.d.cts +0 -6
  136. package/dist/custom-rules/utils.d.ts +0 -6
  137. package/dist/custom-rules/utils.mjs +0 -6
  138. package/dist/globs.cjs +0 -158
  139. package/dist/globs.d.cts +0 -28
  140. package/dist/globs.d.ts +0 -28
  141. package/dist/globs.mjs +0 -56
  142. package/dist/index.mjs +0 -284
  143. package/dist/types-HqEzZfQU.d.cts +0 -668
  144. package/dist/types-HqEzZfQU.d.ts +0 -668
@@ -1,274 +0,0 @@
1
- import {
2
- ensure,
3
- interop
4
- } from "./chunk-4YBQZLPS.mjs";
5
- import {
6
- GLOB_JSX,
7
- GLOB_TSX
8
- } from "./chunk-KOXCJL3C.mjs";
9
-
10
- // src/configs/solid.ts
11
- async function solid(options = {}) {
12
- const {
13
- a11y = false,
14
- files = [GLOB_JSX, GLOB_TSX],
15
- overrides = {},
16
- typescript = true
17
- } = options;
18
- await ensure([
19
- "eslint-plugin-solid"
20
- ]);
21
- const [
22
- pluginSolid
23
- ] = await Promise.all([
24
- interop(import("eslint-plugin-solid"))
25
- ]);
26
- return [
27
- {
28
- name: "luxass:solid:setup",
29
- plugins: {
30
- solid: pluginSolid
31
- }
32
- },
33
- {
34
- name: "luxass:solid:rules",
35
- files,
36
- languageOptions: {
37
- parserOptions: {
38
- ecmaFeatures: {
39
- jsx: true
40
- }
41
- },
42
- sourceType: "module"
43
- },
44
- rules: {
45
- ...a11y ? {
46
- // recommended rules for jsx-a11y
47
- "jsx-a11y/alt-text": "error",
48
- "jsx-a11y/anchor-ambiguous-text": "off",
49
- "jsx-a11y/anchor-has-content": "error",
50
- "jsx-a11y/anchor-is-valid": "error",
51
- "jsx-a11y/aria-activedescendant-has-tabindex": "error",
52
- "jsx-a11y/aria-props": "error",
53
- "jsx-a11y/aria-proptypes": "error",
54
- "jsx-a11y/aria-role": "error",
55
- "jsx-a11y/aria-unsupported-elements": "error",
56
- "jsx-a11y/autocomplete-valid": "error",
57
- "jsx-a11y/click-events-have-key-events": "error",
58
- "jsx-a11y/control-has-associated-label": [
59
- "off",
60
- {
61
- ignoreElements: [
62
- "audio",
63
- "canvas",
64
- "embed",
65
- "input",
66
- "textarea",
67
- "tr",
68
- "video"
69
- ],
70
- ignoreRoles: [
71
- "grid",
72
- "listbox",
73
- "menu",
74
- "menubar",
75
- "radiogroup",
76
- "row",
77
- "tablist",
78
- "toolbar",
79
- "tree",
80
- "treegrid"
81
- ],
82
- includeRoles: [
83
- "alert",
84
- "dialog"
85
- ]
86
- }
87
- ],
88
- "jsx-a11y/heading-has-content": "error",
89
- "jsx-a11y/html-has-lang": "error",
90
- "jsx-a11y/iframe-has-title": "error",
91
- "jsx-a11y/img-redundant-alt": "error",
92
- "jsx-a11y/interactive-supports-focus": [
93
- "error",
94
- {
95
- tabbable: [
96
- "button",
97
- "checkbox",
98
- "link",
99
- "searchbox",
100
- "spinbutton",
101
- "switch",
102
- "textbox"
103
- ]
104
- }
105
- ],
106
- "jsx-a11y/label-has-associated-control": "error",
107
- "jsx-a11y/label-has-for": "off",
108
- "jsx-a11y/media-has-caption": "error",
109
- "jsx-a11y/mouse-events-have-key-events": "error",
110
- "jsx-a11y/no-access-key": "error",
111
- "jsx-a11y/no-autofocus": "error",
112
- "jsx-a11y/no-distracting-elements": "error",
113
- "jsx-a11y/no-interactive-element-to-noninteractive-role": [
114
- "error",
115
- {
116
- canvas: [
117
- "img"
118
- ],
119
- tr: [
120
- "none",
121
- "presentation"
122
- ]
123
- }
124
- ],
125
- "jsx-a11y/no-noninteractive-element-interactions": [
126
- "error",
127
- {
128
- alert: [
129
- "onKeyUp",
130
- "onKeyDown",
131
- "onKeyPress"
132
- ],
133
- body: [
134
- "onError",
135
- "onLoad"
136
- ],
137
- dialog: [
138
- "onKeyUp",
139
- "onKeyDown",
140
- "onKeyPress"
141
- ],
142
- handlers: [
143
- "onClick",
144
- "onError",
145
- "onLoad",
146
- "onMouseDown",
147
- "onMouseUp",
148
- "onKeyPress",
149
- "onKeyDown",
150
- "onKeyUp"
151
- ],
152
- iframe: [
153
- "onError",
154
- "onLoad"
155
- ],
156
- img: [
157
- "onError",
158
- "onLoad"
159
- ]
160
- }
161
- ],
162
- "jsx-a11y/no-noninteractive-element-to-interactive-role": [
163
- "error",
164
- {
165
- fieldset: [
166
- "radiogroup",
167
- "presentation"
168
- ],
169
- li: [
170
- "menuitem",
171
- "option",
172
- "row",
173
- "tab",
174
- "treeitem"
175
- ],
176
- ol: [
177
- "listbox",
178
- "menu",
179
- "menubar",
180
- "radiogroup",
181
- "tablist",
182
- "tree",
183
- "treegrid"
184
- ],
185
- table: [
186
- "grid"
187
- ],
188
- td: [
189
- "gridcell"
190
- ],
191
- ul: [
192
- "listbox",
193
- "menu",
194
- "menubar",
195
- "radiogroup",
196
- "tablist",
197
- "tree",
198
- "treegrid"
199
- ]
200
- }
201
- ],
202
- "jsx-a11y/no-noninteractive-tabindex": [
203
- "error",
204
- {
205
- allowExpressionValues: true,
206
- roles: [
207
- "tabpanel"
208
- ],
209
- tags: []
210
- }
211
- ],
212
- "jsx-a11y/no-redundant-roles": "error",
213
- "jsx-a11y/no-static-element-interactions": [
214
- "error",
215
- {
216
- allowExpressionValues: true,
217
- handlers: [
218
- "onClick",
219
- "onMouseDown",
220
- "onMouseUp",
221
- "onKeyPress",
222
- "onKeyDown",
223
- "onKeyUp"
224
- ]
225
- }
226
- ],
227
- "jsx-a11y/role-has-required-aria-props": "error",
228
- "jsx-a11y/role-supports-aria-props": "error",
229
- "jsx-a11y/scope": "error",
230
- "jsx-a11y/tabindex-no-positive": "error"
231
- } : {},
232
- // solid recommended rules
233
- // reactivity
234
- "solid/components-return-once": 1,
235
- "solid/event-handlers": 1,
236
- // these rules are mostly style suggestions
237
- "solid/imports": 1,
238
- // identifier usage is important
239
- "solid/jsx-no-duplicate-props": 2,
240
- "solid/jsx-no-script-url": 2,
241
- "solid/jsx-no-undef": 2,
242
- "solid/jsx-uses-vars": 2,
243
- "solid/no-array-handlers": 0,
244
- "solid/no-destructure": 2,
245
- // security problems
246
- "solid/no-innerhtml": 2,
247
- // only necessary for resource-constrained environments
248
- "solid/no-proxy-apis": 0,
249
- "solid/no-react-deps": 1,
250
- "solid/no-react-specific-props": 1,
251
- "solid/no-unknown-namespaces": 2,
252
- // deprecated
253
- "solid/prefer-classlist": 0,
254
- "solid/prefer-for": 2,
255
- // handled by Solid compiler, opt-in style suggestion
256
- "solid/prefer-show": 0,
257
- "solid/reactivity": 1,
258
- "solid/self-closing-comp": 1,
259
- "solid/style-prop": 1,
260
- ...typescript ? {
261
- "solid/jsx-no-undef": [2, { typescriptEnabled: true }],
262
- // namespaces taken care of by TS
263
- "solid/no-unknown-namespaces": 0
264
- } : {},
265
- // overrides
266
- ...overrides
267
- }
268
- }
269
- ];
270
- }
271
-
272
- export {
273
- solid
274
- };
@@ -1,293 +0,0 @@
1
- import {
2
- ensure,
3
- interop
4
- } from "./chunk-4YBQZLPS.mjs";
5
- import {
6
- GLOB_JSX,
7
- GLOB_TSX
8
- } from "./chunk-KOXCJL3C.mjs";
9
-
10
- // src/configs/react.ts
11
- import { isPackageExists } from "local-pkg";
12
- async function react(options = {}) {
13
- const {
14
- a11y = false,
15
- files = [GLOB_JSX, GLOB_TSX],
16
- overrides = {},
17
- typescript = true
18
- } = options;
19
- await ensure([
20
- "eslint-plugin-react",
21
- "eslint-plugin-react-hooks",
22
- "eslint-plugin-react-refresh",
23
- ...options.a11y ? ["eslint-plugin-jsx-a11y"] : []
24
- ]);
25
- const [
26
- pluginReact,
27
- pluginReactHooks,
28
- pluginReactRefresh,
29
- pluginA11y
30
- ] = await Promise.all([
31
- interop(import("eslint-plugin-react")),
32
- interop(import("eslint-plugin-react-hooks")),
33
- interop(import("eslint-plugin-react-refresh")),
34
- ...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
35
- ]);
36
- const isAllowConstantExport = ["vite"].some(
37
- (i) => isPackageExists(i)
38
- );
39
- return [
40
- {
41
- name: "luxass:react:setup",
42
- plugins: {
43
- "react": pluginReact,
44
- "react-hooks": pluginReactHooks,
45
- "react-refresh": pluginReactRefresh,
46
- ...a11y ? { "jsx-a11y": pluginA11y } : {}
47
- }
48
- },
49
- {
50
- name: "luxass:react:rules",
51
- files,
52
- languageOptions: {
53
- parserOptions: {
54
- ecmaFeatures: {
55
- jsx: true
56
- }
57
- }
58
- },
59
- rules: {
60
- ...a11y ? {
61
- // recommended rules for jsx-a11y
62
- "jsx-a11y/alt-text": "error",
63
- "jsx-a11y/anchor-ambiguous-text": "off",
64
- "jsx-a11y/anchor-has-content": "error",
65
- "jsx-a11y/anchor-is-valid": "error",
66
- "jsx-a11y/aria-activedescendant-has-tabindex": "error",
67
- "jsx-a11y/aria-props": "error",
68
- "jsx-a11y/aria-proptypes": "error",
69
- "jsx-a11y/aria-role": "error",
70
- "jsx-a11y/aria-unsupported-elements": "error",
71
- "jsx-a11y/autocomplete-valid": "error",
72
- "jsx-a11y/click-events-have-key-events": "error",
73
- "jsx-a11y/control-has-associated-label": [
74
- "off",
75
- {
76
- ignoreElements: [
77
- "audio",
78
- "canvas",
79
- "embed",
80
- "input",
81
- "textarea",
82
- "tr",
83
- "video"
84
- ],
85
- ignoreRoles: [
86
- "grid",
87
- "listbox",
88
- "menu",
89
- "menubar",
90
- "radiogroup",
91
- "row",
92
- "tablist",
93
- "toolbar",
94
- "tree",
95
- "treegrid"
96
- ],
97
- includeRoles: [
98
- "alert",
99
- "dialog"
100
- ]
101
- }
102
- ],
103
- "jsx-a11y/heading-has-content": "error",
104
- "jsx-a11y/html-has-lang": "error",
105
- "jsx-a11y/iframe-has-title": "error",
106
- "jsx-a11y/img-redundant-alt": "error",
107
- "jsx-a11y/interactive-supports-focus": [
108
- "error",
109
- {
110
- tabbable: [
111
- "button",
112
- "checkbox",
113
- "link",
114
- "searchbox",
115
- "spinbutton",
116
- "switch",
117
- "textbox"
118
- ]
119
- }
120
- ],
121
- "jsx-a11y/label-has-associated-control": "error",
122
- "jsx-a11y/label-has-for": "off",
123
- "jsx-a11y/media-has-caption": "error",
124
- "jsx-a11y/mouse-events-have-key-events": "error",
125
- "jsx-a11y/no-access-key": "error",
126
- "jsx-a11y/no-autofocus": "error",
127
- "jsx-a11y/no-distracting-elements": "error",
128
- "jsx-a11y/no-interactive-element-to-noninteractive-role": [
129
- "error",
130
- {
131
- canvas: [
132
- "img"
133
- ],
134
- tr: [
135
- "none",
136
- "presentation"
137
- ]
138
- }
139
- ],
140
- "jsx-a11y/no-noninteractive-element-interactions": [
141
- "error",
142
- {
143
- alert: [
144
- "onKeyUp",
145
- "onKeyDown",
146
- "onKeyPress"
147
- ],
148
- body: [
149
- "onError",
150
- "onLoad"
151
- ],
152
- dialog: [
153
- "onKeyUp",
154
- "onKeyDown",
155
- "onKeyPress"
156
- ],
157
- handlers: [
158
- "onClick",
159
- "onError",
160
- "onLoad",
161
- "onMouseDown",
162
- "onMouseUp",
163
- "onKeyPress",
164
- "onKeyDown",
165
- "onKeyUp"
166
- ],
167
- iframe: [
168
- "onError",
169
- "onLoad"
170
- ],
171
- img: [
172
- "onError",
173
- "onLoad"
174
- ]
175
- }
176
- ],
177
- "jsx-a11y/no-noninteractive-element-to-interactive-role": [
178
- "error",
179
- {
180
- fieldset: [
181
- "radiogroup",
182
- "presentation"
183
- ],
184
- li: [
185
- "menuitem",
186
- "option",
187
- "row",
188
- "tab",
189
- "treeitem"
190
- ],
191
- ol: [
192
- "listbox",
193
- "menu",
194
- "menubar",
195
- "radiogroup",
196
- "tablist",
197
- "tree",
198
- "treegrid"
199
- ],
200
- table: [
201
- "grid"
202
- ],
203
- td: [
204
- "gridcell"
205
- ],
206
- ul: [
207
- "listbox",
208
- "menu",
209
- "menubar",
210
- "radiogroup",
211
- "tablist",
212
- "tree",
213
- "treegrid"
214
- ]
215
- }
216
- ],
217
- "jsx-a11y/no-noninteractive-tabindex": [
218
- "error",
219
- {
220
- allowExpressionValues: true,
221
- roles: [
222
- "tabpanel"
223
- ],
224
- tags: []
225
- }
226
- ],
227
- "jsx-a11y/no-redundant-roles": "error",
228
- "jsx-a11y/no-static-element-interactions": [
229
- "error",
230
- {
231
- allowExpressionValues: true,
232
- handlers: [
233
- "onClick",
234
- "onMouseDown",
235
- "onMouseUp",
236
- "onKeyPress",
237
- "onKeyDown",
238
- "onKeyUp"
239
- ]
240
- }
241
- ],
242
- "jsx-a11y/role-has-required-aria-props": "error",
243
- "jsx-a11y/role-supports-aria-props": "error",
244
- "jsx-a11y/scope": "error",
245
- "jsx-a11y/tabindex-no-positive": "error"
246
- } : {},
247
- // recommended rules react
248
- "react/display-name": "error",
249
- "react/jsx-key": "error",
250
- "react/jsx-no-comment-textnodes": "error",
251
- "react/jsx-no-duplicate-props": "error",
252
- "react/jsx-no-target-blank": "error",
253
- "react/jsx-no-undef": "error",
254
- "react/jsx-uses-react": "error",
255
- "react/jsx-uses-vars": "error",
256
- "react/no-children-prop": "error",
257
- "react/no-danger-with-children": "error",
258
- "react/no-deprecated": "error",
259
- "react/no-direct-mutation-state": "error",
260
- "react/no-find-dom-node": "error",
261
- "react/no-is-mounted": "error",
262
- "react/no-render-return-value": "error",
263
- "react/no-string-refs": "error",
264
- "react/no-unescaped-entities": "error",
265
- "react/no-unknown-property": "error",
266
- "react/no-unsafe": "off",
267
- "react/prop-types": "error",
268
- "react/react-in-jsx-scope": "off",
269
- "react/require-render-return": "error",
270
- // recommended rules react-hooks
271
- "react-hooks/exhaustive-deps": "warn",
272
- "react-hooks/rules-of-hooks": "error",
273
- // react refresh
274
- "react-refresh/only-export-components": ["warn", { allowConstantExport: isAllowConstantExport }],
275
- ...typescript ? {
276
- "react/jsx-no-undef": "off",
277
- "react/prop-type": "off"
278
- } : {},
279
- // overrides
280
- ...overrides
281
- },
282
- settings: {
283
- react: {
284
- version: "detect"
285
- }
286
- }
287
- }
288
- ];
289
- }
290
-
291
- export {
292
- react
293
- };
@@ -1,81 +0,0 @@
1
- import {
2
- interop
3
- } from "./chunk-4YBQZLPS.mjs";
4
- import {
5
- GLOB_YAML
6
- } from "./chunk-KOXCJL3C.mjs";
7
-
8
- // src/configs/yaml.ts
9
- async function yaml(options = {}) {
10
- const {
11
- files = [GLOB_YAML],
12
- overrides = {},
13
- stylistic = true
14
- } = options;
15
- const [
16
- pluginYaml,
17
- parserYaml
18
- ] = await Promise.all([
19
- interop(import("eslint-plugin-yml")),
20
- interop(import("yaml-eslint-parser"))
21
- ]);
22
- const {
23
- indent = 2,
24
- quotes = "double"
25
- } = typeof stylistic === "boolean" ? {} : stylistic;
26
- return [
27
- {
28
- name: "luxass:yaml:setup",
29
- plugins: {
30
- yaml: pluginYaml
31
- }
32
- },
33
- {
34
- name: "luxass:yaml:rules",
35
- files,
36
- languageOptions: {
37
- parser: parserYaml
38
- },
39
- rules: {
40
- "style/spaced-comment": "off",
41
- "yaml/block-mapping": "error",
42
- "yaml/block-sequence": "error",
43
- "yaml/no-empty-key": "error",
44
- "yaml/no-empty-mapping-value": "error",
45
- "yaml/no-empty-sequence-entry": "error",
46
- "yaml/no-irregular-whitespace": "error",
47
- "yaml/plain-scalar": "error",
48
- "yaml/vue-custom-block/no-parsing-error": "error",
49
- ...stylistic ? {
50
- "yaml/block-mapping-question-indicator-newline": "error",
51
- "yaml/block-sequence-hyphen-indicator-newline": "error",
52
- "yaml/flow-mapping-curly-newline": "error",
53
- "yaml/flow-mapping-curly-spacing": "error",
54
- "yaml/flow-sequence-bracket-newline": "error",
55
- "yaml/flow-sequence-bracket-spacing": "error",
56
- "yaml/indent": ["error", indent === "tab" ? 2 : indent],
57
- "yaml/key-spacing": "error",
58
- "yaml/no-tab-indent": "error",
59
- "yaml/quotes": [
60
- "error",
61
- { avoidEscape: false, prefer: quotes }
62
- ],
63
- "yaml/spaced-comment": "error"
64
- } : {},
65
- ...overrides
66
- }
67
- },
68
- {
69
- name: "luxass:yaml:github-actions",
70
- files: ["**/.github/workflows/*.{yml,yaml}"],
71
- rules: {
72
- // GitHub Actions supports empty values to enable features
73
- "yaml/no-empty-mapping-value": "off"
74
- }
75
- }
76
- ];
77
- }
78
-
79
- export {
80
- yaml
81
- };
@@ -1,7 +0,0 @@
1
- // src/custom-rules/utils.ts
2
- import { ESLintUtils } from "@typescript-eslint/utils";
3
- var createRule = ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
4
-
5
- export {
6
- createRule
7
- };