@quentinhsu/biome-config 0.3.2 → 0.3.5

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/build.mjs +388 -0
  2. package/dist/index.jsonc +153 -0
  3. package/dist/index.mjs +358 -0
  4. package/dist/next.jsonc +170 -0
  5. package/dist/nuxt.jsonc +225 -0
  6. package/dist/react.jsonc +168 -0
  7. package/dist/types/scripts/build-presets.d.ts +1 -0
  8. package/dist/types/scripts/generate-biome-types.d.ts +1 -0
  9. package/dist/types/scripts/utils/biome-version.d.ts +12 -0
  10. package/dist/types/src/build.d.ts +1 -0
  11. package/dist/types/src/constants/biome.d.ts +1 -0
  12. package/dist/types/src/generated/biome/index.d.ts +12 -0
  13. package/dist/types/src/generated/biome/linter-configuration.d.ts +181 -0
  14. package/dist/types/src/generated/biome/no-global-object-calls-options.d.ts +321 -0
  15. package/dist/types/src/generated/biome/no-label-var-options.d.ts +1076 -0
  16. package/dist/types/src/generated/biome/no-magic-numbers-options.d.ts +291 -0
  17. package/dist/types/src/generated/biome/rule-with-no-confusing-labels-options.d.ts +1236 -0
  18. package/dist/types/src/generated/biome/rule-with-no-excessive-nested-test-suites-options.d.ts +1440 -0
  19. package/dist/types/src/generated/biome/rule-with-no-unused-expressions-options.d.ts +1337 -0
  20. package/dist/types/src/generated/biome/schema.d.ts +291 -0
  21. package/dist/types/src/generated/biome/use-consistent-object-definitions-configuration.d.ts +1304 -0
  22. package/dist/types/src/generated/biome/use-focusable-interactive-configuration.d.ts +163 -0
  23. package/dist/types/src/generated/biome/use-qwik-classlist-configuration.d.ts +241 -0
  24. package/dist/types/src/generated/biome/use-shorthand-assign-configuration.d.ts +571 -0
  25. package/dist/types/src/index.d.ts +15 -0
  26. package/dist/types/src/presets/next.d.ts +1 -0
  27. package/dist/types/src/presets/nuxt.d.ts +1 -0
  28. package/dist/types/src/presets/react.d.ts +1 -0
  29. package/dist/types/src/presets/vue.d.ts +1 -0
  30. package/dist/types/src/source/index.d.ts +2 -0
  31. package/dist/types/src/types.d.ts +1 -0
  32. package/dist/types/src/utils/merge.d.ts +2 -0
  33. package/dist/vue.jsonc +177 -0
  34. package/package.json +29 -28
@@ -0,0 +1,225 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.3.5/schema.json",
3
+ "assist": {
4
+ "actions": {
5
+ "source": {
6
+ "organizeImports": {
7
+ "level": "on",
8
+ "options": {
9
+ "groups": [
10
+ [
11
+ ":NODE:",
12
+ ":BUN:",
13
+ ":PACKAGE_WITH_PROTOCOL:",
14
+ ":PACKAGE:"
15
+ ],
16
+ ":BLANK_LINE:",
17
+ ":ALIAS:",
18
+ ":BLANK_LINE:",
19
+ ":PATH:"
20
+ ]
21
+ }
22
+ },
23
+ "useSortedAttributes": {
24
+ "level": "on",
25
+ "options": {
26
+ "sortOrder": "natural"
27
+ }
28
+ },
29
+ "useSortedKeys": "on"
30
+ }
31
+ }
32
+ },
33
+ "files": {
34
+ "ignoreUnknown": true,
35
+ "includes": [
36
+ "**",
37
+ "!**/build",
38
+ "!**/dist",
39
+ "!**/.next",
40
+ "!**/.vitepress",
41
+ "!**/.output",
42
+ "!**/.nuxt",
43
+ "!**/.nitro"
44
+ ]
45
+ },
46
+ "formatter": {
47
+ "enabled": true,
48
+ "formatWithErrors": true,
49
+ "indentStyle": "space",
50
+ "lineWidth": 140
51
+ },
52
+ "javascript": {
53
+ "formatter": {
54
+ "arrowParentheses": "asNeeded",
55
+ "jsxQuoteStyle": "single",
56
+ "quoteStyle": "single",
57
+ "trailingCommas": "all"
58
+ },
59
+ "parser": {
60
+ "jsxEverywhere": false
61
+ },
62
+ "globals": [
63
+ "defineNuxtConfig",
64
+ "defineAppConfig",
65
+ "defineNuxtPlugin",
66
+ "defineNuxtRouteMiddleware",
67
+ "defineNuxtServerPlugin",
68
+ "defineNitroPlugin",
69
+ "defineEventHandler",
70
+ "defineLazyEventHandler",
71
+ "definePayloadPlugin",
72
+ "defineRouteRules",
73
+ "definePageMeta",
74
+ "useRuntimeConfig",
75
+ "useNuxtApp",
76
+ "useAsyncData",
77
+ "useLazyAsyncData",
78
+ "useFetch",
79
+ "useLazyFetch",
80
+ "useState",
81
+ "useCookie",
82
+ "useHead",
83
+ "useSeoMeta",
84
+ "useError",
85
+ "clearError",
86
+ "showError",
87
+ "navigateTo",
88
+ "abortNavigation",
89
+ "refreshNuxtData",
90
+ "onNuxtReady",
91
+ "useRouter",
92
+ "useRoute",
93
+ "useRequestEvent",
94
+ "useRequestHeaders"
95
+ ]
96
+ },
97
+ "linter": {
98
+ "enabled": true,
99
+ "rules": {
100
+ "complexity": {
101
+ "noUselessStringConcat": "error",
102
+ "noUselessUndefinedInitialization": "error",
103
+ "noVoid": "error",
104
+ "useDateNow": "error"
105
+ },
106
+ "correctness": {
107
+ "noConstantMathMinMaxClamp": "error",
108
+ "noUndeclaredVariables": "error",
109
+ "noUnusedFunctionParameters": "error",
110
+ "noUnusedImports": "error",
111
+ "noUnusedPrivateClassMembers": "error",
112
+ "noUnusedVariables": "error",
113
+ "useExhaustiveDependencies": {
114
+ "level": "error",
115
+ "options": {
116
+ "reportUnnecessaryDependencies": false
117
+ }
118
+ }
119
+ },
120
+ "nursery": {
121
+ "useSortedClasses": {
122
+ "fix": "safe",
123
+ "level": "error",
124
+ "options": {
125
+ "functions": [
126
+ "clsx",
127
+ "cn"
128
+ ]
129
+ }
130
+ }
131
+ },
132
+ "recommended": true,
133
+ "style": {
134
+ "noParameterProperties": "error",
135
+ "noYodaExpression": "error",
136
+ "useArrayLiterals": "error",
137
+ "useConsistentBuiltinInstantiation": "error",
138
+ "useFragmentSyntax": "error",
139
+ "useImportType": {
140
+ "fix": "safe",
141
+ "level": "error",
142
+ "options": {
143
+ "style": "separatedType"
144
+ }
145
+ },
146
+ "useSelfClosingElements": {
147
+ "fix": "safe",
148
+ "level": "error",
149
+ "options": {}
150
+ },
151
+ "useShorthandAssign": "error"
152
+ },
153
+ "suspicious": {
154
+ "noEvolvingTypes": "error",
155
+ "useAwait": "error"
156
+ }
157
+ }
158
+ },
159
+ "overrides": [
160
+ {
161
+ "includes": [
162
+ "**/*.jsx",
163
+ "**/*.tsx"
164
+ ],
165
+ "linter": {
166
+ "rules": {
167
+ "style": {
168
+ "noParameterAssign": "error"
169
+ }
170
+ }
171
+ }
172
+ },
173
+ {
174
+ "includes": [
175
+ "**/*.ts",
176
+ "**/*.tsx"
177
+ ],
178
+ "linter": {
179
+ "rules": {
180
+ "correctness": {
181
+ "noUnusedVariables": "off"
182
+ }
183
+ }
184
+ }
185
+ },
186
+ {
187
+ "includes": [
188
+ "**/*.vue"
189
+ ],
190
+ "formatter": {
191
+ "lineWidth": 120
192
+ },
193
+ "javascript": {
194
+ "formatter": {
195
+ "quoteStyle": "single"
196
+ }
197
+ }
198
+ },
199
+ {
200
+ "includes": [
201
+ "**/*.ts"
202
+ ],
203
+ "linter": {
204
+ "rules": {
205
+ "correctness": {
206
+ "noUndeclaredVariables": "error"
207
+ }
208
+ }
209
+ }
210
+ }
211
+ ],
212
+ "root": true,
213
+ "vcs": {
214
+ "clientKind": "git",
215
+ "defaultBranch": "main",
216
+ "enabled": true,
217
+ "useIgnoreFile": true
218
+ },
219
+ "html": {
220
+ "formatter": {
221
+ "indentScriptAndStyle": true,
222
+ "selfCloseVoidElements": "always"
223
+ }
224
+ }
225
+ }
@@ -0,0 +1,168 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.3.5/schema.json",
3
+ "assist": {
4
+ "actions": {
5
+ "source": {
6
+ "organizeImports": {
7
+ "level": "on",
8
+ "options": {
9
+ "groups": [
10
+ [
11
+ ":NODE:",
12
+ ":BUN:",
13
+ ":PACKAGE_WITH_PROTOCOL:",
14
+ ":PACKAGE:"
15
+ ],
16
+ ":BLANK_LINE:",
17
+ ":ALIAS:",
18
+ ":BLANK_LINE:",
19
+ ":PATH:"
20
+ ]
21
+ }
22
+ },
23
+ "useSortedAttributes": {
24
+ "level": "on",
25
+ "options": {
26
+ "sortOrder": "natural"
27
+ }
28
+ },
29
+ "useSortedKeys": "on"
30
+ }
31
+ }
32
+ },
33
+ "files": {
34
+ "ignoreUnknown": true,
35
+ "includes": [
36
+ "**",
37
+ "!**/build",
38
+ "!**/dist",
39
+ "!**/.next",
40
+ "!**/.storybook"
41
+ ]
42
+ },
43
+ "formatter": {
44
+ "enabled": true,
45
+ "formatWithErrors": true,
46
+ "indentStyle": "space",
47
+ "lineWidth": 140
48
+ },
49
+ "javascript": {
50
+ "formatter": {
51
+ "arrowParentheses": "asNeeded",
52
+ "jsxQuoteStyle": "single",
53
+ "quoteStyle": "single",
54
+ "trailingCommas": "all"
55
+ },
56
+ "jsxRuntime": "reactClassic"
57
+ },
58
+ "linter": {
59
+ "enabled": true,
60
+ "rules": {
61
+ "complexity": {
62
+ "noUselessStringConcat": "error",
63
+ "noUselessUndefinedInitialization": "error",
64
+ "noVoid": "error",
65
+ "useDateNow": "error"
66
+ },
67
+ "correctness": {
68
+ "noConstantMathMinMaxClamp": "error",
69
+ "noUndeclaredVariables": "error",
70
+ "noUnusedFunctionParameters": "error",
71
+ "noUnusedImports": "error",
72
+ "noUnusedPrivateClassMembers": "error",
73
+ "noUnusedVariables": "error",
74
+ "useExhaustiveDependencies": {
75
+ "level": "error",
76
+ "options": {
77
+ "reportUnnecessaryDependencies": false
78
+ }
79
+ }
80
+ },
81
+ "nursery": {
82
+ "useSortedClasses": {
83
+ "fix": "safe",
84
+ "level": "error",
85
+ "options": {
86
+ "functions": [
87
+ "clsx",
88
+ "cn"
89
+ ]
90
+ }
91
+ }
92
+ },
93
+ "recommended": true,
94
+ "style": {
95
+ "noParameterProperties": "error",
96
+ "noYodaExpression": "error",
97
+ "useArrayLiterals": "error",
98
+ "useConsistentBuiltinInstantiation": "error",
99
+ "useFragmentSyntax": "error",
100
+ "useImportType": {
101
+ "fix": "safe",
102
+ "level": "error",
103
+ "options": {
104
+ "style": "separatedType"
105
+ }
106
+ },
107
+ "useSelfClosingElements": {
108
+ "fix": "safe",
109
+ "level": "error",
110
+ "options": {}
111
+ },
112
+ "useShorthandAssign": "error"
113
+ },
114
+ "suspicious": {
115
+ "noEvolvingTypes": "error",
116
+ "useAwait": "error"
117
+ }
118
+ }
119
+ },
120
+ "overrides": [
121
+ {
122
+ "includes": [
123
+ "**/*.jsx",
124
+ "**/*.tsx"
125
+ ],
126
+ "linter": {
127
+ "rules": {
128
+ "style": {
129
+ "noParameterAssign": "error"
130
+ }
131
+ }
132
+ }
133
+ },
134
+ {
135
+ "includes": [
136
+ "**/*.ts",
137
+ "**/*.tsx"
138
+ ],
139
+ "linter": {
140
+ "rules": {
141
+ "correctness": {
142
+ "noUnusedVariables": "off"
143
+ }
144
+ }
145
+ }
146
+ },
147
+ {
148
+ "includes": [
149
+ "**/__tests__/**",
150
+ "**/*.{test,spec}.{ts,tsx,js,jsx}"
151
+ ],
152
+ "linter": {
153
+ "rules": {
154
+ "correctness": {
155
+ "noUnusedVariables": "off"
156
+ }
157
+ }
158
+ }
159
+ }
160
+ ],
161
+ "root": true,
162
+ "vcs": {
163
+ "clientKind": "git",
164
+ "defaultBranch": "main",
165
+ "enabled": true,
166
+ "useIgnoreFile": true
167
+ }
168
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Get the @biomejs/biome version from package.json
3
+ */
4
+ export declare function getBiomejsVersion(): Promise<string>;
5
+ /**
6
+ * Update the biome.ts constants file with the current version
7
+ * @returns An object containing the version and schema URL
8
+ */
9
+ export declare function updateBiomeConstantsFile(): Promise<{
10
+ version: string;
11
+ schemaUrl: string;
12
+ }>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const BIOME_SCHEMA_URL: "https://biomejs.dev/schemas/2.3.5/schema.json";
@@ -0,0 +1,12 @@
1
+ export * from './schema.ts';
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';
@@ -0,0 +1,181 @@
1
+ import type { Bool, Extends, Schema } from './schema.ts';
2
+ import type { NormalizedGlob, OverrideFilesConfiguration, OverrideFormatterConfiguration, OverrideGlobs, RuleDomains } from './no-label-var-options.ts';
3
+ import type { CssConfiguration, FilesConfiguration, FormatterConfiguration, GraphqlConfiguration, GritConfiguration, HtmlConfiguration, JsConfiguration, JsonConfiguration, Plugins, VcsConfiguration } from './rule-with-no-confusing-labels-options.ts';
4
+ import type { Actions, Rules } from './use-consistent-object-definitions-configuration.ts';
5
+ export interface LinterConfiguration {
6
+ /**
7
+ * An object where the keys are the names of the domains, and the values are `all`, `recommended`, or `none`.
8
+ */
9
+ domains?: RuleDomains | null;
10
+ /**
11
+ * if `false`, it disables the feature and the linter won't be executed. `true` by default
12
+ */
13
+ enabled?: Bool | null;
14
+ /**
15
+ * A list of glob patterns. The analyzer will handle only those files/folders that will match these patterns.
16
+ */
17
+ includes?: NormalizedGlob[] | null;
18
+ /**
19
+ * List of rules
20
+ */
21
+ rules?: Rules | null;
22
+ }
23
+ export interface OverrideLinterConfiguration {
24
+ /**
25
+ * List of rules
26
+ */
27
+ domains?: RuleDomains | null;
28
+ /**
29
+ * if `false`, it disables the feature and the linter won't be executed. `true` by default
30
+ */
31
+ enabled?: Bool | null;
32
+ /**
33
+ * List of rules
34
+ */
35
+ rules?: Rules | null;
36
+ }
37
+ export interface AssistConfiguration {
38
+ /**
39
+ * Whether Biome should fail in CLI if the assist were not applied to the code.
40
+ */
41
+ actions?: Actions | null;
42
+ /**
43
+ * Whether Biome should enable assist via LSP and CLI.
44
+ */
45
+ enabled?: Bool | null;
46
+ /**
47
+ * A list of glob patterns. Biome will include files/folders that will match these patterns.
48
+ */
49
+ includes?: NormalizedGlob[] | null;
50
+ }
51
+ export interface OverrideAssistConfiguration {
52
+ /**
53
+ * List of actions
54
+ */
55
+ actions?: Actions | null;
56
+ /**
57
+ * if `false`, it disables the feature and the assist won't be executed. `true` by default
58
+ */
59
+ enabled?: Bool | null;
60
+ }
61
+ export interface OverridePattern {
62
+ /**
63
+ * Specific configuration for the Json language
64
+ */
65
+ assist?: OverrideAssistConfiguration | null;
66
+ /**
67
+ * Specific configuration for the CSS language
68
+ */
69
+ css?: CssConfiguration | null;
70
+ /**
71
+ * Specific configuration for the filesystem
72
+ */
73
+ files?: OverrideFilesConfiguration | null;
74
+ /**
75
+ * Specific configuration for the Json language
76
+ */
77
+ formatter?: OverrideFormatterConfiguration | null;
78
+ /**
79
+ * Specific configuration for the Graphql language
80
+ */
81
+ graphql?: GraphqlConfiguration | null;
82
+ /**
83
+ * Specific configuration for the GritQL language
84
+ */
85
+ grit?: GritConfiguration | null;
86
+ /**
87
+ * Specific configuration for the GritQL language
88
+ */
89
+ html?: HtmlConfiguration | null;
90
+ /**
91
+ * A list of glob patterns. Biome will include files/folders that will match these patterns.
92
+ */
93
+ includes?: OverrideGlobs | null;
94
+ /**
95
+ * Specific configuration for the JavaScript language
96
+ */
97
+ javascript?: JsConfiguration | null;
98
+ /**
99
+ * Specific configuration for the Json language
100
+ */
101
+ json?: JsonConfiguration | null;
102
+ /**
103
+ * Specific configuration for the Json language
104
+ */
105
+ linter?: OverrideLinterConfiguration | null;
106
+ /**
107
+ * Specific configuration for additional plugins
108
+ */
109
+ plugins?: Plugins | null;
110
+ }
111
+ export type Overrides = OverridePattern[];
112
+ /**
113
+ * The configuration that is contained inside the file `biome.json`
114
+ */
115
+ export interface Configuration {
116
+ /**
117
+ * A field for the [JSON schema](https://json-schema.org/) specification
118
+ */
119
+ $schema?: Schema | null;
120
+ /**
121
+ * Specific configuration for assists
122
+ */
123
+ assist?: AssistConfiguration | null;
124
+ /**
125
+ * Specific configuration for the Css language
126
+ */
127
+ css?: CssConfiguration | null;
128
+ /**
129
+ * A list of paths to other JSON files, used to extends the current configuration.
130
+ */
131
+ extends?: Extends | null;
132
+ /**
133
+ * The configuration of the filesystem
134
+ */
135
+ files?: FilesConfiguration | null;
136
+ /**
137
+ * The configuration of the formatter
138
+ */
139
+ formatter?: FormatterConfiguration | null;
140
+ /**
141
+ * Specific configuration for the GraphQL language
142
+ */
143
+ graphql?: GraphqlConfiguration | null;
144
+ /**
145
+ * Specific configuration for the GraphQL language
146
+ */
147
+ grit?: GritConfiguration | null;
148
+ /**
149
+ * Specific configuration for the HTML language
150
+ */
151
+ html?: HtmlConfiguration | null;
152
+ /**
153
+ * Specific configuration for the JavaScript language
154
+ */
155
+ javascript?: JsConfiguration | null;
156
+ /**
157
+ * Specific configuration for the Json language
158
+ */
159
+ json?: JsonConfiguration | null;
160
+ /**
161
+ * The configuration for the linter
162
+ */
163
+ linter?: LinterConfiguration | null;
164
+ /**
165
+ * A list of granular patterns that should be applied only to a sub set of files
166
+ */
167
+ overrides?: Overrides | null;
168
+ /**
169
+ * List of plugins to load.
170
+ */
171
+ plugins?: Plugins | null;
172
+ /**
173
+ * Indicates whether this configuration file is at the root of a Biome project. By default, this is `true`.
174
+ */
175
+ root?: Bool | null;
176
+ /**
177
+ * The configuration of the VCS integration
178
+ */
179
+ vcs?: VcsConfiguration | null;
180
+ }
181
+ export type BiomeConfig = Configuration;