@biomejs/biome 1.6.4-nightly.abab451 → 1.7.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.
@@ -123,7 +123,7 @@
123
123
  ]
124
124
  },
125
125
  "noHeaderScope": {
126
- "description": "The scope prop should be used only on <th> elements.",
126
+ "description": "The scope prop should be used only on \\<th> elements.",
127
127
  "anyOf": [
128
128
  { "$ref": "#/definitions/RuleConfiguration" },
129
129
  { "type": "null" }
@@ -328,6 +328,13 @@
328
328
  { "type": "null" }
329
329
  ]
330
330
  },
331
+ "noExcessiveNestedTestSuites": {
332
+ "description": "This rule enforces a maximum depth to nested describe() in test files.",
333
+ "anyOf": [
334
+ { "$ref": "#/definitions/RuleConfiguration" },
335
+ { "type": "null" }
336
+ ]
337
+ },
331
338
  "noExtraBooleanCast": {
332
339
  "description": "Disallow unnecessary boolean casts",
333
340
  "anyOf": [
@@ -419,6 +426,13 @@
419
426
  { "type": "null" }
420
427
  ]
421
428
  },
429
+ "noUselessTernary": {
430
+ "description": "Disallow ternary operators when simpler alternatives exist.",
431
+ "anyOf": [
432
+ { "$ref": "#/definitions/RuleConfiguration" },
433
+ { "type": "null" }
434
+ ]
435
+ },
422
436
  "noUselessThisAlias": {
423
437
  "description": "Disallow useless this aliasing.",
424
438
  "anyOf": [
@@ -737,7 +751,7 @@
737
751
  "noUnusedImports": {
738
752
  "description": "Disallow unused imports.",
739
753
  "anyOf": [
740
- { "$ref": "#/definitions/UnusedImportsConfiguration" },
754
+ { "$ref": "#/definitions/RuleConfiguration" },
741
755
  { "type": "null" }
742
756
  ]
743
757
  },
@@ -801,6 +815,13 @@
801
815
  { "type": "null" }
802
816
  ]
803
817
  },
818
+ "useJsxKeyInIterable": {
819
+ "description": "Disallow missing key props in iterators/collection literals.",
820
+ "anyOf": [
821
+ { "$ref": "#/definitions/RuleConfiguration" },
822
+ { "type": "null" }
823
+ ]
824
+ },
804
825
  "useValidForDirection": {
805
826
  "description": "Enforce \"for\" loop update clause moving the counter in the right direction.",
806
827
  "anyOf": [
@@ -1107,6 +1128,10 @@
1107
1128
  "description": "A list of global bindings that should be ignored by the analyzers\n\nIf defined here, they should not emit diagnostics.",
1108
1129
  "anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
1109
1130
  },
1131
+ "jsx_runtime": {
1132
+ "description": "Indicates the type of runtime or transformation used for interpreting JSX.",
1133
+ "anyOf": [{ "$ref": "#/definitions/JsxRuntime" }, { "type": "null" }]
1134
+ },
1110
1135
  "organize_imports": {
1111
1136
  "anyOf": [
1112
1137
  { "$ref": "#/definitions/JavascriptOrganizeImports" },
@@ -1301,6 +1326,21 @@
1301
1326
  },
1302
1327
  "additionalProperties": false
1303
1328
  },
1329
+ "JsxRuntime": {
1330
+ "description": "Indicates the type of runtime or transformation used for interpreting JSX.",
1331
+ "oneOf": [
1332
+ {
1333
+ "description": "Indicates a modern or native JSX environment, that doesn't require special handling by Biome.",
1334
+ "type": "string",
1335
+ "enum": ["Transparent"]
1336
+ },
1337
+ {
1338
+ "description": "Indicates a classic React environment that requires the `React` import.\n\nCorresponds to the `react` value for the `jsx` option in TypeScript's `tsconfig.json`.\n\nThis option should only be necessary if you cannot upgrade to a React version that supports the new JSX runtime. For more information about the old vs. new JSX runtime, please see: <https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html>",
1339
+ "type": "string",
1340
+ "enum": ["ReactClassic"]
1341
+ }
1342
+ ]
1343
+ },
1304
1344
  "LineEnding": {
1305
1345
  "oneOf": [
1306
1346
  {
@@ -1381,22 +1421,22 @@
1381
1421
  "description": "It enables ALL rules for this group.",
1382
1422
  "type": ["boolean", "null"]
1383
1423
  },
1384
- "noBarrelFile": {
1385
- "description": "Disallow the use of barrel file.",
1424
+ "noColorInvalidHex": {
1425
+ "description": "WIP: This rule hasn't been implemented yet.",
1386
1426
  "anyOf": [
1387
1427
  { "$ref": "#/definitions/RuleConfiguration" },
1388
1428
  { "type": "null" }
1389
1429
  ]
1390
1430
  },
1391
- "noColorInvalidHex": {
1392
- "description": "[WIP] This rule hasn't been implemented yet.",
1431
+ "noConsole": {
1432
+ "description": "Disallow the use of console.",
1393
1433
  "anyOf": [
1394
1434
  { "$ref": "#/definitions/RuleConfiguration" },
1395
1435
  { "type": "null" }
1396
1436
  ]
1397
1437
  },
1398
- "noConsole": {
1399
- "description": "Disallow the use of console.",
1438
+ "noConstantMathMinMaxClamp": {
1439
+ "description": "Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant.",
1400
1440
  "anyOf": [
1401
1441
  { "$ref": "#/definitions/RuleConfiguration" },
1402
1442
  { "type": "null" }
@@ -1416,15 +1456,15 @@
1416
1456
  { "type": "null" }
1417
1457
  ]
1418
1458
  },
1419
- "noDuplicateJsonKeys": {
1420
- "description": "Disallow two keys with the same name inside a JSON object.",
1459
+ "noDuplicateFontNames": {
1460
+ "description": "Disallow duplicate names within font families.",
1421
1461
  "anyOf": [
1422
1462
  { "$ref": "#/definitions/RuleConfiguration" },
1423
1463
  { "type": "null" }
1424
1464
  ]
1425
1465
  },
1426
- "noDuplicateTestHooks": {
1427
- "description": "A describe block should not contain duplicate hooks.",
1466
+ "noDuplicateJsonKeys": {
1467
+ "description": "Disallow two keys with the same name inside a JSON object.",
1428
1468
  "anyOf": [
1429
1469
  { "$ref": "#/definitions/RuleConfiguration" },
1430
1470
  { "type": "null" }
@@ -1437,22 +1477,8 @@
1437
1477
  { "type": "null" }
1438
1478
  ]
1439
1479
  },
1440
- "noExcessiveNestedTestSuites": {
1441
- "description": "This rule enforces a maximum depth to nested describe() in test files.",
1442
- "anyOf": [
1443
- { "$ref": "#/definitions/RuleConfiguration" },
1444
- { "type": "null" }
1445
- ]
1446
- },
1447
- "noExportsInTest": {
1448
- "description": "Disallow using export or module.exports in files containing tests",
1449
- "anyOf": [
1450
- { "$ref": "#/definitions/RuleConfiguration" },
1451
- { "type": "null" }
1452
- ]
1453
- },
1454
- "noFocusedTests": {
1455
- "description": "Disallow focused tests.",
1480
+ "noFlatMapIdentity": {
1481
+ "description": "Disallow to use unnecessary callback on flatMap.",
1456
1482
  "anyOf": [
1457
1483
  { "$ref": "#/definitions/RuleConfiguration" },
1458
1484
  { "type": "null" }
@@ -1465,13 +1491,6 @@
1465
1491
  { "type": "null" }
1466
1492
  ]
1467
1493
  },
1468
- "noNamespaceImport": {
1469
- "description": "Disallow the use of namespace imports.",
1470
- "anyOf": [
1471
- { "$ref": "#/definitions/RuleConfiguration" },
1472
- { "type": "null" }
1473
- ]
1474
- },
1475
1494
  "noNodejsModules": {
1476
1495
  "description": "Forbid the use of Node.js builtin modules.",
1477
1496
  "anyOf": [
@@ -1479,13 +1498,6 @@
1479
1498
  { "type": "null" }
1480
1499
  ]
1481
1500
  },
1482
- "noReExportAll": {
1483
- "description": "Avoid re-export all.",
1484
- "anyOf": [
1485
- { "$ref": "#/definitions/RuleConfiguration" },
1486
- { "type": "null" }
1487
- ]
1488
- },
1489
1501
  "noRestrictedImports": {
1490
1502
  "description": "Disallow specified modules when loaded by import or require.",
1491
1503
  "anyOf": [
@@ -1493,20 +1505,6 @@
1493
1505
  { "type": "null" }
1494
1506
  ]
1495
1507
  },
1496
- "noSkippedTests": {
1497
- "description": "Disallow disabled tests.",
1498
- "anyOf": [
1499
- { "$ref": "#/definitions/RuleConfiguration" },
1500
- { "type": "null" }
1501
- ]
1502
- },
1503
- "noSuspiciousSemicolonInJsx": {
1504
- "description": "It detects possible \"wrong\" semicolons inside JSX elements.",
1505
- "anyOf": [
1506
- { "$ref": "#/definitions/RuleConfiguration" },
1507
- { "type": "null" }
1508
- ]
1509
- },
1510
1508
  "noUndeclaredDependencies": {
1511
1509
  "description": "Disallow the use of dependencies that aren't specified in the package.json.",
1512
1510
  "anyOf": [
@@ -1514,13 +1512,6 @@
1514
1512
  { "type": "null" }
1515
1513
  ]
1516
1514
  },
1517
- "noUselessTernary": {
1518
- "description": "Disallow ternary operators when simpler alternatives exist.",
1519
- "anyOf": [
1520
- { "$ref": "#/definitions/RuleConfiguration" },
1521
- { "type": "null" }
1522
- ]
1523
- },
1524
1515
  "recommended": {
1525
1516
  "description": "It enables the recommended rules for this group",
1526
1517
  "type": ["boolean", "null"]
@@ -1532,20 +1523,6 @@
1532
1523
  { "type": "null" }
1533
1524
  ]
1534
1525
  },
1535
- "useJsxKeyInIterable": {
1536
- "description": "Disallow missing key props in iterators/collection literals.",
1537
- "anyOf": [
1538
- { "$ref": "#/definitions/RuleConfiguration" },
1539
- { "type": "null" }
1540
- ]
1541
- },
1542
- "useNodeAssertStrict": {
1543
- "description": "Promotes the usage of node:assert/strict over node:assert.",
1544
- "anyOf": [
1545
- { "$ref": "#/definitions/RuleConfiguration" },
1546
- { "type": "null" }
1547
- ]
1548
- },
1549
1526
  "useSortedClasses": {
1550
1527
  "description": "Enforce the sorting of CSS utility classes.",
1551
1528
  "anyOf": [
@@ -1718,6 +1695,13 @@
1718
1695
  { "type": "null" }
1719
1696
  ]
1720
1697
  },
1698
+ "noBarrelFile": {
1699
+ "description": "Disallow the use of barrel file.",
1700
+ "anyOf": [
1701
+ { "$ref": "#/definitions/RuleConfiguration" },
1702
+ { "type": "null" }
1703
+ ]
1704
+ },
1721
1705
  "noDelete": {
1722
1706
  "description": "Disallow the use of the delete operator.",
1723
1707
  "anyOf": [
@@ -1725,6 +1709,13 @@
1725
1709
  { "type": "null" }
1726
1710
  ]
1727
1711
  },
1712
+ "noReExportAll": {
1713
+ "description": "Avoid re-export all.",
1714
+ "anyOf": [
1715
+ { "$ref": "#/definitions/RuleConfiguration" },
1716
+ { "type": "null" }
1717
+ ]
1718
+ },
1728
1719
  "recommended": {
1729
1720
  "description": "It enables the recommended rules for this group",
1730
1721
  "type": ["boolean", "null"]
@@ -1868,15 +1859,6 @@
1868
1859
  },
1869
1860
  "additionalProperties": false
1870
1861
  },
1871
- "RuleWithUnusedImportsOptions": {
1872
- "type": "object",
1873
- "required": ["level", "options"],
1874
- "properties": {
1875
- "level": { "$ref": "#/definitions/RulePlainConfiguration" },
1876
- "options": { "$ref": "#/definitions/UnusedImportsOptions" }
1877
- },
1878
- "additionalProperties": false
1879
- },
1880
1862
  "RuleWithUtilityClassSortingOptions": {
1881
1863
  "type": "object",
1882
1864
  "required": ["level", "options"],
@@ -1973,26 +1955,19 @@
1973
1955
  "StableHookResult": {
1974
1956
  "oneOf": [
1975
1957
  {
1976
- "description": "Used to indicate the hook does not have a stable result.",
1977
- "type": "string",
1978
- "enum": ["None"]
1979
- },
1980
- {
1981
- "description": "Used to indicate the identity of the result value is stable.\n\nNote this does not imply internal stability. For instance, the ref objects returned by React's `useRef()` always have a stable identity, but their internal value may be mutable.",
1982
- "type": "string",
1983
- "enum": ["Identity"]
1958
+ "description": "Whether the hook has a stable result.",
1959
+ "type": "boolean"
1984
1960
  },
1985
1961
  {
1986
- "description": "Used to indicate the hook returns an array and some of its indices have stable identities.\n\nFor example, React's `useState()` hook returns a stable function at index 1.",
1987
- "type": "object",
1988
- "required": ["Indices"],
1989
- "properties": {
1990
- "Indices": {
1991
- "type": "array",
1992
- "items": { "type": "integer", "format": "uint8", "minimum": 0.0 }
1993
- }
1962
+ "description": "Used to indicate the hook returns an array and some of its indices have stable identities.",
1963
+ "type": "array",
1964
+ "items": {
1965
+ "type": "integer",
1966
+ "format": "uint8",
1967
+ "maximum": 255.0,
1968
+ "minimum": 0.0
1994
1969
  },
1995
- "additionalProperties": false
1970
+ "minItems": 1
1996
1971
  }
1997
1972
  ]
1998
1973
  },
@@ -2051,6 +2026,13 @@
2051
2026
  { "type": "null" }
2052
2027
  ]
2053
2028
  },
2029
+ "noNamespaceImport": {
2030
+ "description": "Disallow the use of namespace imports.",
2031
+ "anyOf": [
2032
+ { "$ref": "#/definitions/RuleConfiguration" },
2033
+ { "type": "null" }
2034
+ ]
2035
+ },
2054
2036
  "noNegationElse": {
2055
2037
  "description": "Disallow negation in the condition of an if statement if it has an else clause.",
2056
2038
  "anyOf": [
@@ -2140,7 +2122,7 @@
2140
2122
  ]
2141
2123
  },
2142
2124
  "useConsistentArrayType": {
2143
- "description": "Require consistently using either T[] or Array<T>",
2125
+ "description": "Require consistently using either T\\[] or Array\\<T>",
2144
2126
  "anyOf": [
2145
2127
  { "$ref": "#/definitions/ConsistentArrayTypeConfiguration" },
2146
2128
  { "type": "null" }
@@ -2196,7 +2178,7 @@
2196
2178
  ]
2197
2179
  },
2198
2180
  "useFragmentSyntax": {
2199
- "description": "This rule enforces the use of <>...</> over <Fragment>...</Fragment>.",
2181
+ "description": "This rule enforces the use of \\<>...\\</> over \\<Fragment>...\\</Fragment>.",
2200
2182
  "anyOf": [
2201
2183
  { "$ref": "#/definitions/RuleConfiguration" },
2202
2184
  { "type": "null" }
@@ -2223,6 +2205,13 @@
2223
2205
  { "type": "null" }
2224
2206
  ]
2225
2207
  },
2208
+ "useNodeAssertStrict": {
2209
+ "description": "Promotes the usage of node:assert/strict over node:assert.",
2210
+ "anyOf": [
2211
+ { "$ref": "#/definitions/RuleConfiguration" },
2212
+ { "type": "null" }
2213
+ ]
2214
+ },
2226
2215
  "useNodejsImportProtocol": {
2227
2216
  "description": "Enforces using the node: protocol for Node.js builtin modules.",
2228
2217
  "anyOf": [
@@ -2252,7 +2241,7 @@
2252
2241
  ]
2253
2242
  },
2254
2243
  "useShorthandArrayType": {
2255
- "description": "When expressing array types, this rule promotes the usage of T[] shorthand instead of Array<T>.",
2244
+ "description": "When expressing array types, this rule promotes the usage of T\\[] shorthand instead of Array\\<T>.",
2256
2245
  "anyOf": [
2257
2246
  { "$ref": "#/definitions/RuleConfiguration" },
2258
2247
  { "type": "null" }
@@ -2451,6 +2440,13 @@
2451
2440
  { "type": "null" }
2452
2441
  ]
2453
2442
  },
2443
+ "noDuplicateTestHooks": {
2444
+ "description": "A describe block should not contain duplicate hooks.",
2445
+ "anyOf": [
2446
+ { "$ref": "#/definitions/RuleConfiguration" },
2447
+ { "type": "null" }
2448
+ ]
2449
+ },
2454
2450
  "noEmptyBlockStatements": {
2455
2451
  "description": "Disallow empty block statements and static blocks.",
2456
2452
  "anyOf": [
@@ -2472,6 +2468,13 @@
2472
2468
  { "type": "null" }
2473
2469
  ]
2474
2470
  },
2471
+ "noExportsInTest": {
2472
+ "description": "Disallow using export or module.exports in files containing tests",
2473
+ "anyOf": [
2474
+ { "$ref": "#/definitions/RuleConfiguration" },
2475
+ { "type": "null" }
2476
+ ]
2477
+ },
2475
2478
  "noExtraNonNullAssertion": {
2476
2479
  "description": "Prevents the wrong usage of the non-null assertion operator (!) in TypeScript files.",
2477
2480
  "anyOf": [
@@ -2486,6 +2489,13 @@
2486
2489
  { "type": "null" }
2487
2490
  ]
2488
2491
  },
2492
+ "noFocusedTests": {
2493
+ "description": "Disallow focused tests.",
2494
+ "anyOf": [
2495
+ { "$ref": "#/definitions/RuleConfiguration" },
2496
+ { "type": "null" }
2497
+ ]
2498
+ },
2489
2499
  "noFunctionAssign": {
2490
2500
  "description": "Disallow reassigning function declarations.",
2491
2501
  "anyOf": [
@@ -2591,6 +2601,13 @@
2591
2601
  { "type": "null" }
2592
2602
  ]
2593
2603
  },
2604
+ "noSkippedTests": {
2605
+ "description": "Disallow disabled tests.",
2606
+ "anyOf": [
2607
+ { "$ref": "#/definitions/RuleConfiguration" },
2608
+ { "type": "null" }
2609
+ ]
2610
+ },
2594
2611
  "noSparseArray": {
2595
2612
  "description": "Disallow sparse arrays",
2596
2613
  "anyOf": [
@@ -2598,6 +2615,13 @@
2598
2615
  { "type": "null" }
2599
2616
  ]
2600
2617
  },
2618
+ "noSuspiciousSemicolonInJsx": {
2619
+ "description": "It detects possible \"wrong\" semicolons inside JSX elements.",
2620
+ "anyOf": [
2621
+ { "$ref": "#/definitions/RuleConfiguration" },
2622
+ { "type": "null" }
2623
+ ]
2624
+ },
2601
2625
  "noThenProperty": {
2602
2626
  "description": "Disallow then property.",
2603
2627
  "anyOf": [
@@ -2702,23 +2726,6 @@
2702
2726
  }
2703
2727
  ]
2704
2728
  },
2705
- "UnusedImportsConfiguration": {
2706
- "anyOf": [
2707
- { "$ref": "#/definitions/RulePlainConfiguration" },
2708
- { "$ref": "#/definitions/RuleWithUnusedImportsOptions" }
2709
- ]
2710
- },
2711
- "UnusedImportsOptions": {
2712
- "type": "object",
2713
- "required": ["ignoreReact"],
2714
- "properties": {
2715
- "ignoreReact": {
2716
- "description": "Ignore `React` imports from the `react` package when set to `true`.",
2717
- "type": "boolean"
2718
- }
2719
- },
2720
- "additionalProperties": false
2721
- },
2722
2729
  "UtilityClassSortingConfiguration": {
2723
2730
  "anyOf": [
2724
2731
  { "$ref": "#/definitions/RulePlainConfiguration" },
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@biomejs/biome","version":"1.6.4-nightly.abab451","bin":"bin/biome","scripts":{"postinstall":"node scripts/postinstall.js"},"homepage":"https://biomejs.dev","repository":{"type":"git","url":"https://github.com/biomejs/biome.git","directory":"packages/@biomejs/biome"},"author":"Emanuele Stoppa","license":"MIT OR Apache-2.0","bugs":"https://github.com/biomejs/biome/issues","description":"Biome is a toolchain for the web: formatter, linter and more","files":["bin/biome","scripts/postinstall.js","configuration_schema.json","README.md","LICENSE-APACHE","LICENSE-MIT","ROME-LICENSE-MIT"],"keywords":["JavaScript","TypeScript","format","lint","toolchain","JSON"],"engines":{"node":">=14.21.3"},"funding":{"type":"opencollective","url":"https://opencollective.com/biome"},"optionalDependencies":{"@biomejs/cli-win32-x64":"1.6.4-nightly.abab451","@biomejs/cli-win32-arm64":"1.6.4-nightly.abab451","@biomejs/cli-darwin-x64":"1.6.4-nightly.abab451","@biomejs/cli-darwin-arm64":"1.6.4-nightly.abab451","@biomejs/cli-linux-x64":"1.6.4-nightly.abab451","@biomejs/cli-linux-arm64":"1.6.4-nightly.abab451","@biomejs/cli-linux-x64-musl":"1.6.4-nightly.abab451","@biomejs/cli-linux-arm64-musl":"1.6.4-nightly.abab451"}}
1
+ {"name":"@biomejs/biome","version":"1.7.0","bin":"bin/biome","scripts":{"postinstall":"node scripts/postinstall.js"},"homepage":"https://biomejs.dev","repository":{"type":"git","url":"https://github.com/biomejs/biome.git","directory":"packages/@biomejs/biome"},"author":"Emanuele Stoppa","license":"MIT OR Apache-2.0","bugs":"https://github.com/biomejs/biome/issues","description":"Biome is a toolchain for the web: formatter, linter and more","files":["bin/biome","scripts/postinstall.js","configuration_schema.json","README.md","LICENSE-APACHE","LICENSE-MIT","ROME-LICENSE-MIT"],"keywords":["JavaScript","TypeScript","format","lint","toolchain","JSON"],"engines":{"node":">=14.21.3"},"funding":{"type":"opencollective","url":"https://opencollective.com/biome"},"optionalDependencies":{"@biomejs/cli-win32-x64":"1.7.0","@biomejs/cli-win32-arm64":"1.7.0","@biomejs/cli-darwin-x64":"1.7.0","@biomejs/cli-darwin-arm64":"1.7.0","@biomejs/cli-linux-x64":"1.7.0","@biomejs/cli-linux-arm64":"1.7.0","@biomejs/cli-linux-x64-musl":"1.7.0","@biomejs/cli-linux-arm64-musl":"1.7.0"}}