@biomejs/biome 1.2.1 → 1.2.2-nightly.ee2e2ab
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 +113 -11
- 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,41 @@
|
|
|
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
|
+
"noMisrefactoredShorthandAssign": {
|
|
1079
|
+
"description": "Disallow shorthand assign when variable appears on both sides.",
|
|
1080
|
+
"anyOf": [
|
|
1081
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1082
|
+
{ "type": "null" }
|
|
1083
|
+
]
|
|
1084
|
+
},
|
|
1085
|
+
"noUnusedImports": {
|
|
1086
|
+
"description": "Disallow unused imports.",
|
|
1087
|
+
"anyOf": [
|
|
1088
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1089
|
+
{ "type": "null" }
|
|
1090
|
+
]
|
|
1091
|
+
},
|
|
1092
|
+
"noUselessElse": {
|
|
1093
|
+
"description": "Disallow else block when the if block breaks early.",
|
|
1094
|
+
"anyOf": [
|
|
1095
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1096
|
+
{ "type": "null" }
|
|
1097
|
+
]
|
|
1098
|
+
},
|
|
1015
1099
|
"noVoid": {
|
|
1016
1100
|
"description": "Disallow the use of void operators, which is not a familiar operator.",
|
|
1017
1101
|
"anyOf": [
|
|
@@ -1030,6 +1114,13 @@
|
|
|
1030
1114
|
{ "type": "null" }
|
|
1031
1115
|
]
|
|
1032
1116
|
},
|
|
1117
|
+
"useAsConstAssertion": {
|
|
1118
|
+
"description": "Enforce the use of as const over literal type and type annotation.",
|
|
1119
|
+
"anyOf": [
|
|
1120
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1121
|
+
{ "type": "null" }
|
|
1122
|
+
]
|
|
1123
|
+
},
|
|
1033
1124
|
"useCollapsedElseIf": {
|
|
1034
1125
|
"description": "Enforce using else if instead of nested if in else clauses.",
|
|
1035
1126
|
"anyOf": [
|
|
@@ -1038,7 +1129,7 @@
|
|
|
1038
1129
|
]
|
|
1039
1130
|
},
|
|
1040
1131
|
"useExhaustiveDependencies": {
|
|
1041
|
-
"description": "Enforce all dependencies are correctly specified.",
|
|
1132
|
+
"description": "Enforce all dependencies are correctly specified in a React hook.",
|
|
1042
1133
|
"anyOf": [
|
|
1043
1134
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1044
1135
|
{ "type": "null" }
|
|
@@ -1071,6 +1162,13 @@
|
|
|
1071
1162
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1072
1163
|
{ "type": "null" }
|
|
1073
1164
|
]
|
|
1165
|
+
},
|
|
1166
|
+
"useShorthandAssign": {
|
|
1167
|
+
"description": "Require assignment operator shorthand where possible.",
|
|
1168
|
+
"anyOf": [
|
|
1169
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1170
|
+
{ "type": "null" }
|
|
1171
|
+
]
|
|
1074
1172
|
}
|
|
1075
1173
|
}
|
|
1076
1174
|
},
|
|
@@ -1085,6 +1183,10 @@
|
|
|
1085
1183
|
"ignore": {
|
|
1086
1184
|
"description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.",
|
|
1087
1185
|
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
1186
|
+
},
|
|
1187
|
+
"include": {
|
|
1188
|
+
"description": "A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.",
|
|
1189
|
+
"anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
|
|
1088
1190
|
}
|
|
1089
1191
|
},
|
|
1090
1192
|
"additionalProperties": false
|
|
@@ -1291,7 +1393,7 @@
|
|
|
1291
1393
|
]
|
|
1292
1394
|
},
|
|
1293
1395
|
"noNegationElse": {
|
|
1294
|
-
"description": "Disallow negation in the condition of an if statement if it has an else clause",
|
|
1396
|
+
"description": "Disallow negation in the condition of an if statement if it has an else clause.",
|
|
1295
1397
|
"anyOf": [
|
|
1296
1398
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1297
1399
|
{ "type": "null" }
|
|
@@ -1351,7 +1453,7 @@
|
|
|
1351
1453
|
"type": ["boolean", "null"]
|
|
1352
1454
|
},
|
|
1353
1455
|
"useBlockStatements": {
|
|
1354
|
-
"description": "Requires following curly brace conventions.
|
|
1456
|
+
"description": "Requires following curly brace conventions.",
|
|
1355
1457
|
"anyOf": [
|
|
1356
1458
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1357
1459
|
{ "type": "null" }
|
|
@@ -1449,7 +1551,7 @@
|
|
|
1449
1551
|
]
|
|
1450
1552
|
},
|
|
1451
1553
|
"useWhile": {
|
|
1452
|
-
"description": "Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed",
|
|
1554
|
+
"description": "Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed.",
|
|
1453
1555
|
"anyOf": [
|
|
1454
1556
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1455
1557
|
{ "type": "null" }
|
|
@@ -1557,7 +1659,7 @@
|
|
|
1557
1659
|
]
|
|
1558
1660
|
},
|
|
1559
1661
|
"noDuplicateCase": {
|
|
1560
|
-
"description": "Disallow duplicate case labels.
|
|
1662
|
+
"description": "Disallow duplicate case labels.",
|
|
1561
1663
|
"anyOf": [
|
|
1562
1664
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1563
1665
|
{ "type": "null" }
|
|
@@ -1578,7 +1680,7 @@
|
|
|
1578
1680
|
]
|
|
1579
1681
|
},
|
|
1580
1682
|
"noDuplicateObjectKeys": {
|
|
1581
|
-
"description": "Prevents object literals having more than one property declaration for the same name.
|
|
1683
|
+
"description": "Prevents object literals having more than one property declaration for the same name.",
|
|
1582
1684
|
"anyOf": [
|
|
1583
1685
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1584
1686
|
{ "type": "null" }
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@biomejs/biome","version":"1.2.
|
|
1
|
+
{"name":"@biomejs/biome","version":"1.2.2-nightly.ee2e2ab","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.ee2e2ab","@biomejs/cli-win32-arm64":"1.2.2-nightly.ee2e2ab","@biomejs/cli-darwin-x64":"1.2.2-nightly.ee2e2ab","@biomejs/cli-darwin-arm64":"1.2.2-nightly.ee2e2ab","@biomejs/cli-linux-x64":"1.2.2-nightly.ee2e2ab","@biomejs/cli-linux-arm64":"1.2.2-nightly.ee2e2ab"}}
|