@biomejs/biome 1.2.0 → 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 +108 -15
- 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,13 +825,18 @@
|
|
|
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" }]
|
|
816
837
|
},
|
|
817
838
|
"lineWidth": {
|
|
818
839
|
"description": "What's the max width of a line, applied to JavaScript (and its super languages) files. Defaults to 80.",
|
|
819
|
-
"default": 80,
|
|
820
840
|
"anyOf": [{ "$ref": "#/definitions/LineWidth" }, { "type": "null" }]
|
|
821
841
|
},
|
|
822
842
|
"quoteProperties": {
|
|
@@ -884,22 +904,27 @@
|
|
|
884
904
|
"description": "Control the formatter for JSON (and its super languages) files.",
|
|
885
905
|
"type": ["boolean", "null"]
|
|
886
906
|
},
|
|
887
|
-
"
|
|
907
|
+
"indentSize": {
|
|
888
908
|
"description": "The size of the indentation applied to JSON (and its super languages) files. Default to 2.",
|
|
889
909
|
"type": ["integer", "null"],
|
|
890
910
|
"format": "uint8",
|
|
891
911
|
"minimum": 0.0
|
|
892
912
|
},
|
|
893
|
-
"
|
|
913
|
+
"indentStyle": {
|
|
894
914
|
"description": "The indent style applied to JSON (and its super languages) files.",
|
|
895
915
|
"anyOf": [
|
|
896
916
|
{ "$ref": "#/definitions/PlainIndentStyle" },
|
|
897
917
|
{ "type": "null" }
|
|
898
918
|
]
|
|
899
919
|
},
|
|
900
|
-
"
|
|
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
|
+
},
|
|
926
|
+
"lineWidth": {
|
|
901
927
|
"description": "What's the max width of a line, applied to JSON (and its super languages) files. Defaults to 80.",
|
|
902
|
-
"default": 80,
|
|
903
928
|
"anyOf": [{ "$ref": "#/definitions/LineWidth" }, { "type": "null" }]
|
|
904
929
|
}
|
|
905
930
|
},
|
|
@@ -912,6 +937,10 @@
|
|
|
912
937
|
"allowComments": {
|
|
913
938
|
"description": "Allow parsing comments in `.json` files",
|
|
914
939
|
"type": ["boolean", "null"]
|
|
940
|
+
},
|
|
941
|
+
"allowTrailingCommas": {
|
|
942
|
+
"description": "Allow parsing trailing commas in `.json` files",
|
|
943
|
+
"type": ["boolean", "null"]
|
|
915
944
|
}
|
|
916
945
|
},
|
|
917
946
|
"additionalProperties": false
|
|
@@ -934,6 +963,10 @@
|
|
|
934
963
|
"description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.",
|
|
935
964
|
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
936
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
|
+
},
|
|
937
970
|
"rules": {
|
|
938
971
|
"description": "List of rules",
|
|
939
972
|
"default": { "recommended": true },
|
|
@@ -972,6 +1005,13 @@
|
|
|
972
1005
|
{ "type": "null" }
|
|
973
1006
|
]
|
|
974
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
|
+
},
|
|
975
1015
|
"noConfusingVoidType": {
|
|
976
1016
|
"description": "Disallow void type outside of generic or return types.",
|
|
977
1017
|
"anyOf": [
|
|
@@ -986,8 +1026,15 @@
|
|
|
986
1026
|
{ "type": "null" }
|
|
987
1027
|
]
|
|
988
1028
|
},
|
|
1029
|
+
"noEmptyCharacterClassInRegex": {
|
|
1030
|
+
"description": "Disallow empty character classes in regular expression literals.",
|
|
1031
|
+
"anyOf": [
|
|
1032
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1033
|
+
{ "type": "null" }
|
|
1034
|
+
]
|
|
1035
|
+
},
|
|
989
1036
|
"noExcessiveComplexity": {
|
|
990
|
-
"description": "Disallow functions that exceed a given
|
|
1037
|
+
"description": "Disallow functions that exceed a given Cognitive Complexity score.",
|
|
991
1038
|
"anyOf": [
|
|
992
1039
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
993
1040
|
{ "type": "null" }
|
|
@@ -1014,6 +1061,34 @@
|
|
|
1014
1061
|
{ "type": "null" }
|
|
1015
1062
|
]
|
|
1016
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
|
+
},
|
|
1017
1092
|
"noVoid": {
|
|
1018
1093
|
"description": "Disallow the use of void operators, which is not a familiar operator.",
|
|
1019
1094
|
"anyOf": [
|
|
@@ -1032,6 +1107,13 @@
|
|
|
1032
1107
|
{ "type": "null" }
|
|
1033
1108
|
]
|
|
1034
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
|
+
},
|
|
1035
1117
|
"useCollapsedElseIf": {
|
|
1036
1118
|
"description": "Enforce using else if instead of nested if in else clauses.",
|
|
1037
1119
|
"anyOf": [
|
|
@@ -1073,6 +1155,13 @@
|
|
|
1073
1155
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1074
1156
|
{ "type": "null" }
|
|
1075
1157
|
]
|
|
1158
|
+
},
|
|
1159
|
+
"useShorthandAssign": {
|
|
1160
|
+
"description": "Require assignment operator shorthand where possible.",
|
|
1161
|
+
"anyOf": [
|
|
1162
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1163
|
+
{ "type": "null" }
|
|
1164
|
+
]
|
|
1076
1165
|
}
|
|
1077
1166
|
}
|
|
1078
1167
|
},
|
|
@@ -1087,6 +1176,10 @@
|
|
|
1087
1176
|
"ignore": {
|
|
1088
1177
|
"description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.",
|
|
1089
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" }]
|
|
1090
1183
|
}
|
|
1091
1184
|
},
|
|
1092
1185
|
"additionalProperties": false
|
|
@@ -1293,7 +1386,7 @@
|
|
|
1293
1386
|
]
|
|
1294
1387
|
},
|
|
1295
1388
|
"noNegationElse": {
|
|
1296
|
-
"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.",
|
|
1297
1390
|
"anyOf": [
|
|
1298
1391
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1299
1392
|
{ "type": "null" }
|
|
@@ -1353,7 +1446,7 @@
|
|
|
1353
1446
|
"type": ["boolean", "null"]
|
|
1354
1447
|
},
|
|
1355
1448
|
"useBlockStatements": {
|
|
1356
|
-
"description": "Requires following curly brace conventions.
|
|
1449
|
+
"description": "Requires following curly brace conventions.",
|
|
1357
1450
|
"anyOf": [
|
|
1358
1451
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1359
1452
|
{ "type": "null" }
|
|
@@ -1451,7 +1544,7 @@
|
|
|
1451
1544
|
]
|
|
1452
1545
|
},
|
|
1453
1546
|
"useWhile": {
|
|
1454
|
-
"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.",
|
|
1455
1548
|
"anyOf": [
|
|
1456
1549
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1457
1550
|
{ "type": "null" }
|
|
@@ -1559,7 +1652,7 @@
|
|
|
1559
1652
|
]
|
|
1560
1653
|
},
|
|
1561
1654
|
"noDuplicateCase": {
|
|
1562
|
-
"description": "Disallow duplicate case labels.
|
|
1655
|
+
"description": "Disallow duplicate case labels.",
|
|
1563
1656
|
"anyOf": [
|
|
1564
1657
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1565
1658
|
{ "type": "null" }
|
|
@@ -1580,7 +1673,7 @@
|
|
|
1580
1673
|
]
|
|
1581
1674
|
},
|
|
1582
1675
|
"noDuplicateObjectKeys": {
|
|
1583
|
-
"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.",
|
|
1584
1677
|
"anyOf": [
|
|
1585
1678
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1586
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"}}
|