@biomejs/biome 1.9.3 → 1.9.4

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/README.hi.md CHANGED
@@ -15,7 +15,7 @@
15
15
  [![Open VSX version][open-vsx-badge]][open-vsx-url]
16
16
 
17
17
  [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
18
- [discord-url]: https://discord.gg/BypW39g6Yc
18
+ [discord-url]: https://biomejs.dev/chat
19
19
  [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
20
20
  [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
21
21
  [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=green&label=%40biomejs%2Fbiome
package/README.ja.md CHANGED
@@ -15,7 +15,7 @@
15
15
  [![Open VSX version][open-vsx-badge]][open-vsx-url]
16
16
 
17
17
  [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
18
- [discord-url]: https://discord.gg/BypW39g6Yc
18
+ [discord-url]: https://biomejs.dev/chat
19
19
  [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
20
20
  [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
21
21
  [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=green&label=%40biomejs%2Fbiome
package/README.kr.md CHANGED
@@ -15,7 +15,7 @@
15
15
  [![Open VSX version][open-vsx-badge]][open-vsx-url]
16
16
 
17
17
  [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
18
- [discord-url]: https://discord.gg/BypW39g6Yc
18
+ [discord-url]: https://biomejs.dev/chat
19
19
  [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
20
20
  [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
21
21
  [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=green&label=%40biomejs%2Fbiome
package/README.md CHANGED
@@ -18,7 +18,7 @@
18
18
  [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
19
19
  [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
20
20
  [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=60a5fa
21
- [discord-url]: https://discord.gg/BypW39g6Yc
21
+ [discord-url]: https://biomejs.dev/chat
22
22
  [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=60a5fa&label=%40biomejs%2Fbiome
23
23
  [npm-url]: https://www.npmjs.com/package/@biomejs/biome/v/latest
24
24
  [vscode-badge]: https://badgen.net/vs-marketplace/v/biomejs.biome?label=vscode&icon=visualstudio&color=60a5fa
package/README.pt-BR.md CHANGED
@@ -15,7 +15,7 @@
15
15
  [![versão Open VSX][open-vsx-badge]][open-vsx-url]
16
16
 
17
17
  [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
18
- [discord-url]: https://discord.gg/BypW39g6Yc
18
+ [discord-url]: https://biomejs.dev/chat
19
19
  [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
20
20
  [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
21
21
  [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=green&label=%40biomejs%2Fbiome
package/README.zh-CN.md CHANGED
@@ -15,7 +15,7 @@
15
15
  [![Open VSX version][open-vsx-badge]][open-vsx-url]
16
16
 
17
17
  [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
18
- [discord-url]: https://discord.gg/BypW39g6Yc
18
+ [discord-url]: https://biomejs.dev/chat
19
19
  [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
20
20
  [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
21
21
  [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=green&label=%40biomejs%2Fbiome
package/README.zh-TW.md CHANGED
@@ -15,7 +15,7 @@
15
15
  [![Open VSX version][open-vsx-badge]][open-vsx-url]
16
16
 
17
17
  [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
18
- [discord-url]: https://discord.gg/BypW39g6Yc
18
+ [discord-url]: https://biomejs.dev/chat
19
19
  [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
20
20
  [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
21
21
  [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=green&label=%40biomejs%2Fbiome
@@ -360,7 +360,6 @@
360
360
  },
361
361
  "AllowDomainOptions": {
362
362
  "type": "object",
363
- "required": ["allowDomains"],
364
363
  "properties": {
365
364
  "allowDomains": {
366
365
  "description": "List of domains to allow `target=\"_blank\"` without `rel=\"noreferrer\"`",
@@ -643,10 +642,10 @@
643
642
  "ComplexityOptions": {
644
643
  "description": "Options for the rule `noExcessiveCognitiveComplexity`.",
645
644
  "type": "object",
646
- "required": ["maxAllowedComplexity"],
647
645
  "properties": {
648
646
  "maxAllowedComplexity": {
649
647
  "description": "The maximum complexity score that we allow. Anything higher is considered excessive.",
648
+ "default": 15,
650
649
  "type": "integer",
651
650
  "format": "uint8",
652
651
  "minimum": 1.0
@@ -676,9 +675,11 @@
676
675
  },
677
676
  "ConsistentArrayTypeOptions": {
678
677
  "type": "object",
679
- "required": ["syntax"],
680
678
  "properties": {
681
- "syntax": { "$ref": "#/definitions/ConsistentArrayType" }
679
+ "syntax": {
680
+ "default": "shorthand",
681
+ "allOf": [{ "$ref": "#/definitions/ConsistentArrayType" }]
682
+ }
682
683
  },
683
684
  "additionalProperties": false
684
685
  },
@@ -690,9 +691,11 @@
690
691
  },
691
692
  "ConsistentMemberAccessibilityOptions": {
692
693
  "type": "object",
693
- "required": ["accessibility"],
694
694
  "properties": {
695
- "accessibility": { "$ref": "#/definitions/Accessibility" }
695
+ "accessibility": {
696
+ "default": "noPublic",
697
+ "allOf": [{ "$ref": "#/definitions/Accessibility" }]
698
+ }
696
699
  },
697
700
  "additionalProperties": false
698
701
  },
@@ -1202,10 +1205,9 @@
1202
1205
  },
1203
1206
  "CustomRestrictedTypeOptions": {
1204
1207
  "type": "object",
1205
- "required": ["message"],
1206
1208
  "properties": {
1207
- "message": { "type": "string" },
1208
- "use": { "type": ["string", "null"] }
1209
+ "message": { "default": "", "type": "string" },
1210
+ "use": { "default": null, "type": ["string", "null"] }
1209
1211
  },
1210
1212
  "additionalProperties": false
1211
1213
  },
@@ -1460,23 +1462,29 @@
1460
1462
  },
1461
1463
  "Hook": {
1462
1464
  "type": "object",
1463
- "required": ["name"],
1464
1465
  "properties": {
1465
1466
  "closureIndex": {
1466
1467
  "description": "The \"position\" of the closure function, starting from zero.\n\nFor example, for React's `useEffect()` hook, the closure index is 0.",
1468
+ "default": null,
1467
1469
  "type": ["integer", "null"],
1468
1470
  "format": "uint8",
1469
1471
  "minimum": 0.0
1470
1472
  },
1471
1473
  "dependenciesIndex": {
1472
1474
  "description": "The \"position\" of the array of dependencies, starting from zero.\n\nFor example, for React's `useEffect()` hook, the dependencies index is 1.",
1475
+ "default": null,
1473
1476
  "type": ["integer", "null"],
1474
1477
  "format": "uint8",
1475
1478
  "minimum": 0.0
1476
1479
  },
1477
- "name": { "description": "The name of the hook.", "type": "string" },
1480
+ "name": {
1481
+ "description": "The name of the hook.",
1482
+ "default": "",
1483
+ "type": "string"
1484
+ },
1478
1485
  "stableResult": {
1479
1486
  "description": "Whether the result of the hook is stable.\n\nSet to `true` to mark the identity of the hook's return value as stable, or use a number/an array of numbers to mark the \"positions\" in the return array as stable.\n\nFor example, for React's `useRef()` hook the value would be `true`, while for `useState()` it would be `[1]`.",
1487
+ "default": null,
1480
1488
  "anyOf": [
1481
1489
  { "$ref": "#/definitions/StableHookResult" },
1482
1490
  { "type": "null" }
@@ -2040,9 +2048,9 @@
2040
2048
  },
2041
2049
  "NoRestrictedTypesOptions": {
2042
2050
  "type": "object",
2043
- "required": ["types"],
2044
2051
  "properties": {
2045
2052
  "types": {
2053
+ "default": {},
2046
2054
  "type": "object",
2047
2055
  "additionalProperties": {
2048
2056
  "$ref": "#/definitions/CustomRestrictedType"
@@ -2051,6 +2059,24 @@
2051
2059
  },
2052
2060
  "additionalProperties": false
2053
2061
  },
2062
+ "NoSecretsConfiguration": {
2063
+ "anyOf": [
2064
+ { "$ref": "#/definitions/RulePlainConfiguration" },
2065
+ { "$ref": "#/definitions/RuleWithNoSecretsOptions" }
2066
+ ]
2067
+ },
2068
+ "NoSecretsOptions": {
2069
+ "type": "object",
2070
+ "properties": {
2071
+ "entropyThreshold": {
2072
+ "description": "Set entropy threshold (default is 41).",
2073
+ "type": ["integer", "null"],
2074
+ "format": "uint16",
2075
+ "minimum": 0.0
2076
+ }
2077
+ },
2078
+ "additionalProperties": false
2079
+ },
2054
2080
  "Nursery": {
2055
2081
  "description": "A list of rules that belong to this group",
2056
2082
  "type": "object",
@@ -2073,6 +2099,20 @@
2073
2099
  { "type": "null" }
2074
2100
  ]
2075
2101
  },
2102
+ "noDocumentCookie": {
2103
+ "description": "Disallow direct assignments to document.cookie.",
2104
+ "anyOf": [
2105
+ { "$ref": "#/definitions/RuleConfiguration" },
2106
+ { "type": "null" }
2107
+ ]
2108
+ },
2109
+ "noDocumentImportInPage": {
2110
+ "description": "Prevents importing next/document outside of pages/_document.jsx in Next.js projects.",
2111
+ "anyOf": [
2112
+ { "$ref": "#/definitions/RuleConfiguration" },
2113
+ { "type": "null" }
2114
+ ]
2115
+ },
2076
2116
  "noDuplicateCustomProperties": {
2077
2117
  "description": "Disallow duplicate custom properties within declaration blocks.",
2078
2118
  "anyOf": [
@@ -2087,6 +2127,13 @@
2087
2127
  { "type": "null" }
2088
2128
  ]
2089
2129
  },
2130
+ "noDuplicateProperties": {
2131
+ "description": "Disallow duplicate properties within declaration blocks.",
2132
+ "anyOf": [
2133
+ { "$ref": "#/definitions/RuleConfiguration" },
2134
+ { "type": "null" }
2135
+ ]
2136
+ },
2090
2137
  "noDuplicatedFields": {
2091
2138
  "description": "No duplicated fields in GraphQL operations.",
2092
2139
  "anyOf": [
@@ -2115,6 +2162,27 @@
2115
2162
  { "type": "null" }
2116
2163
  ]
2117
2164
  },
2165
+ "noHeadElement": {
2166
+ "description": "Prevent usage of \\<head> element in a Next.js project.",
2167
+ "anyOf": [
2168
+ { "$ref": "#/definitions/RuleConfiguration" },
2169
+ { "type": "null" }
2170
+ ]
2171
+ },
2172
+ "noHeadImportInDocument": {
2173
+ "description": "Prevent using the next/head module in pages/_document.js on Next.js projects.",
2174
+ "anyOf": [
2175
+ { "$ref": "#/definitions/RuleConfiguration" },
2176
+ { "type": "null" }
2177
+ ]
2178
+ },
2179
+ "noImgElement": {
2180
+ "description": "Prevent usage of \\<img> element in a Next.js project.",
2181
+ "anyOf": [
2182
+ { "$ref": "#/definitions/RuleConfiguration" },
2183
+ { "type": "null" }
2184
+ ]
2185
+ },
2118
2186
  "noIrregularWhitespace": {
2119
2187
  "description": "Disallows the use of irregular whitespace characters.",
2120
2188
  "anyOf": [
@@ -2167,7 +2235,7 @@
2167
2235
  "noSecrets": {
2168
2236
  "description": "Disallow usage of sensitive data such as API keys and tokens.",
2169
2237
  "anyOf": [
2170
- { "$ref": "#/definitions/RuleConfiguration" },
2238
+ { "$ref": "#/definitions/NoSecretsConfiguration" },
2171
2239
  { "type": "null" }
2172
2240
  ]
2173
2241
  },
@@ -2206,6 +2274,13 @@
2206
2274
  { "type": "null" }
2207
2275
  ]
2208
2276
  },
2277
+ "noUnknownTypeSelector": {
2278
+ "description": "Disallow unknown type selectors.",
2279
+ "anyOf": [
2280
+ { "$ref": "#/definitions/RuleConfiguration" },
2281
+ { "type": "null" }
2282
+ ]
2283
+ },
2209
2284
  "noUselessEscapeInRegex": {
2210
2285
  "description": "Disallow unnecessary escape sequence in regular expression literals.",
2211
2286
  "anyOf": [
@@ -2213,6 +2288,13 @@
2213
2288
  { "type": "null" }
2214
2289
  ]
2215
2290
  },
2291
+ "noUselessStringRaw": {
2292
+ "description": "Disallow unnecessary String.raw function in template string literals without any escape sequence.",
2293
+ "anyOf": [
2294
+ { "$ref": "#/definitions/RuleConfiguration" },
2295
+ { "type": "null" }
2296
+ ]
2297
+ },
2216
2298
  "noValueAtRule": {
2217
2299
  "description": "Disallow use of @value rule in css modules.",
2218
2300
  "anyOf": [
@@ -2238,6 +2320,20 @@
2238
2320
  { "type": "null" }
2239
2321
  ]
2240
2322
  },
2323
+ "useAtIndex": {
2324
+ "description": "Use at() instead of integer index access.",
2325
+ "anyOf": [
2326
+ { "$ref": "#/definitions/RuleFixConfiguration" },
2327
+ { "type": "null" }
2328
+ ]
2329
+ },
2330
+ "useCollapsedIf": {
2331
+ "description": "Enforce using single if instead of nested if clauses.",
2332
+ "anyOf": [
2333
+ { "$ref": "#/definitions/RuleFixConfiguration" },
2334
+ { "type": "null" }
2335
+ ]
2336
+ },
2241
2337
  "useComponentExportOnlyModules": {
2242
2338
  "description": "Enforce declaring components only within modules that export React Components exclusively.",
2243
2339
  "anyOf": [
@@ -2270,13 +2366,27 @@
2270
2366
  { "type": "null" }
2271
2367
  ]
2272
2368
  },
2273
- "useExplicitFunctionReturnType": {
2369
+ "useExplicitType": {
2274
2370
  "description": "Require explicit return types on functions and class methods.",
2275
2371
  "anyOf": [
2276
2372
  { "$ref": "#/definitions/RuleConfiguration" },
2277
2373
  { "type": "null" }
2278
2374
  ]
2279
2375
  },
2376
+ "useGoogleFontDisplay": {
2377
+ "description": "Enforces the use of a recommended display strategy with Google Fonts.",
2378
+ "anyOf": [
2379
+ { "$ref": "#/definitions/RuleConfiguration" },
2380
+ { "type": "null" }
2381
+ ]
2382
+ },
2383
+ "useGuardForIn": {
2384
+ "description": "Require for-in loops to include an if statement.",
2385
+ "anyOf": [
2386
+ { "$ref": "#/definitions/RuleConfiguration" },
2387
+ { "type": "null" }
2388
+ ]
2389
+ },
2280
2390
  "useImportRestrictions": {
2281
2391
  "description": "Disallows package private imports.",
2282
2392
  "anyOf": [
@@ -2531,7 +2641,6 @@
2531
2641
  "RestrictedGlobalsOptions": {
2532
2642
  "description": "Options for the rule `noRestrictedGlobals`.",
2533
2643
  "type": "object",
2534
- "required": ["deniedGlobals"],
2535
2644
  "properties": {
2536
2645
  "deniedGlobals": {
2537
2646
  "description": "A list of names that should trigger the rule",
@@ -2550,7 +2659,6 @@
2550
2659
  "RestrictedImportsOptions": {
2551
2660
  "description": "Options for the rule `noRestrictedImports`.",
2552
2661
  "type": "object",
2553
- "required": ["paths"],
2554
2662
  "properties": {
2555
2663
  "paths": {
2556
2664
  "description": "A list of names that should trigger the rule",
@@ -2798,6 +2906,21 @@
2798
2906
  },
2799
2907
  "additionalProperties": false
2800
2908
  },
2909
+ "RuleWithNoSecretsOptions": {
2910
+ "type": "object",
2911
+ "required": ["level"],
2912
+ "properties": {
2913
+ "level": {
2914
+ "description": "The severity of the emitted diagnostics by the rule",
2915
+ "allOf": [{ "$ref": "#/definitions/RulePlainConfiguration" }]
2916
+ },
2917
+ "options": {
2918
+ "description": "Rule's options",
2919
+ "allOf": [{ "$ref": "#/definitions/NoSecretsOptions" }]
2920
+ }
2921
+ },
2922
+ "additionalProperties": false
2923
+ },
2801
2924
  "RuleWithRestrictedGlobalsOptions": {
2802
2925
  "type": "object",
2803
2926
  "required": ["level"],
@@ -3440,14 +3563,15 @@
3440
3563
  },
3441
3564
  "SuggestedExtensionMapping": {
3442
3565
  "type": "object",
3443
- "required": ["component", "module"],
3444
3566
  "properties": {
3445
3567
  "component": {
3446
3568
  "description": "Extension that should be used for component file imports",
3569
+ "default": "",
3447
3570
  "type": "string"
3448
3571
  },
3449
3572
  "module": {
3450
3573
  "description": "Extension that should be used for module imports",
3574
+ "default": "",
3451
3575
  "type": "string"
3452
3576
  }
3453
3577
  },
@@ -4009,6 +4133,11 @@
4009
4133
  "type": "array",
4010
4134
  "items": { "$ref": "#/definitions/Hook" }
4011
4135
  },
4136
+ "reportMissingDependenciesArray": {
4137
+ "description": "Whether to report an error when a hook has no dependencies array.",
4138
+ "default": false,
4139
+ "type": "boolean"
4140
+ },
4012
4141
  "reportUnnecessaryDependencies": {
4013
4142
  "description": "Whether to report an error when a dependency is listed in the dependencies array but isn't used. Defaults to true.",
4014
4143
  "default": true,
@@ -4025,10 +4154,10 @@
4025
4154
  },
4026
4155
  "UseImportExtensionsOptions": {
4027
4156
  "type": "object",
4028
- "required": ["suggestedExtensions"],
4029
4157
  "properties": {
4030
4158
  "suggestedExtensions": {
4031
4159
  "description": "A map of custom import extension mappings, where the key is the inspected file extension, and the value is a pair of `module` extension and `component` import extension",
4160
+ "default": {},
4032
4161
  "type": "object",
4033
4162
  "additionalProperties": {
4034
4163
  "$ref": "#/definitions/SuggestedExtensionMapping"
@@ -4045,10 +4174,10 @@
4045
4174
  },
4046
4175
  "UseValidAutocompleteOptions": {
4047
4176
  "type": "object",
4048
- "required": ["inputComponents"],
4049
4177
  "properties": {
4050
4178
  "inputComponents": {
4051
4179
  "description": "`input` like custom components that should be checked.",
4180
+ "default": [],
4052
4181
  "type": "array",
4053
4182
  "items": { "type": "string" }
4054
4183
  }
@@ -4085,10 +4214,13 @@
4085
4214
  },
4086
4215
  "ValidAriaRoleOptions": {
4087
4216
  "type": "object",
4088
- "required": ["allowInvalidRoles", "ignoreNonDom"],
4089
4217
  "properties": {
4090
- "allowInvalidRoles": { "type": "array", "items": { "type": "string" } },
4091
- "ignoreNonDom": { "type": "boolean" }
4218
+ "allowInvalidRoles": {
4219
+ "default": [],
4220
+ "type": "array",
4221
+ "items": { "type": "string" }
4222
+ },
4223
+ "ignoreNonDom": { "default": false, "type": "boolean" }
4092
4224
  },
4093
4225
  "additionalProperties": false
4094
4226
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biomejs/biome",
3
- "version": "1.9.3",
3
+ "version": "1.9.4",
4
4
  "bin": {
5
5
  "biome": "bin/biome"
6
6
  },
@@ -50,13 +50,13 @@
50
50
  "provenance": true
51
51
  },
52
52
  "optionalDependencies": {
53
- "@biomejs/cli-win32-x64": "1.9.3",
54
- "@biomejs/cli-win32-arm64": "1.9.3",
55
- "@biomejs/cli-darwin-x64": "1.9.3",
56
- "@biomejs/cli-darwin-arm64": "1.9.3",
57
- "@biomejs/cli-linux-x64": "1.9.3",
58
- "@biomejs/cli-linux-arm64": "1.9.3",
59
- "@biomejs/cli-linux-x64-musl": "1.9.3",
60
- "@biomejs/cli-linux-arm64-musl": "1.9.3"
53
+ "@biomejs/cli-win32-x64": "1.9.4",
54
+ "@biomejs/cli-win32-arm64": "1.9.4",
55
+ "@biomejs/cli-darwin-x64": "1.9.4",
56
+ "@biomejs/cli-darwin-arm64": "1.9.4",
57
+ "@biomejs/cli-linux-x64": "1.9.4",
58
+ "@biomejs/cli-linux-arm64": "1.9.4",
59
+ "@biomejs/cli-linux-x64-musl": "1.9.4",
60
+ "@biomejs/cli-linux-arm64-musl": "1.9.4"
61
61
  }
62
62
  }