@biomejs/biome 1.1.2 → 1.2.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.
@@ -76,6 +76,13 @@
76
76
  { "type": "null" }
77
77
  ]
78
78
  },
79
+ "noAriaUnsupportedElements": {
80
+ "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.",
81
+ "anyOf": [
82
+ { "$ref": "#/definitions/RuleConfiguration" },
83
+ { "type": "null" }
84
+ ]
85
+ },
79
86
  "noAutofocus": {
80
87
  "description": "Enforce that autoFocus prop is not used on elements.",
81
88
  "anyOf": [
@@ -111,6 +118,13 @@
111
118
  { "type": "null" }
112
119
  ]
113
120
  },
121
+ "noNoninteractiveTabindex": {
122
+ "description": "Enforce that tabIndex is not assigned to non-interactive HTML elements.",
123
+ "anyOf": [
124
+ { "$ref": "#/definitions/RuleConfiguration" },
125
+ { "type": "null" }
126
+ ]
127
+ },
114
128
  "noPositiveTabindex": {
115
129
  "description": "Prevent the usage of positive integers on tabIndex property",
116
130
  "anyOf": [
@@ -125,6 +139,13 @@
125
139
  { "type": "null" }
126
140
  ]
127
141
  },
142
+ "noRedundantRoles": {
143
+ "description": "Enforce explicit role property is not the same as implicit/default role property on an element.",
144
+ "anyOf": [
145
+ { "$ref": "#/definitions/RuleConfiguration" },
146
+ { "type": "null" }
147
+ ]
148
+ },
128
149
  "noSvgWithoutTitle": {
129
150
  "description": "Enforces the usage of the title element for the svg element.",
130
151
  "anyOf": [
@@ -220,6 +241,13 @@
220
241
  { "type": "null" }
221
242
  ]
222
243
  },
244
+ "useValidAriaValues": {
245
+ "description": "Enforce that ARIA state and property values are valid.",
246
+ "anyOf": [
247
+ { "$ref": "#/definitions/RuleConfiguration" },
248
+ { "type": "null" }
249
+ ]
250
+ },
223
251
  "useValidLang": {
224
252
  "description": "Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.",
225
253
  "anyOf": [
@@ -238,6 +266,13 @@
238
266
  "description": "It enables ALL rules for this group.",
239
267
  "type": ["boolean", "null"]
240
268
  },
269
+ "noBannedTypes": {
270
+ "description": "Disallow primitive type aliases and misleading types.",
271
+ "anyOf": [
272
+ { "$ref": "#/definitions/RuleConfiguration" },
273
+ { "type": "null" }
274
+ ]
275
+ },
241
276
  "noExtraBooleanCast": {
242
277
  "description": "Disallow unnecessary boolean casts",
243
278
  "anyOf": [
@@ -259,6 +294,13 @@
259
294
  { "type": "null" }
260
295
  ]
261
296
  },
297
+ "noStaticOnlyClass": {
298
+ "description": "This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.",
299
+ "anyOf": [
300
+ { "$ref": "#/definitions/RuleConfiguration" },
301
+ { "type": "null" }
302
+ ]
303
+ },
262
304
  "noUselessCatch": {
263
305
  "description": "Disallow unnecessary catch clauses.",
264
306
  "anyOf": [
@@ -273,6 +315,13 @@
273
315
  { "type": "null" }
274
316
  ]
275
317
  },
318
+ "noUselessEmptyExport": {
319
+ "description": "Disallow empty exports that don't change anything in a module file.",
320
+ "anyOf": [
321
+ { "$ref": "#/definitions/RuleConfiguration" },
322
+ { "type": "null" }
323
+ ]
324
+ },
276
325
  "noUselessFragments": {
277
326
  "description": "Disallow unnecessary fragments",
278
327
  "anyOf": [
@@ -301,6 +350,13 @@
301
350
  { "type": "null" }
302
351
  ]
303
352
  },
353
+ "noUselessThisAlias": {
354
+ "description": "Disallow useless this aliasing.",
355
+ "anyOf": [
356
+ { "$ref": "#/definitions/RuleConfiguration" },
357
+ { "type": "null" }
358
+ ]
359
+ },
304
360
  "noUselessTypeConstraint": {
305
361
  "description": "Disallow using any or unknown as type constraint.",
306
362
  "anyOf": [
@@ -392,6 +448,13 @@
392
448
  { "type": "null" }
393
449
  ]
394
450
  },
451
+ "noConstantCondition": {
452
+ "description": "Disallow constant expressions in conditions",
453
+ "anyOf": [
454
+ { "$ref": "#/definitions/RuleConfiguration" },
455
+ { "type": "null" }
456
+ ]
457
+ },
395
458
  "noConstructorReturn": {
396
459
  "description": "Disallow returning a value from a constructor.",
397
460
  "anyOf": [
@@ -434,6 +497,13 @@
434
497
  { "type": "null" }
435
498
  ]
436
499
  },
500
+ "noNonoctalDecimalEscape": {
501
+ "description": "Disallow \\8 and \\9 escape sequences in string literals.",
502
+ "anyOf": [
503
+ { "$ref": "#/definitions/RuleConfiguration" },
504
+ { "type": "null" }
505
+ ]
506
+ },
437
507
  "noPrecisionLoss": {
438
508
  "description": "Disallow literal numbers that lose precision",
439
509
  "anyOf": [
@@ -448,6 +518,13 @@
448
518
  { "type": "null" }
449
519
  ]
450
520
  },
521
+ "noSelfAssign": {
522
+ "description": "Disallow assignments where both sides are exactly the same.",
523
+ "anyOf": [
524
+ { "$ref": "#/definitions/RuleConfiguration" },
525
+ { "type": "null" }
526
+ ]
527
+ },
451
528
  "noSetterReturn": {
452
529
  "description": "Disallow returning a value from a setter",
453
530
  "anyOf": [
@@ -716,10 +793,32 @@
716
793
  { "type": "null" }
717
794
  ]
718
795
  },
796
+ "enabled": {
797
+ "description": "Control the formatter for JavaScript (and its super languages) files.",
798
+ "type": ["boolean", "null"]
799
+ },
800
+ "indentSize": {
801
+ "description": "The size of the indentation applied to JavaScript (and its super languages) files. Default to 2.",
802
+ "type": ["integer", "null"],
803
+ "format": "uint8",
804
+ "minimum": 0.0
805
+ },
806
+ "indentStyle": {
807
+ "description": "The indent style applied to JavaScript (and its super languages) files.",
808
+ "anyOf": [
809
+ { "$ref": "#/definitions/PlainIndentStyle" },
810
+ { "type": "null" }
811
+ ]
812
+ },
719
813
  "jsxQuoteStyle": {
720
814
  "description": "The type of quotes used in JSX. Defaults to double.",
721
815
  "anyOf": [{ "$ref": "#/definitions/QuoteStyle" }, { "type": "null" }]
722
816
  },
817
+ "lineWidth": {
818
+ "description": "What's the max width of a line, applied to JavaScript (and its super languages) files. Defaults to 80.",
819
+ "default": 80,
820
+ "anyOf": [{ "$ref": "#/definitions/LineWidth" }, { "type": "null" }]
821
+ },
723
822
  "quoteProperties": {
724
823
  "description": "When properties in objects are quoted. Defaults to asNeeded.",
725
824
  "anyOf": [
@@ -764,6 +863,13 @@
764
863
  "description": "Options applied to JSON files",
765
864
  "type": "object",
766
865
  "properties": {
866
+ "formatter": {
867
+ "description": "Formatting options",
868
+ "anyOf": [
869
+ { "$ref": "#/definitions/JsonFormatter" },
870
+ { "type": "null" }
871
+ ]
872
+ },
767
873
  "parser": {
768
874
  "description": "Parsing options",
769
875
  "anyOf": [{ "$ref": "#/definitions/JsonParser" }, { "type": "null" }]
@@ -771,6 +877,34 @@
771
877
  },
772
878
  "additionalProperties": false
773
879
  },
880
+ "JsonFormatter": {
881
+ "type": "object",
882
+ "properties": {
883
+ "enabled": {
884
+ "description": "Control the formatter for JSON (and its super languages) files.",
885
+ "type": ["boolean", "null"]
886
+ },
887
+ "indent_size": {
888
+ "description": "The size of the indentation applied to JSON (and its super languages) files. Default to 2.",
889
+ "type": ["integer", "null"],
890
+ "format": "uint8",
891
+ "minimum": 0.0
892
+ },
893
+ "indent_style": {
894
+ "description": "The indent style applied to JSON (and its super languages) files.",
895
+ "anyOf": [
896
+ { "$ref": "#/definitions/PlainIndentStyle" },
897
+ { "type": "null" }
898
+ ]
899
+ },
900
+ "line_width": {
901
+ "description": "What's the max width of a line, applied to JSON (and its super languages) files. Defaults to 80.",
902
+ "default": 80,
903
+ "anyOf": [{ "$ref": "#/definitions/LineWidth" }, { "type": "null" }]
904
+ }
905
+ },
906
+ "additionalProperties": false
907
+ },
774
908
  "JsonParser": {
775
909
  "description": "Options that changes how the JSON parser behaves",
776
910
  "type": "object",
@@ -838,36 +972,8 @@
838
972
  { "type": "null" }
839
973
  ]
840
974
  },
841
- "noAriaUnsupportedElements": {
842
- "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.",
843
- "anyOf": [
844
- { "$ref": "#/definitions/RuleConfiguration" },
845
- { "type": "null" }
846
- ]
847
- },
848
- "noBannedTypes": {
849
- "description": "Disallow primitive type aliases and misleading types.",
850
- "anyOf": [
851
- { "$ref": "#/definitions/RuleConfiguration" },
852
- { "type": "null" }
853
- ]
854
- },
855
- "noConfusingArrow": {
856
- "description": "Disallow arrow functions where they could be confused with comparisons.",
857
- "anyOf": [
858
- { "$ref": "#/definitions/RuleConfiguration" },
859
- { "type": "null" }
860
- ]
861
- },
862
- "noConstantCondition": {
863
- "description": "Disallow constant expressions in conditions",
864
- "anyOf": [
865
- { "$ref": "#/definitions/RuleConfiguration" },
866
- { "type": "null" }
867
- ]
868
- },
869
- "noControlCharactersInRegex": {
870
- "description": "Prevents from having control characters and some escape sequences that match control characters in regular expressions.",
975
+ "noConfusingVoidType": {
976
+ "description": "Disallow void type outside of generic or return types.",
871
977
  "anyOf": [
872
978
  { "$ref": "#/definitions/RuleConfiguration" },
873
979
  { "type": "null" }
@@ -908,62 +1014,6 @@
908
1014
  { "type": "null" }
909
1015
  ]
910
1016
  },
911
- "noNoninteractiveTabindex": {
912
- "description": "Enforce that tabIndex is not assigned to non-interactive HTML elements.",
913
- "anyOf": [
914
- { "$ref": "#/definitions/RuleConfiguration" },
915
- { "type": "null" }
916
- ]
917
- },
918
- "noNonoctalDecimalEscape": {
919
- "description": "Disallow \\8 and \\9 escape sequences in string literals.",
920
- "anyOf": [
921
- { "$ref": "#/definitions/RuleConfiguration" },
922
- { "type": "null" }
923
- ]
924
- },
925
- "noRedundantRoles": {
926
- "description": "Enforce explicit role property is not the same as implicit/default role property on an element.",
927
- "anyOf": [
928
- { "$ref": "#/definitions/RuleConfiguration" },
929
- { "type": "null" }
930
- ]
931
- },
932
- "noSelfAssign": {
933
- "description": "Disallow assignments where both sides are exactly the same.",
934
- "anyOf": [
935
- { "$ref": "#/definitions/RuleConfiguration" },
936
- { "type": "null" }
937
- ]
938
- },
939
- "noStaticOnlyClass": {
940
- "description": "This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.",
941
- "anyOf": [
942
- { "$ref": "#/definitions/RuleConfiguration" },
943
- { "type": "null" }
944
- ]
945
- },
946
- "noUnsafeDeclarationMerging": {
947
- "description": "Disallow unsafe declaration merging between interfaces and classes.",
948
- "anyOf": [
949
- { "$ref": "#/definitions/RuleConfiguration" },
950
- { "type": "null" }
951
- ]
952
- },
953
- "noUselessEmptyExport": {
954
- "description": "Disallow empty exports that don't change anything in a module file.",
955
- "anyOf": [
956
- { "$ref": "#/definitions/RuleConfiguration" },
957
- { "type": "null" }
958
- ]
959
- },
960
- "noUselessThisAlias": {
961
- "description": "Disallow useless this aliasing.",
962
- "anyOf": [
963
- { "$ref": "#/definitions/RuleConfiguration" },
964
- { "type": "null" }
965
- ]
966
- },
967
1017
  "noVoid": {
968
1018
  "description": "Disallow the use of void operators, which is not a familiar operator.",
969
1019
  "anyOf": [
@@ -975,13 +1025,6 @@
975
1025
  "description": "It enables the recommended rules for this group",
976
1026
  "type": ["boolean", "null"]
977
1027
  },
978
- "useAriaPropTypes": {
979
- "description": "Enforce that ARIA state and property values are valid.",
980
- "anyOf": [
981
- { "$ref": "#/definitions/RuleConfiguration" },
982
- { "type": "null" }
983
- ]
984
- },
985
1028
  "useArrowFunction": {
986
1029
  "description": "Use arrow functions over function expressions.",
987
1030
  "anyOf": [
@@ -1003,13 +1046,6 @@
1003
1046
  { "type": "null" }
1004
1047
  ]
1005
1048
  },
1006
- "useGetterReturn": {
1007
- "description": "Enforce get methods to always return a value.",
1008
- "anyOf": [
1009
- { "$ref": "#/definitions/RuleConfiguration" },
1010
- { "type": "null" }
1011
- ]
1012
- },
1013
1049
  "useGroupedTypeImport": {
1014
1050
  "description": "Enforce the use of import type when an import only has specifiers with type qualifier.",
1015
1051
  "anyOf": [
@@ -1037,20 +1073,6 @@
1037
1073
  { "$ref": "#/definitions/RuleConfiguration" },
1038
1074
  { "type": "null" }
1039
1075
  ]
1040
- },
1041
- "useLiteralEnumMembers": {
1042
- "description": "Require all enum members to be literal values.",
1043
- "anyOf": [
1044
- { "$ref": "#/definitions/RuleConfiguration" },
1045
- { "type": "null" }
1046
- ]
1047
- },
1048
- "useNamingConvention": {
1049
- "description": "Enforce naming conventions for everything across a codebase.",
1050
- "anyOf": [
1051
- { "$ref": "#/definitions/RuleConfiguration" },
1052
- { "type": "null" }
1053
- ]
1054
1076
  }
1055
1077
  }
1056
1078
  },
@@ -1372,6 +1394,20 @@
1372
1394
  { "type": "null" }
1373
1395
  ]
1374
1396
  },
1397
+ "useLiteralEnumMembers": {
1398
+ "description": "Require all enum members to be literal values.",
1399
+ "anyOf": [
1400
+ { "$ref": "#/definitions/RuleConfiguration" },
1401
+ { "type": "null" }
1402
+ ]
1403
+ },
1404
+ "useNamingConvention": {
1405
+ "description": "Enforce naming conventions for everything across a codebase.",
1406
+ "anyOf": [
1407
+ { "$ref": "#/definitions/RuleConfiguration" },
1408
+ { "type": "null" }
1409
+ ]
1410
+ },
1375
1411
  "useNumericLiterals": {
1376
1412
  "description": "Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals",
1377
1413
  "anyOf": [
@@ -1501,6 +1537,13 @@
1501
1537
  { "type": "null" }
1502
1538
  ]
1503
1539
  },
1540
+ "noControlCharactersInRegex": {
1541
+ "description": "Prevents from having control characters and some escape sequences that match control characters in regular expressions.",
1542
+ "anyOf": [
1543
+ { "$ref": "#/definitions/RuleConfiguration" },
1544
+ { "type": "null" }
1545
+ ]
1546
+ },
1504
1547
  "noDebugger": {
1505
1548
  "description": "Disallow the use of debugger",
1506
1549
  "anyOf": [
@@ -1634,6 +1677,13 @@
1634
1677
  { "type": "null" }
1635
1678
  ]
1636
1679
  },
1680
+ "noUnsafeDeclarationMerging": {
1681
+ "description": "Disallow unsafe declaration merging between interfaces and classes.",
1682
+ "anyOf": [
1683
+ { "$ref": "#/definitions/RuleConfiguration" },
1684
+ { "type": "null" }
1685
+ ]
1686
+ },
1637
1687
  "noUnsafeNegation": {
1638
1688
  "description": "Disallow using unsafe negation.",
1639
1689
  "anyOf": [
@@ -1652,6 +1702,13 @@
1652
1702
  { "type": "null" }
1653
1703
  ]
1654
1704
  },
1705
+ "useGetterReturn": {
1706
+ "description": "Enforce get methods to always return a value.",
1707
+ "anyOf": [
1708
+ { "$ref": "#/definitions/RuleConfiguration" },
1709
+ { "type": "null" }
1710
+ ]
1711
+ },
1655
1712
  "useNamespaceKeyword": {
1656
1713
  "description": "Require using the namespace keyword over the module keyword to declare TypeScript namespaces.",
1657
1714
  "anyOf": [
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@biomejs/biome","version":"1.1.2","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.1.2","@biomejs/cli-win32-arm64":"1.1.2","@biomejs/cli-darwin-x64":"1.1.2","@biomejs/cli-darwin-arm64":"1.1.2","@biomejs/cli-linux-x64":"1.1.2","@biomejs/cli-linux-arm64":"1.1.2"}}
1
+ {"name":"@biomejs/biome","version":"1.2.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","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.0","@biomejs/cli-win32-arm64":"1.2.0","@biomejs/cli-darwin-x64":"1.2.0","@biomejs/cli-darwin-arm64":"1.2.0","@biomejs/cli-linux-x64":"1.2.0","@biomejs/cli-linux-arm64":"1.2.0"}}
@@ -2,16 +2,16 @@ const { platform, arch } = process;
2
2
 
3
3
  const PLATFORMS = {
4
4
  win32: {
5
- x64: "@biomejs/cli-win32-x64/rome.exe",
6
- arm64: "@biomejs/cli-win32-arm64/rome.exe",
5
+ x64: "@biomejs/cli-win32-x64/biome.exe",
6
+ arm64: "@biomejs/cli-win32-arm64/biome.exe",
7
7
  },
8
8
  darwin: {
9
- x64: "@biomejs/cli-darwin-x64/rome",
10
- arm64: "@biomejs/cli-darwin-arm64/rome",
9
+ x64: "@biomejs/cli-darwin-x64/biome",
10
+ arm64: "@biomejs/cli-darwin-arm64/biome",
11
11
  },
12
12
  linux: {
13
- x64: "@biomejs/cli-linux-x64/rome",
14
- arm64: "@biomejs/cli-linux-arm64/rome",
13
+ x64: "@biomejs/cli-linux-x64/biome",
14
+ arm64: "@biomejs/cli-linux-arm64/biome",
15
15
  },
16
16
  };
17
17
 
@@ -22,13 +22,13 @@ if (binName) {
22
22
  binPath = require.resolve(binName);
23
23
  } catch {
24
24
  console.warn(
25
- `The Biome CLI postinstall script failed to resolve the binary file "${binName}". Running Biome from the npm package will probably not work correctly.`,
25
+ `The Biome CLI postinstall script failed to resolve the binary file "${binName}". Running Biome from the npm package will probably not work correctly.`
26
26
  );
27
27
  }
28
28
  } else {
29
29
  console.warn(
30
30
  "The Biome CLI package doesn't ship with prebuilt binaries for your platform yet. " +
31
31
  "You can still use the CLI by cloning the biomejs/biome repo from GitHub, " +
32
- "and follow the instructions there to build the CLI for your platform.",
32
+ "and follow the instructions there to build the CLI for your platform."
33
33
  );
34
34
  }