@biomejs/biome 1.2.1 → 1.2.2-nightly.1e3fc94
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/bin/biome +4 -1
- package/configuration_schema.json +105 -10
- package/package.json +1 -1
package/bin/biome
CHANGED
|
@@ -15,8 +15,11 @@ const PLATFORMS = {
|
|
|
15
15
|
arm64: "@biomejs/cli-linux-arm64/biome",
|
|
16
16
|
},
|
|
17
17
|
};
|
|
18
|
+
if (env.ROME_BINARY) {
|
|
19
|
+
console.warn(`[WARN] The environment variable "ROME_BINARY" is deprecated. Use "BIOME_BINARY" instead.`)
|
|
20
|
+
}
|
|
18
21
|
|
|
19
|
-
const binPath = env.ROME_BINARY || PLATFORMS?.[platform]?.[arch];
|
|
22
|
+
const binPath = env.BIOME_BINARY || env.ROME_BINARY || PLATFORMS?.[platform]?.[arch];
|
|
20
23
|
if (binPath) {
|
|
21
24
|
const packageManager = detectPackageManager();
|
|
22
25
|
const result = require("child_process").spawnSync(
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
]
|
|
289
289
|
},
|
|
290
290
|
"noMultipleSpacesInRegularExpressionLiterals": {
|
|
291
|
-
"description": "Disallow unclear usage of
|
|
291
|
+
"description": "Disallow unclear usage of consecutive space characters in regular expression literals",
|
|
292
292
|
"anyOf": [
|
|
293
293
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
294
294
|
{ "type": "null" }
|
|
@@ -568,7 +568,7 @@
|
|
|
568
568
|
]
|
|
569
569
|
},
|
|
570
570
|
"noUnreachableSuper": {
|
|
571
|
-
"description": "Ensures the super() constructor is called exactly once on every code
|
|
571
|
+
"description": "Ensures the super() constructor is called exactly once on every code path in a class constructor before this is accessed if the class has a superclass",
|
|
572
572
|
"anyOf": [
|
|
573
573
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
574
574
|
{ "type": "null" }
|
|
@@ -664,13 +664,17 @@
|
|
|
664
664
|
"type": "object",
|
|
665
665
|
"properties": {
|
|
666
666
|
"ignore": {
|
|
667
|
-
"description": "A list of Unix shell style patterns. Biome
|
|
667
|
+
"description": "A list of Unix shell style patterns. Biome will ignore files/folders that will match these patterns.",
|
|
668
668
|
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
669
669
|
},
|
|
670
670
|
"ignoreUnknown": {
|
|
671
671
|
"description": "Tells Biome to not emit diagnostics when handling files that doesn't know",
|
|
672
672
|
"type": ["boolean", "null"]
|
|
673
673
|
},
|
|
674
|
+
"include": {
|
|
675
|
+
"description": "A list of Unix shell style patterns. Biome will handle only those files/folders that will match these patterns.",
|
|
676
|
+
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
677
|
+
},
|
|
674
678
|
"maxSize": {
|
|
675
679
|
"description": "The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reasons. Defaults to 1 MiB",
|
|
676
680
|
"default": null,
|
|
@@ -695,8 +699,12 @@
|
|
|
695
699
|
"description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.",
|
|
696
700
|
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
697
701
|
},
|
|
702
|
+
"include": {
|
|
703
|
+
"description": "A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.",
|
|
704
|
+
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
705
|
+
},
|
|
698
706
|
"indentSize": {
|
|
699
|
-
"description": "The size of the indentation, 2 by default",
|
|
707
|
+
"description": "The size of the indentation, 2 by default (deprecated, use `indent-width`)",
|
|
700
708
|
"default": 2,
|
|
701
709
|
"type": ["integer", "null"],
|
|
702
710
|
"format": "uint8",
|
|
@@ -710,6 +718,13 @@
|
|
|
710
718
|
{ "type": "null" }
|
|
711
719
|
]
|
|
712
720
|
},
|
|
721
|
+
"indentWidth": {
|
|
722
|
+
"description": "The size of the indentation, 2 by default",
|
|
723
|
+
"default": 2,
|
|
724
|
+
"type": ["integer", "null"],
|
|
725
|
+
"format": "uint8",
|
|
726
|
+
"minimum": 0.0
|
|
727
|
+
},
|
|
713
728
|
"lineWidth": {
|
|
714
729
|
"description": "What's the max width of a line. Defaults to 80.",
|
|
715
730
|
"default": 80,
|
|
@@ -810,6 +825,12 @@
|
|
|
810
825
|
{ "type": "null" }
|
|
811
826
|
]
|
|
812
827
|
},
|
|
828
|
+
"indentWidth": {
|
|
829
|
+
"description": "The size of the indentation applied to JavaScript (and its super languages) files. Default to 2.",
|
|
830
|
+
"type": ["integer", "null"],
|
|
831
|
+
"format": "uint8",
|
|
832
|
+
"minimum": 0.0
|
|
833
|
+
},
|
|
813
834
|
"jsxQuoteStyle": {
|
|
814
835
|
"description": "The type of quotes used in JSX. Defaults to double.",
|
|
815
836
|
"anyOf": [{ "$ref": "#/definitions/QuoteStyle" }, { "type": "null" }]
|
|
@@ -896,6 +917,12 @@
|
|
|
896
917
|
{ "type": "null" }
|
|
897
918
|
]
|
|
898
919
|
},
|
|
920
|
+
"indentWidth": {
|
|
921
|
+
"description": "The size of the indentation applied to JSON (and its super languages) files. Default to 2.",
|
|
922
|
+
"type": ["integer", "null"],
|
|
923
|
+
"format": "uint8",
|
|
924
|
+
"minimum": 0.0
|
|
925
|
+
},
|
|
899
926
|
"lineWidth": {
|
|
900
927
|
"description": "What's the max width of a line, applied to JSON (and its super languages) files. Defaults to 80.",
|
|
901
928
|
"anyOf": [{ "$ref": "#/definitions/LineWidth" }, { "type": "null" }]
|
|
@@ -910,6 +937,10 @@
|
|
|
910
937
|
"allowComments": {
|
|
911
938
|
"description": "Allow parsing comments in `.json` files",
|
|
912
939
|
"type": ["boolean", "null"]
|
|
940
|
+
},
|
|
941
|
+
"allowTrailingCommas": {
|
|
942
|
+
"description": "Allow parsing trailing commas in `.json` files",
|
|
943
|
+
"type": ["boolean", "null"]
|
|
913
944
|
}
|
|
914
945
|
},
|
|
915
946
|
"additionalProperties": false
|
|
@@ -932,6 +963,10 @@
|
|
|
932
963
|
"description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.",
|
|
933
964
|
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
934
965
|
},
|
|
966
|
+
"include": {
|
|
967
|
+
"description": "A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.",
|
|
968
|
+
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
969
|
+
},
|
|
935
970
|
"rules": {
|
|
936
971
|
"description": "List of rules",
|
|
937
972
|
"default": { "recommended": true },
|
|
@@ -970,6 +1005,13 @@
|
|
|
970
1005
|
{ "type": "null" }
|
|
971
1006
|
]
|
|
972
1007
|
},
|
|
1008
|
+
"noApproximativeNumericConstant": {
|
|
1009
|
+
"description": "Usually, the definition in the standard library is more precise than what people come up with or the used constant exceeds the maximum precision of the number type.",
|
|
1010
|
+
"anyOf": [
|
|
1011
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1012
|
+
{ "type": "null" }
|
|
1013
|
+
]
|
|
1014
|
+
},
|
|
973
1015
|
"noConfusingVoidType": {
|
|
974
1016
|
"description": "Disallow void type outside of generic or return types.",
|
|
975
1017
|
"anyOf": [
|
|
@@ -984,8 +1026,15 @@
|
|
|
984
1026
|
{ "type": "null" }
|
|
985
1027
|
]
|
|
986
1028
|
},
|
|
1029
|
+
"noEmptyCharacterClassInRegex": {
|
|
1030
|
+
"description": "Disallow empty character classes in regular expression literals.",
|
|
1031
|
+
"anyOf": [
|
|
1032
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1033
|
+
{ "type": "null" }
|
|
1034
|
+
]
|
|
1035
|
+
},
|
|
987
1036
|
"noExcessiveComplexity": {
|
|
988
|
-
"description": "Disallow functions that exceed a given
|
|
1037
|
+
"description": "Disallow functions that exceed a given Cognitive Complexity score.",
|
|
989
1038
|
"anyOf": [
|
|
990
1039
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
991
1040
|
{ "type": "null" }
|
|
@@ -1012,6 +1061,34 @@
|
|
|
1012
1061
|
{ "type": "null" }
|
|
1013
1062
|
]
|
|
1014
1063
|
},
|
|
1064
|
+
"noInvalidNewBuiltin": {
|
|
1065
|
+
"description": "Disallow new operators with global non-constructor functions.",
|
|
1066
|
+
"anyOf": [
|
|
1067
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1068
|
+
{ "type": "null" }
|
|
1069
|
+
]
|
|
1070
|
+
},
|
|
1071
|
+
"noMisleadingInstantiator": {
|
|
1072
|
+
"description": "Enforce proper usage of new and constructor.",
|
|
1073
|
+
"anyOf": [
|
|
1074
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1075
|
+
{ "type": "null" }
|
|
1076
|
+
]
|
|
1077
|
+
},
|
|
1078
|
+
"noUnusedImports": {
|
|
1079
|
+
"description": "Disallow unused imports.",
|
|
1080
|
+
"anyOf": [
|
|
1081
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1082
|
+
{ "type": "null" }
|
|
1083
|
+
]
|
|
1084
|
+
},
|
|
1085
|
+
"noUselessElse": {
|
|
1086
|
+
"description": "Disallow else block when the if block breaks early.",
|
|
1087
|
+
"anyOf": [
|
|
1088
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1089
|
+
{ "type": "null" }
|
|
1090
|
+
]
|
|
1091
|
+
},
|
|
1015
1092
|
"noVoid": {
|
|
1016
1093
|
"description": "Disallow the use of void operators, which is not a familiar operator.",
|
|
1017
1094
|
"anyOf": [
|
|
@@ -1030,6 +1107,13 @@
|
|
|
1030
1107
|
{ "type": "null" }
|
|
1031
1108
|
]
|
|
1032
1109
|
},
|
|
1110
|
+
"useAsConstAssertion": {
|
|
1111
|
+
"description": "Enforce the use of as const over literal type and type annotation.",
|
|
1112
|
+
"anyOf": [
|
|
1113
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1114
|
+
{ "type": "null" }
|
|
1115
|
+
]
|
|
1116
|
+
},
|
|
1033
1117
|
"useCollapsedElseIf": {
|
|
1034
1118
|
"description": "Enforce using else if instead of nested if in else clauses.",
|
|
1035
1119
|
"anyOf": [
|
|
@@ -1071,6 +1155,13 @@
|
|
|
1071
1155
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1072
1156
|
{ "type": "null" }
|
|
1073
1157
|
]
|
|
1158
|
+
},
|
|
1159
|
+
"useShorthandAssign": {
|
|
1160
|
+
"description": "Require assignment operator shorthand where possible.",
|
|
1161
|
+
"anyOf": [
|
|
1162
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1163
|
+
{ "type": "null" }
|
|
1164
|
+
]
|
|
1074
1165
|
}
|
|
1075
1166
|
}
|
|
1076
1167
|
},
|
|
@@ -1085,6 +1176,10 @@
|
|
|
1085
1176
|
"ignore": {
|
|
1086
1177
|
"description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.",
|
|
1087
1178
|
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
1179
|
+
},
|
|
1180
|
+
"include": {
|
|
1181
|
+
"description": "A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.",
|
|
1182
|
+
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
1088
1183
|
}
|
|
1089
1184
|
},
|
|
1090
1185
|
"additionalProperties": false
|
|
@@ -1291,7 +1386,7 @@
|
|
|
1291
1386
|
]
|
|
1292
1387
|
},
|
|
1293
1388
|
"noNegationElse": {
|
|
1294
|
-
"description": "Disallow negation in the condition of an if statement if it has an else clause",
|
|
1389
|
+
"description": "Disallow negation in the condition of an if statement if it has an else clause.",
|
|
1295
1390
|
"anyOf": [
|
|
1296
1391
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1297
1392
|
{ "type": "null" }
|
|
@@ -1351,7 +1446,7 @@
|
|
|
1351
1446
|
"type": ["boolean", "null"]
|
|
1352
1447
|
},
|
|
1353
1448
|
"useBlockStatements": {
|
|
1354
|
-
"description": "Requires following curly brace conventions.
|
|
1449
|
+
"description": "Requires following curly brace conventions.",
|
|
1355
1450
|
"anyOf": [
|
|
1356
1451
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1357
1452
|
{ "type": "null" }
|
|
@@ -1449,7 +1544,7 @@
|
|
|
1449
1544
|
]
|
|
1450
1545
|
},
|
|
1451
1546
|
"useWhile": {
|
|
1452
|
-
"description": "Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed",
|
|
1547
|
+
"description": "Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed.",
|
|
1453
1548
|
"anyOf": [
|
|
1454
1549
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1455
1550
|
{ "type": "null" }
|
|
@@ -1557,7 +1652,7 @@
|
|
|
1557
1652
|
]
|
|
1558
1653
|
},
|
|
1559
1654
|
"noDuplicateCase": {
|
|
1560
|
-
"description": "Disallow duplicate case labels.
|
|
1655
|
+
"description": "Disallow duplicate case labels.",
|
|
1561
1656
|
"anyOf": [
|
|
1562
1657
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1563
1658
|
{ "type": "null" }
|
|
@@ -1578,7 +1673,7 @@
|
|
|
1578
1673
|
]
|
|
1579
1674
|
},
|
|
1580
1675
|
"noDuplicateObjectKeys": {
|
|
1581
|
-
"description": "Prevents object literals having more than one property declaration for the same name.
|
|
1676
|
+
"description": "Prevents object literals having more than one property declaration for the same name.",
|
|
1582
1677
|
"anyOf": [
|
|
1583
1678
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1584
1679
|
{ "type": "null" }
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@biomejs/biome","version":"1.2.
|
|
1
|
+
{"name":"@biomejs/biome","version":"1.2.2-nightly.1e3fc94","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","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"],"keywords":["JavaScript","TypeScript","format","lint","toolchain","JSON"],"engines":{"node":">=14.*"},"optionalDependencies":{"@biomejs/cli-win32-x64":"1.2.2-nightly.1e3fc94","@biomejs/cli-win32-arm64":"1.2.2-nightly.1e3fc94","@biomejs/cli-darwin-x64":"1.2.2-nightly.1e3fc94","@biomejs/cli-darwin-arm64":"1.2.2-nightly.1e3fc94","@biomejs/cli-linux-x64":"1.2.2-nightly.1e3fc94","@biomejs/cli-linux-arm64":"1.2.2-nightly.1e3fc94"}}
|