@quentinhsu/biome-config 0.3.5 → 0.4.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.
Files changed (34) hide show
  1. package/dist/131.mjs +358 -0
  2. package/dist/build.mjs +108 -360
  3. package/dist/index.jsonc +1 -1
  4. package/dist/index.mjs +1 -358
  5. package/dist/next.jsonc +1 -1
  6. package/dist/nuxt.jsonc +1 -1
  7. package/dist/react.jsonc +1 -1
  8. package/dist/rslib-runtime.mjs +38 -0
  9. package/dist/types/scripts/tag-release.d.ts +1 -0
  10. package/dist/types/scripts/validate-config-properties.d.ts +1 -0
  11. package/dist/types/src/constants/biome.d.ts +1 -1
  12. package/dist/types/src/generated/biome/index.d.ts +12 -10
  13. package/dist/types/src/generated/biome/{no-label-var-options.d.ts → no-comment-text-options.d.ts} +217 -532
  14. package/dist/types/src/generated/biome/no-global-object-calls-options.d.ts +74 -75
  15. package/dist/types/src/generated/biome/{use-qwik-classlist-configuration.d.ts → no-sync-scripts-configuration.d.ts} +56 -112
  16. package/dist/types/src/generated/biome/{use-focusable-interactive-configuration.d.ts → no-useless-constructor-configuration.d.ts} +33 -51
  17. package/dist/types/src/generated/biome/nursery.d.ts +822 -0
  18. package/dist/types/src/generated/biome/pattern-options.d.ts +1075 -0
  19. package/dist/types/src/generated/biome/rule-with-no-access-key-options.d.ts +555 -0
  20. package/dist/types/src/generated/biome/rule-with-no-blank-target-options.d.ts +530 -0
  21. package/dist/types/src/generated/biome/rule-with-no-fallthrough-switch-clause-options.d.ts +469 -0
  22. package/dist/types/src/generated/biome/rule-with-no-unknown-unit-options.d.ts +564 -0
  23. package/dist/types/src/generated/biome/schema.d.ts +24 -6
  24. package/dist/types/src/generated/biome/style.d.ts +614 -0
  25. package/dist/types/src/generated/biome/use-for-of-configuration.d.ts +144 -0
  26. package/dist/types/src/generated/biome/{no-magic-numbers-options.d.ts → use-unique-variable-names-options.d.ts} +127 -105
  27. package/dist/vue.jsonc +1 -1
  28. package/package.json +11 -7
  29. package/dist/types/src/generated/biome/linter-configuration.d.ts +0 -181
  30. package/dist/types/src/generated/biome/rule-with-no-confusing-labels-options.d.ts +0 -1236
  31. package/dist/types/src/generated/biome/rule-with-no-excessive-nested-test-suites-options.d.ts +0 -1440
  32. package/dist/types/src/generated/biome/rule-with-no-unused-expressions-options.d.ts +0 -1337
  33. package/dist/types/src/generated/biome/use-consistent-object-definitions-configuration.d.ts +0 -1304
  34. package/dist/types/src/generated/biome/use-shorthand-assign-configuration.d.ts +0 -571
package/dist/index.mjs CHANGED
@@ -1,358 +1 @@
1
- const isPlainObject = (value)=>null !== value && 'object' == typeof value && !Array.isArray(value);
2
- const mergeArrays = (a, b)=>{
3
- const result = [
4
- ...a
5
- ];
6
- for (const item of b)if (!result.some((existing)=>deepEqual(existing, item))) result.push(item);
7
- return result;
8
- };
9
- const deepEqual = (a, b)=>{
10
- if (a === b) return true;
11
- if (Array.isArray(a) && Array.isArray(b)) return a.length === b.length && a.every((item, index)=>deepEqual(item, b[index]));
12
- if (isPlainObject(a) && isPlainObject(b)) {
13
- const keysA = Object.keys(a);
14
- const keysB = Object.keys(b);
15
- return keysA.length === keysB.length && keysA.every((key)=>deepEqual(a[key], b[key]));
16
- }
17
- return false;
18
- };
19
- const deepMerge = (target, source)=>{
20
- for (const [key, value] of Object.entries(source)){
21
- const current = target[key];
22
- if (Array.isArray(value)) {
23
- if (Array.isArray(current)) target[key] = mergeArrays(current, value);
24
- else target[key] = [
25
- ...value
26
- ];
27
- continue;
28
- }
29
- if (isPlainObject(value)) {
30
- const nextTarget = isPlainObject(current) ? {
31
- ...current
32
- } : {};
33
- target[key] = deepMerge(nextTarget, value);
34
- continue;
35
- }
36
- target[key] = value;
37
- }
38
- return target;
39
- };
40
- const mergeConfigs = (...configs)=>{
41
- const merged = configs.reduce((accumulator, config)=>deepMerge(accumulator, config), {});
42
- return merged;
43
- };
44
- const BIOME_SCHEMA_URL = 'https://biomejs.dev/schemas/2.3.5/schema.json';
45
- const indexConfig = {
46
- $schema: BIOME_SCHEMA_URL,
47
- assist: {
48
- actions: {
49
- source: {
50
- organizeImports: {
51
- level: 'on',
52
- options: {
53
- groups: [
54
- [
55
- ':NODE:',
56
- ':BUN:',
57
- ':PACKAGE_WITH_PROTOCOL:',
58
- ':PACKAGE:'
59
- ],
60
- ':BLANK_LINE:',
61
- ':ALIAS:',
62
- ':BLANK_LINE:',
63
- ':PATH:'
64
- ]
65
- }
66
- },
67
- useSortedAttributes: {
68
- level: 'on',
69
- options: {
70
- sortOrder: 'natural'
71
- }
72
- },
73
- useSortedKeys: 'on'
74
- }
75
- }
76
- },
77
- files: {
78
- ignoreUnknown: true,
79
- includes: [
80
- '**',
81
- '!**/build',
82
- '!**/dist',
83
- '!**/.next'
84
- ]
85
- },
86
- formatter: {
87
- enabled: true,
88
- formatWithErrors: true,
89
- indentStyle: 'space',
90
- lineWidth: 140
91
- },
92
- javascript: {
93
- formatter: {
94
- arrowParentheses: 'asNeeded',
95
- jsxQuoteStyle: 'single',
96
- quoteStyle: 'single',
97
- trailingCommas: 'all'
98
- }
99
- },
100
- linter: {
101
- enabled: true,
102
- rules: {
103
- complexity: {
104
- noUselessStringConcat: 'error',
105
- noUselessUndefinedInitialization: 'error',
106
- noVoid: 'error',
107
- useDateNow: 'error'
108
- },
109
- correctness: {
110
- noConstantMathMinMaxClamp: 'error',
111
- noUndeclaredVariables: 'error',
112
- noUnusedFunctionParameters: 'error',
113
- noUnusedImports: 'error',
114
- noUnusedPrivateClassMembers: 'error',
115
- noUnusedVariables: 'error',
116
- useExhaustiveDependencies: {
117
- level: 'error',
118
- options: {
119
- reportUnnecessaryDependencies: false
120
- }
121
- }
122
- },
123
- nursery: {
124
- useSortedClasses: {
125
- fix: 'safe',
126
- level: 'error',
127
- options: {
128
- functions: [
129
- 'clsx',
130
- 'cn'
131
- ]
132
- }
133
- }
134
- },
135
- recommended: true,
136
- style: {
137
- noParameterProperties: 'error',
138
- noYodaExpression: 'error',
139
- useArrayLiterals: 'error',
140
- useConsistentBuiltinInstantiation: 'error',
141
- useFragmentSyntax: 'error',
142
- useImportType: {
143
- fix: 'safe',
144
- level: 'error',
145
- options: {
146
- style: 'separatedType'
147
- }
148
- },
149
- useSelfClosingElements: {
150
- fix: 'safe',
151
- level: 'error',
152
- options: {}
153
- },
154
- useShorthandAssign: 'error'
155
- },
156
- suspicious: {
157
- noEvolvingTypes: 'error',
158
- useAwait: 'error'
159
- }
160
- }
161
- },
162
- overrides: [
163
- {
164
- includes: [
165
- '**/*.jsx',
166
- '**/*.tsx'
167
- ],
168
- linter: {
169
- rules: {
170
- style: {
171
- noParameterAssign: 'error'
172
- }
173
- }
174
- }
175
- },
176
- {
177
- includes: [
178
- '**/*.ts',
179
- '**/*.tsx'
180
- ],
181
- linter: {
182
- rules: {
183
- correctness: {
184
- noUnusedVariables: 'off'
185
- }
186
- }
187
- }
188
- }
189
- ],
190
- root: true,
191
- vcs: {
192
- clientKind: 'git',
193
- defaultBranch: 'main',
194
- enabled: true,
195
- useIgnoreFile: true
196
- }
197
- };
198
- const reactOverlay = {
199
- files: {
200
- includes: [
201
- '!**/.storybook'
202
- ]
203
- },
204
- javascript: {
205
- jsxRuntime: 'reactClassic'
206
- },
207
- linter: {
208
- rules: {
209
- style: {
210
- useFragmentSyntax: 'error'
211
- }
212
- }
213
- },
214
- overrides: [
215
- {
216
- includes: [
217
- '**/__tests__/**',
218
- '**/*.{test,spec}.{ts,tsx,js,jsx}'
219
- ],
220
- linter: {
221
- rules: {
222
- correctness: {
223
- noUnusedVariables: 'off'
224
- }
225
- }
226
- }
227
- }
228
- ]
229
- };
230
- const reactConfig = mergeConfigs(indexConfig, reactOverlay);
231
- const nextOverlay = {
232
- files: {
233
- includes: [
234
- '!**/.next',
235
- '!**/.vercel',
236
- '!**/out'
237
- ]
238
- },
239
- javascript: {
240
- jsxRuntime: 'transparent'
241
- },
242
- linter: {
243
- rules: {
244
- correctness: {
245
- useExhaustiveDependencies: {
246
- level: 'error',
247
- options: {
248
- reportUnnecessaryDependencies: true
249
- }
250
- }
251
- }
252
- }
253
- }
254
- };
255
- const nextConfig = mergeConfigs(reactConfig, nextOverlay);
256
- const vueOverlay = {
257
- files: {
258
- includes: [
259
- '!**/.vitepress',
260
- '!**/.output'
261
- ]
262
- },
263
- javascript: {
264
- parser: {
265
- jsxEverywhere: false
266
- }
267
- },
268
- html: {
269
- formatter: {
270
- indentScriptAndStyle: true,
271
- selfCloseVoidElements: 'always'
272
- }
273
- },
274
- overrides: [
275
- {
276
- includes: [
277
- '**/*.vue'
278
- ],
279
- formatter: {
280
- lineWidth: 120
281
- },
282
- javascript: {
283
- formatter: {
284
- quoteStyle: 'single'
285
- }
286
- }
287
- }
288
- ]
289
- };
290
- const vueConfig = mergeConfigs(indexConfig, vueOverlay);
291
- const nuxtOverlay = {
292
- files: {
293
- includes: [
294
- '!**/.nuxt',
295
- '!**/.nitro',
296
- '!**/.output'
297
- ]
298
- },
299
- javascript: {
300
- globals: [
301
- 'defineNuxtConfig',
302
- 'defineAppConfig',
303
- 'defineNuxtPlugin',
304
- 'defineNuxtRouteMiddleware',
305
- 'defineNuxtServerPlugin',
306
- 'defineNitroPlugin',
307
- 'defineEventHandler',
308
- 'defineLazyEventHandler',
309
- 'definePayloadPlugin',
310
- 'defineRouteRules',
311
- 'definePageMeta',
312
- 'useRuntimeConfig',
313
- 'useNuxtApp',
314
- 'useAsyncData',
315
- 'useLazyAsyncData',
316
- 'useFetch',
317
- 'useLazyFetch',
318
- 'useState',
319
- 'useCookie',
320
- 'useHead',
321
- 'useSeoMeta',
322
- 'useError',
323
- 'clearError',
324
- 'showError',
325
- 'navigateTo',
326
- 'abortNavigation',
327
- 'refreshNuxtData',
328
- 'onNuxtReady',
329
- 'useRouter',
330
- 'useRoute',
331
- 'useRequestEvent',
332
- 'useRequestHeaders'
333
- ]
334
- },
335
- overrides: [
336
- {
337
- includes: [
338
- '**/*.ts'
339
- ],
340
- linter: {
341
- rules: {
342
- correctness: {
343
- noUndeclaredVariables: 'error'
344
- }
345
- }
346
- }
347
- }
348
- ]
349
- };
350
- const nuxtConfig = mergeConfigs(vueConfig, nuxtOverlay);
351
- const allPresets = Object.freeze({
352
- index: indexConfig,
353
- next: nextConfig,
354
- nuxt: nuxtConfig,
355
- react: reactConfig,
356
- vue: vueConfig
357
- });
358
- export { BIOME_SCHEMA_URL, allPresets, indexConfig, nextConfig, nuxtConfig, reactConfig, vueConfig };
1
+ export { BIOME_SCHEMA_URL, allPresets, indexConfig, nextConfig, nuxtConfig, reactConfig, vueConfig } from "./131.mjs";
package/dist/next.jsonc CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.3.5/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
3
3
  "assist": {
4
4
  "actions": {
5
5
  "source": {
package/dist/nuxt.jsonc CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.3.5/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
3
3
  "assist": {
4
4
  "actions": {
5
5
  "source": {
package/dist/react.jsonc CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.3.5/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
3
3
  "assist": {
4
4
  "actions": {
5
5
  "source": {
@@ -0,0 +1,38 @@
1
+ var __webpack_modules__ = {};
2
+ var __webpack_module_cache__ = {};
3
+ function __webpack_require__(moduleId) {
4
+ var cachedModule = __webpack_module_cache__[moduleId];
5
+ if (void 0 !== cachedModule) return cachedModule.exports;
6
+ var module = __webpack_module_cache__[moduleId] = {
7
+ exports: {}
8
+ };
9
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
10
+ return module.exports;
11
+ }
12
+ __webpack_require__.m = __webpack_modules__;
13
+ (()=>{
14
+ __webpack_require__.add = function(modules) {
15
+ Object.assign(__webpack_require__.m, modules);
16
+ };
17
+ })();
18
+ (()=>{
19
+ __webpack_require__.n = (module)=>{
20
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
21
+ __webpack_require__.d(getter, {
22
+ a: getter
23
+ });
24
+ return getter;
25
+ };
26
+ })();
27
+ (()=>{
28
+ __webpack_require__.d = (exports, definition)=>{
29
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
30
+ enumerable: true,
31
+ get: definition[key]
32
+ });
33
+ };
34
+ })();
35
+ (()=>{
36
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
37
+ })();
38
+ export { __webpack_require__ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1 @@
1
- export declare const BIOME_SCHEMA_URL: "https://biomejs.dev/schemas/2.3.5/schema.json";
1
+ export declare const BIOME_SCHEMA_URL: "https://biomejs.dev/schemas/2.3.11/schema.json";
@@ -1,12 +1,14 @@
1
1
  export * from './schema.ts';
2
2
  export * from './no-global-object-calls-options.ts';
3
- export * from './no-magic-numbers-options.ts';
4
- export * from './no-label-var-options.ts';
5
- export * from './rule-with-no-excessive-nested-test-suites-options.ts';
6
- export * from './rule-with-no-unused-expressions-options.ts';
7
- export * from './rule-with-no-confusing-labels-options.ts';
8
- export * from './use-focusable-interactive-configuration.ts';
9
- export * from './use-qwik-classlist-configuration.ts';
10
- export * from './use-shorthand-assign-configuration.ts';
11
- export * from './use-consistent-object-definitions-configuration.ts';
12
- export * from './linter-configuration.ts';
3
+ export * from './use-unique-variable-names-options.ts';
4
+ export * from './no-comment-text-options.ts';
5
+ export * from './rule-with-no-access-key-options.ts';
6
+ export * from './rule-with-no-unknown-unit-options.ts';
7
+ export * from './rule-with-no-blank-target-options.ts';
8
+ export * from './rule-with-no-fallthrough-switch-clause-options.ts';
9
+ export * from './no-useless-constructor-configuration.ts';
10
+ export * from './no-sync-scripts-configuration.ts';
11
+ export * from './use-for-of-configuration.ts';
12
+ export * from './pattern-options.ts';
13
+ export * from './nursery.ts';
14
+ export * from './style.ts';