@biomejs/biome 1.1.2 → 1.2.1

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,31 @@
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
+ "anyOf": [{ "$ref": "#/definitions/LineWidth" }, { "type": "null" }]
820
+ },
723
821
  "quoteProperties": {
724
822
  "description": "When properties in objects are quoted. Defaults to asNeeded.",
725
823
  "anyOf": [
@@ -764,6 +862,13 @@
764
862
  "description": "Options applied to JSON files",
765
863
  "type": "object",
766
864
  "properties": {
865
+ "formatter": {
866
+ "description": "Formatting options",
867
+ "anyOf": [
868
+ { "$ref": "#/definitions/JsonFormatter" },
869
+ { "type": "null" }
870
+ ]
871
+ },
767
872
  "parser": {
768
873
  "description": "Parsing options",
769
874
  "anyOf": [{ "$ref": "#/definitions/JsonParser" }, { "type": "null" }]
@@ -771,6 +876,33 @@
771
876
  },
772
877
  "additionalProperties": false
773
878
  },
879
+ "JsonFormatter": {
880
+ "type": "object",
881
+ "properties": {
882
+ "enabled": {
883
+ "description": "Control the formatter for JSON (and its super languages) files.",
884
+ "type": ["boolean", "null"]
885
+ },
886
+ "indentSize": {
887
+ "description": "The size of the indentation applied to JSON (and its super languages) files. Default to 2.",
888
+ "type": ["integer", "null"],
889
+ "format": "uint8",
890
+ "minimum": 0.0
891
+ },
892
+ "indentStyle": {
893
+ "description": "The indent style applied to JSON (and its super languages) files.",
894
+ "anyOf": [
895
+ { "$ref": "#/definitions/PlainIndentStyle" },
896
+ { "type": "null" }
897
+ ]
898
+ },
899
+ "lineWidth": {
900
+ "description": "What's the max width of a line, applied to JSON (and its super languages) files. Defaults to 80.",
901
+ "anyOf": [{ "$ref": "#/definitions/LineWidth" }, { "type": "null" }]
902
+ }
903
+ },
904
+ "additionalProperties": false
905
+ },
774
906
  "JsonParser": {
775
907
  "description": "Options that changes how the JSON parser behaves",
776
908
  "type": "object",
@@ -838,36 +970,8 @@
838
970
  { "type": "null" }
839
971
  ]
840
972
  },
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.",
973
+ "noConfusingVoidType": {
974
+ "description": "Disallow void type outside of generic or return types.",
871
975
  "anyOf": [
872
976
  { "$ref": "#/definitions/RuleConfiguration" },
873
977
  { "type": "null" }
@@ -908,62 +1012,6 @@
908
1012
  { "type": "null" }
909
1013
  ]
910
1014
  },
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
1015
  "noVoid": {
968
1016
  "description": "Disallow the use of void operators, which is not a familiar operator.",
969
1017
  "anyOf": [
@@ -975,13 +1023,6 @@
975
1023
  "description": "It enables the recommended rules for this group",
976
1024
  "type": ["boolean", "null"]
977
1025
  },
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
1026
  "useArrowFunction": {
986
1027
  "description": "Use arrow functions over function expressions.",
987
1028
  "anyOf": [
@@ -1003,13 +1044,6 @@
1003
1044
  { "type": "null" }
1004
1045
  ]
1005
1046
  },
1006
- "useGetterReturn": {
1007
- "description": "Enforce get methods to always return a value.",
1008
- "anyOf": [
1009
- { "$ref": "#/definitions/RuleConfiguration" },
1010
- { "type": "null" }
1011
- ]
1012
- },
1013
1047
  "useGroupedTypeImport": {
1014
1048
  "description": "Enforce the use of import type when an import only has specifiers with type qualifier.",
1015
1049
  "anyOf": [
@@ -1037,20 +1071,6 @@
1037
1071
  { "$ref": "#/definitions/RuleConfiguration" },
1038
1072
  { "type": "null" }
1039
1073
  ]
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
1074
  }
1055
1075
  }
1056
1076
  },
@@ -1372,6 +1392,20 @@
1372
1392
  { "type": "null" }
1373
1393
  ]
1374
1394
  },
1395
+ "useLiteralEnumMembers": {
1396
+ "description": "Require all enum members to be literal values.",
1397
+ "anyOf": [
1398
+ { "$ref": "#/definitions/RuleConfiguration" },
1399
+ { "type": "null" }
1400
+ ]
1401
+ },
1402
+ "useNamingConvention": {
1403
+ "description": "Enforce naming conventions for everything across a codebase.",
1404
+ "anyOf": [
1405
+ { "$ref": "#/definitions/RuleConfiguration" },
1406
+ { "type": "null" }
1407
+ ]
1408
+ },
1375
1409
  "useNumericLiterals": {
1376
1410
  "description": "Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals",
1377
1411
  "anyOf": [
@@ -1501,6 +1535,13 @@
1501
1535
  { "type": "null" }
1502
1536
  ]
1503
1537
  },
1538
+ "noControlCharactersInRegex": {
1539
+ "description": "Prevents from having control characters and some escape sequences that match control characters in regular expressions.",
1540
+ "anyOf": [
1541
+ { "$ref": "#/definitions/RuleConfiguration" },
1542
+ { "type": "null" }
1543
+ ]
1544
+ },
1504
1545
  "noDebugger": {
1505
1546
  "description": "Disallow the use of debugger",
1506
1547
  "anyOf": [
@@ -1634,6 +1675,13 @@
1634
1675
  { "type": "null" }
1635
1676
  ]
1636
1677
  },
1678
+ "noUnsafeDeclarationMerging": {
1679
+ "description": "Disallow unsafe declaration merging between interfaces and classes.",
1680
+ "anyOf": [
1681
+ { "$ref": "#/definitions/RuleConfiguration" },
1682
+ { "type": "null" }
1683
+ ]
1684
+ },
1637
1685
  "noUnsafeNegation": {
1638
1686
  "description": "Disallow using unsafe negation.",
1639
1687
  "anyOf": [
@@ -1652,6 +1700,13 @@
1652
1700
  { "type": "null" }
1653
1701
  ]
1654
1702
  },
1703
+ "useGetterReturn": {
1704
+ "description": "Enforce get methods to always return a value.",
1705
+ "anyOf": [
1706
+ { "$ref": "#/definitions/RuleConfiguration" },
1707
+ { "type": "null" }
1708
+ ]
1709
+ },
1655
1710
  "useNamespaceKeyword": {
1656
1711
  "description": "Require using the namespace keyword over the module keyword to declare TypeScript namespaces.",
1657
1712
  "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.1","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.1","@biomejs/cli-win32-arm64":"1.2.1","@biomejs/cli-darwin-x64":"1.2.1","@biomejs/cli-darwin-arm64":"1.2.1","@biomejs/cli-linux-x64":"1.2.1","@biomejs/cli-linux-arm64":"1.2.1"}}
@@ -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
  }