@biomejs/biome 1.5.3 → 1.6.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.
- package/README.ja.md +1 -1
- package/README.md +19 -1
- package/README.pt-br.md +1 -1
- package/README.zh-CN.md +1 -1
- package/configuration_schema.json +472 -149
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
**Biome は _JavaScript_, _TypeScript_, _JSX_ そして _JSON_ 向けの[高速なFormatter](./benchmark#formatting)**であり、**[_Prettier_ との互換性は97%](https://console.algora.io/challenges/prettier)** を達成しています。
|
|
39
39
|
|
|
40
|
-
**Biome は _JavaScript_, _TypeScript_, _JSX_ のための[高性能なLinter](https://github.com/biomejs/biome/tree/main/benchmark#linting)** であり、ESLint,
|
|
40
|
+
**Biome は _JavaScript_, _TypeScript_, _JSX_ のための[高性能なLinter](https://github.com/biomejs/biome/tree/main/benchmark#linting)** であり、ESLint, typescript-eslint, [その他のソース](https://github.com/biomejs/biome/discussions/3)から **[170以上のルール](https://biomejs.dev/linter/rules/)**を提供しています。Biome は**詳細で文脈に沿った結果を出力**するため、コードを改善し、より良いプログラマになるための手助けをします!
|
|
41
41
|
|
|
42
42
|
**Biome** は最初から[**エディタ内で対話的に**](https://biomejs.dev/ja/guides/integrate-in-editor/)使用できるように設計されています。
|
|
43
43
|
あなたがコードを書いているときに、形の崩れたコードを format と lint することができます。
|
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
[open-vsx-badge]: https://badgen.net/open-vsx/version/biomejs/biome?label=open-vsx&color=green
|
|
26
26
|
[open-vsx-url]: https://open-vsx.org/extension/biomejs/biome
|
|
27
27
|
|
|
28
|
+
|
|
28
29
|
</div>
|
|
29
30
|
|
|
30
31
|
<div align="center">
|
|
@@ -37,7 +38,7 @@ English | [简体中文](https://github.com/biomejs/biome/blob/main/packages/%40
|
|
|
37
38
|
|
|
38
39
|
**Biome is a [fast formatter](./benchmark#formatting)** for _JavaScript_, _TypeScript_, _JSX_, and _JSON_ that scores **[97% compatibility with _Prettier_](https://console.algora.io/challenges/prettier)**.
|
|
39
40
|
|
|
40
|
-
**Biome is a [performant linter](https://github.com/biomejs/biome/tree/main/benchmark#linting)** for _JavaScript_, _TypeScript_, and _JSX_ that features **[more than
|
|
41
|
+
**Biome is a [performant linter](https://github.com/biomejs/biome/tree/main/benchmark#linting)** for _JavaScript_, _TypeScript_, and _JSX_ that features **[more than 200 rules](https://biomejs.dev/linter/rules/)** from ESLint, typescript-eslint, and [other sources](https://github.com/biomejs/biome/discussions/3).
|
|
41
42
|
It **outputs detailed and contextualized diagnostics** that help you to improve your code and become a better programmer!
|
|
42
43
|
|
|
43
44
|
**Biome** is designed from the start to be used [interactively within an editor](https://biomejs.dev/guides/integrate-in-editor/).
|
|
@@ -88,6 +89,23 @@ Read more about our [project philosophy][biome-philosophy].
|
|
|
88
89
|
|
|
89
90
|
**Biome** is [MIT licensed](https://github.com/biomejs/biome/tree/main/LICENSE-MIT) or [Apache 2.0 licensed](https://github.com/biomejs/biome/tree/main/LICENSE-APACHE) and moderated under the [Contributor Covenant Code of Conduct](https://github.com/biomejs/biome/tree/main/CODE_OF_CONDUCT.md).
|
|
90
91
|
|
|
92
|
+
## Funding
|
|
93
|
+
|
|
94
|
+
You can fund the project in different ways
|
|
95
|
+
|
|
96
|
+
### Project sponsorship and funding
|
|
97
|
+
|
|
98
|
+
You can sponsor or fund the project via [Open collective](https://opencollective.com/biome) or [GitHub sponsors](https://github.com/sponsors/biomejs)
|
|
99
|
+
|
|
100
|
+
Biome offers a simple sponsorship program that allows companies to get visibility and recognition among various developers.
|
|
101
|
+
|
|
102
|
+
### Issue funding
|
|
103
|
+
|
|
104
|
+
We use [Polar.sh](https://polar.sh/biomejs) to up-vote and promote specific features that you would like to see and implement. Check our backlog and help us:
|
|
105
|
+
|
|
106
|
+
<a href="https://polar.sh/biomejs"><img src="https://polar.sh/embed/fund-our-backlog.svg?org=biomejs" /></a>
|
|
107
|
+
|
|
108
|
+
|
|
91
109
|
## Sponsors
|
|
92
110
|
|
|
93
111
|
### Gold Sponsors
|
package/README.pt-br.md
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
**Biome é um [formatador rápido](./benchmark#formatting)** para _JavaScript_, _TypeScript_, _JSX_, e _JSON_ que atinge **[97% de compatibilidade com o _Prettier_](https://console.algora.io/challenges/prettier)**.
|
|
39
39
|
|
|
40
|
-
**Biome é um [linter eficiente](https://github.com/biomejs/biome/tree/main/benchmark#linting)** para _JavaScript_, _TypeScript_, e _JSX_ que possui **[mais de 190 regras](https://biomejs.dev/linter/rules/)** do ESLint,
|
|
40
|
+
**Biome é um [linter eficiente](https://github.com/biomejs/biome/tree/main/benchmark#linting)** para _JavaScript_, _TypeScript_, e _JSX_ que possui **[mais de 190 regras](https://biomejs.dev/linter/rules/)** do ESLint, typescript-eslint, e de [outras fontes](https://github.com/biomejs/biome/discussions/3).
|
|
41
41
|
Ele **fornece diagnósticos detalhados e contextualizados** que ajudam você a melhorar seu código e se tornar um programador melhor!
|
|
42
42
|
|
|
43
43
|
**Biome** é projetado desde o início para ser usado [interativamente dentro de um editor](https://biomejs.dev/guides/integrate-in-editor/).
|
package/README.zh-CN.md
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
**Biome 是一个[快速的格式化工具](./benchmark#formatting)**,适用于 _JavaScript_、_TypeScript_、_JSX_、_JSON_ 等,与 _Prettier_ 的兼容性达到了 **[97%](https://console.algora.io/challenges/prettier)**。
|
|
39
39
|
|
|
40
|
-
**Biome 是一个[高性能的 Linter](https://github.com/biomejs/biome/tree/main/benchmark#linting)**,适用于 _JavaScript_、_TypeScript_、_JSX_ 等,包含了来自 ESLint、
|
|
40
|
+
**Biome 是一个[高性能的 Linter](https://github.com/biomejs/biome/tree/main/benchmark#linting)**,适用于 _JavaScript_、_TypeScript_、_JSX_ 等,包含了来自 ESLint、typescript-eslint 和[其他来源](https://github.com/biomejs/biome/discussions/3)的 **[190 余项规则](https://biomejs.dev/zh-cn/linter/rules/)**。它**输出详细且有上下文诊断信息**,能帮助你优化代码,成为一名更好的程序员!
|
|
41
41
|
|
|
42
42
|
**Biome** 从一开始就设计为[在编辑器中交互式使用](https://biomejs.dev/zh-cn/guides/integrate-in-editor/)。它可以在你编写代码时格式化并检查出不规范的代码。
|
|
43
43
|
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
"useValidAriaRole": {
|
|
277
277
|
"description": "Elements with ARIA roles must use a valid, non-abstract ARIA role.",
|
|
278
278
|
"anyOf": [
|
|
279
|
-
{ "$ref": "#/definitions/
|
|
279
|
+
{ "$ref": "#/definitions/ValidAriaRoleConfiguration" },
|
|
280
280
|
{ "type": "null" }
|
|
281
281
|
]
|
|
282
282
|
},
|
|
@@ -294,9 +294,11 @@
|
|
|
294
294
|
{ "type": "null" }
|
|
295
295
|
]
|
|
296
296
|
}
|
|
297
|
-
}
|
|
297
|
+
},
|
|
298
|
+
"additionalProperties": false
|
|
298
299
|
},
|
|
299
300
|
"ArrowParentheses": { "type": "string", "enum": ["always", "asNeeded"] },
|
|
301
|
+
"AttributePosition": { "type": "string", "enum": ["auto", "multiline"] },
|
|
300
302
|
"Complexity": {
|
|
301
303
|
"description": "A list of rules that belong to this group",
|
|
302
304
|
"type": "object",
|
|
@@ -312,10 +314,17 @@
|
|
|
312
314
|
{ "type": "null" }
|
|
313
315
|
]
|
|
314
316
|
},
|
|
317
|
+
"noEmptyTypeParameters": {
|
|
318
|
+
"description": "Disallow empty type parameters in type aliases and interfaces.",
|
|
319
|
+
"anyOf": [
|
|
320
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
321
|
+
{ "type": "null" }
|
|
322
|
+
]
|
|
323
|
+
},
|
|
315
324
|
"noExcessiveCognitiveComplexity": {
|
|
316
325
|
"description": "Disallow functions that exceed a given Cognitive Complexity score.",
|
|
317
326
|
"anyOf": [
|
|
318
|
-
{ "$ref": "#/definitions/
|
|
327
|
+
{ "$ref": "#/definitions/ComplexityConfiguration" },
|
|
319
328
|
{ "type": "null" }
|
|
320
329
|
]
|
|
321
330
|
},
|
|
@@ -389,6 +398,13 @@
|
|
|
389
398
|
{ "type": "null" }
|
|
390
399
|
]
|
|
391
400
|
},
|
|
401
|
+
"noUselessLoneBlockStatements": {
|
|
402
|
+
"description": "Disallow unnecessary nested block statements.",
|
|
403
|
+
"anyOf": [
|
|
404
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
405
|
+
{ "type": "null" }
|
|
406
|
+
]
|
|
407
|
+
},
|
|
392
408
|
"noUselessRename": {
|
|
393
409
|
"description": "Disallow renaming import, export, and destructured assignments to the same name.",
|
|
394
410
|
"anyOf": [
|
|
@@ -484,7 +500,14 @@
|
|
|
484
500
|
{ "type": "null" }
|
|
485
501
|
]
|
|
486
502
|
}
|
|
487
|
-
}
|
|
503
|
+
},
|
|
504
|
+
"additionalProperties": false
|
|
505
|
+
},
|
|
506
|
+
"ComplexityConfiguration": {
|
|
507
|
+
"anyOf": [
|
|
508
|
+
{ "$ref": "#/definitions/RulePlainConfiguration" },
|
|
509
|
+
{ "$ref": "#/definitions/RuleWithComplexityOptions" }
|
|
510
|
+
]
|
|
488
511
|
},
|
|
489
512
|
"ComplexityOptions": {
|
|
490
513
|
"description": "Options for the rule `noExcessiveCognitiveComplexity`.",
|
|
@@ -514,6 +537,12 @@
|
|
|
514
537
|
}
|
|
515
538
|
]
|
|
516
539
|
},
|
|
540
|
+
"ConsistentArrayTypeConfiguration": {
|
|
541
|
+
"anyOf": [
|
|
542
|
+
{ "$ref": "#/definitions/RulePlainConfiguration" },
|
|
543
|
+
{ "$ref": "#/definitions/RuleWithConsistentArrayTypeOptions" }
|
|
544
|
+
]
|
|
545
|
+
},
|
|
517
546
|
"ConsistentArrayTypeOptions": {
|
|
518
547
|
"type": "object",
|
|
519
548
|
"required": ["syntax"],
|
|
@@ -600,6 +629,13 @@
|
|
|
600
629
|
{ "type": "null" }
|
|
601
630
|
]
|
|
602
631
|
},
|
|
632
|
+
"noInvalidUseBeforeDeclaration": {
|
|
633
|
+
"description": "Disallow the use of variables and function parameters before their declaration",
|
|
634
|
+
"anyOf": [
|
|
635
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
636
|
+
{ "type": "null" }
|
|
637
|
+
]
|
|
638
|
+
},
|
|
603
639
|
"noNewSymbol": {
|
|
604
640
|
"description": "Disallow new operators with the Symbol object.",
|
|
605
641
|
"anyOf": [
|
|
@@ -698,6 +734,13 @@
|
|
|
698
734
|
{ "type": "null" }
|
|
699
735
|
]
|
|
700
736
|
},
|
|
737
|
+
"noUnusedImports": {
|
|
738
|
+
"description": "Disallow unused imports.",
|
|
739
|
+
"anyOf": [
|
|
740
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
741
|
+
{ "type": "null" }
|
|
742
|
+
]
|
|
743
|
+
},
|
|
701
744
|
"noUnusedLabels": {
|
|
702
745
|
"description": "Disallow unused labels.",
|
|
703
746
|
"anyOf": [
|
|
@@ -705,6 +748,13 @@
|
|
|
705
748
|
{ "type": "null" }
|
|
706
749
|
]
|
|
707
750
|
},
|
|
751
|
+
"noUnusedPrivateClassMembers": {
|
|
752
|
+
"description": "Disallow unused private class members",
|
|
753
|
+
"anyOf": [
|
|
754
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
755
|
+
{ "type": "null" }
|
|
756
|
+
]
|
|
757
|
+
},
|
|
708
758
|
"noUnusedVariables": {
|
|
709
759
|
"description": "Disallow unused variables.",
|
|
710
760
|
"anyOf": [
|
|
@@ -733,14 +783,14 @@
|
|
|
733
783
|
"useExhaustiveDependencies": {
|
|
734
784
|
"description": "Enforce all dependencies are correctly specified in a React hook.",
|
|
735
785
|
"anyOf": [
|
|
736
|
-
{ "$ref": "#/definitions/
|
|
786
|
+
{ "$ref": "#/definitions/HooksConfiguration" },
|
|
737
787
|
{ "type": "null" }
|
|
738
788
|
]
|
|
739
789
|
},
|
|
740
790
|
"useHookAtTopLevel": {
|
|
741
791
|
"description": "Enforce that all React hooks are being called from the Top Level component functions.",
|
|
742
792
|
"anyOf": [
|
|
743
|
-
{ "$ref": "#/definitions/
|
|
793
|
+
{ "$ref": "#/definitions/DeprecatedHooksConfiguration" },
|
|
744
794
|
{ "type": "null" }
|
|
745
795
|
]
|
|
746
796
|
},
|
|
@@ -765,7 +815,8 @@
|
|
|
765
815
|
{ "type": "null" }
|
|
766
816
|
]
|
|
767
817
|
}
|
|
768
|
-
}
|
|
818
|
+
},
|
|
819
|
+
"additionalProperties": false
|
|
769
820
|
},
|
|
770
821
|
"CssConfiguration": {
|
|
771
822
|
"description": "Options applied to CSS files",
|
|
@@ -836,6 +887,12 @@
|
|
|
836
887
|
},
|
|
837
888
|
"additionalProperties": false
|
|
838
889
|
},
|
|
890
|
+
"DeprecatedHooksConfiguration": {
|
|
891
|
+
"anyOf": [
|
|
892
|
+
{ "$ref": "#/definitions/RulePlainConfiguration" },
|
|
893
|
+
{ "$ref": "#/definitions/RuleWithDeprecatedHooksOptions" }
|
|
894
|
+
]
|
|
895
|
+
},
|
|
839
896
|
"DeprecatedHooksOptions": {
|
|
840
897
|
"description": "Options for the `useHookAtTopLevel` rule have been deprecated, since we now use the React hook naming convention to determine whether a function is a hook.",
|
|
841
898
|
"type": "object",
|
|
@@ -888,6 +945,12 @@
|
|
|
888
945
|
"items": { "$ref": "#/definitions/FilenameCase" },
|
|
889
946
|
"uniqueItems": true
|
|
890
947
|
},
|
|
948
|
+
"FilenamingConventionConfiguration": {
|
|
949
|
+
"anyOf": [
|
|
950
|
+
{ "$ref": "#/definitions/RulePlainConfiguration" },
|
|
951
|
+
{ "$ref": "#/definitions/RuleWithFilenamingConventionOptions" }
|
|
952
|
+
]
|
|
953
|
+
},
|
|
891
954
|
"FilenamingConventionOptions": {
|
|
892
955
|
"description": "Rule's options.",
|
|
893
956
|
"type": "object",
|
|
@@ -896,6 +959,10 @@
|
|
|
896
959
|
"description": "Allowed cases for _TypeScript_ `enum` member names.",
|
|
897
960
|
"allOf": [{ "$ref": "#/definitions/FilenameCases" }]
|
|
898
961
|
},
|
|
962
|
+
"requireAscii": {
|
|
963
|
+
"description": "If `false`, then non-ASCII characters are allowed.",
|
|
964
|
+
"type": "boolean"
|
|
965
|
+
},
|
|
899
966
|
"strictCase": {
|
|
900
967
|
"description": "If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].",
|
|
901
968
|
"type": "boolean"
|
|
@@ -921,7 +988,6 @@
|
|
|
921
988
|
},
|
|
922
989
|
"maxSize": {
|
|
923
990
|
"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",
|
|
924
|
-
"default": null,
|
|
925
991
|
"type": ["integer", "null"],
|
|
926
992
|
"format": "uint64",
|
|
927
993
|
"minimum": 1.0
|
|
@@ -933,10 +999,16 @@
|
|
|
933
999
|
"description": "Generic options applied to all files",
|
|
934
1000
|
"type": "object",
|
|
935
1001
|
"properties": {
|
|
936
|
-
"
|
|
1002
|
+
"attributePosition": {
|
|
1003
|
+
"description": "The attribute position style. By default auto.",
|
|
1004
|
+
"anyOf": [
|
|
1005
|
+
{ "$ref": "#/definitions/AttributePosition" },
|
|
1006
|
+
{ "type": "null" }
|
|
1007
|
+
]
|
|
1008
|
+
},
|
|
1009
|
+
"enabled": { "type": ["boolean", "null"] },
|
|
937
1010
|
"formatWithErrors": {
|
|
938
1011
|
"description": "Stores whether formatting should be allowed to proceed if a given file has syntax errors",
|
|
939
|
-
"default": false,
|
|
940
1012
|
"type": ["boolean", "null"]
|
|
941
1013
|
},
|
|
942
1014
|
"ignore": {
|
|
@@ -949,14 +1021,12 @@
|
|
|
949
1021
|
},
|
|
950
1022
|
"indentSize": {
|
|
951
1023
|
"description": "The size of the indentation, 2 by default (deprecated, use `indent-width`)",
|
|
952
|
-
"default": 2,
|
|
953
1024
|
"type": ["integer", "null"],
|
|
954
1025
|
"format": "uint8",
|
|
955
1026
|
"minimum": 0.0
|
|
956
1027
|
},
|
|
957
1028
|
"indentStyle": {
|
|
958
1029
|
"description": "The indent style.",
|
|
959
|
-
"default": "tab",
|
|
960
1030
|
"anyOf": [
|
|
961
1031
|
{ "$ref": "#/definitions/PlainIndentStyle" },
|
|
962
1032
|
{ "type": "null" }
|
|
@@ -964,53 +1034,60 @@
|
|
|
964
1034
|
},
|
|
965
1035
|
"indentWidth": {
|
|
966
1036
|
"description": "The size of the indentation, 2 by default",
|
|
967
|
-
"default": 2,
|
|
968
1037
|
"type": ["integer", "null"],
|
|
969
1038
|
"format": "uint8",
|
|
970
1039
|
"minimum": 0.0
|
|
971
1040
|
},
|
|
972
1041
|
"lineEnding": {
|
|
973
1042
|
"description": "The type of line ending.",
|
|
974
|
-
"default": "lf",
|
|
975
1043
|
"anyOf": [{ "$ref": "#/definitions/LineEnding" }, { "type": "null" }]
|
|
976
1044
|
},
|
|
977
1045
|
"lineWidth": {
|
|
978
1046
|
"description": "What's the max width of a line. Defaults to 80.",
|
|
979
|
-
"default": 80,
|
|
980
1047
|
"anyOf": [{ "$ref": "#/definitions/LineWidth" }, { "type": "null" }]
|
|
981
1048
|
}
|
|
982
1049
|
},
|
|
983
1050
|
"additionalProperties": false
|
|
984
1051
|
},
|
|
985
|
-
"
|
|
1052
|
+
"Hook": {
|
|
986
1053
|
"type": "object",
|
|
987
|
-
"required": ["name"],
|
|
1054
|
+
"required": ["name", "stableResult"],
|
|
988
1055
|
"properties": {
|
|
989
1056
|
"closureIndex": {
|
|
990
|
-
"description": "The \"position\" of the closure function, starting from zero.\n\
|
|
1057
|
+
"description": "The \"position\" of the closure function, starting from zero.\n\nFor example, for React's `useEffect()` hook, the closure index is 0.",
|
|
991
1058
|
"type": ["integer", "null"],
|
|
992
|
-
"format": "
|
|
1059
|
+
"format": "uint8",
|
|
993
1060
|
"minimum": 0.0
|
|
994
1061
|
},
|
|
995
1062
|
"dependenciesIndex": {
|
|
996
|
-
"description": "The \"position\" of the array of dependencies, starting from zero.",
|
|
1063
|
+
"description": "The \"position\" of the array of dependencies, starting from zero.\n\nFor example, for React's `useEffect()` hook, the dependencies index is 1.",
|
|
997
1064
|
"type": ["integer", "null"],
|
|
998
|
-
"format": "
|
|
1065
|
+
"format": "uint8",
|
|
999
1066
|
"minimum": 0.0
|
|
1000
1067
|
},
|
|
1001
|
-
"name": { "description": "The name of the hook", "type": "string" }
|
|
1068
|
+
"name": { "description": "The name of the hook.", "type": "string" },
|
|
1069
|
+
"stableResult": {
|
|
1070
|
+
"description": "Whether the result of the hook is stable.\n\nSet to `true` to mark the identity of the hook's return value as stable, or use a number/an array of numbers to mark the \"positions\" in the return array as stable.\n\nFor example, for React's `useRef()` hook the value would be `true`, while for `useState()` it would be `[1]`.",
|
|
1071
|
+
"allOf": [{ "$ref": "#/definitions/StableHookResult" }]
|
|
1072
|
+
}
|
|
1002
1073
|
},
|
|
1003
1074
|
"additionalProperties": false
|
|
1004
1075
|
},
|
|
1076
|
+
"HooksConfiguration": {
|
|
1077
|
+
"anyOf": [
|
|
1078
|
+
{ "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1079
|
+
{ "$ref": "#/definitions/RuleWithHooksOptions" }
|
|
1080
|
+
]
|
|
1081
|
+
},
|
|
1005
1082
|
"HooksOptions": {
|
|
1006
1083
|
"description": "Options for the rule `useExhaustiveDependencies`",
|
|
1007
1084
|
"type": "object",
|
|
1008
1085
|
"required": ["hooks"],
|
|
1009
1086
|
"properties": {
|
|
1010
1087
|
"hooks": {
|
|
1011
|
-
"description": "List of
|
|
1088
|
+
"description": "List of hooks of which the dependencies should be validated.",
|
|
1012
1089
|
"type": "array",
|
|
1013
|
-
"items": { "$ref": "#/definitions/
|
|
1090
|
+
"items": { "$ref": "#/definitions/Hook" }
|
|
1014
1091
|
}
|
|
1015
1092
|
},
|
|
1016
1093
|
"additionalProperties": false
|
|
@@ -1057,6 +1134,13 @@
|
|
|
1057
1134
|
{ "type": "null" }
|
|
1058
1135
|
]
|
|
1059
1136
|
},
|
|
1137
|
+
"attributePosition": {
|
|
1138
|
+
"description": "The attribute position style in JavaScript code. Defaults to auto.",
|
|
1139
|
+
"anyOf": [
|
|
1140
|
+
{ "$ref": "#/definitions/AttributePosition" },
|
|
1141
|
+
{ "type": "null" }
|
|
1142
|
+
]
|
|
1143
|
+
},
|
|
1060
1144
|
"bracketSameLine": {
|
|
1061
1145
|
"description": "Whether to hug the closing bracket of multiline HTML/JSX tags to the end of the last line, rather than being alone on the following line. Defaults to false.",
|
|
1062
1146
|
"type": ["boolean", "null"]
|
|
@@ -1191,6 +1275,13 @@
|
|
|
1191
1275
|
"lineWidth": {
|
|
1192
1276
|
"description": "What's the max width of a line applied to JSON (and its super languages) files. Defaults to 80.",
|
|
1193
1277
|
"anyOf": [{ "$ref": "#/definitions/LineWidth" }, { "type": "null" }]
|
|
1278
|
+
},
|
|
1279
|
+
"trailingCommas": {
|
|
1280
|
+
"description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to \"none\".",
|
|
1281
|
+
"anyOf": [
|
|
1282
|
+
{ "$ref": "#/definitions/TrailingCommas" },
|
|
1283
|
+
{ "type": "null" }
|
|
1284
|
+
]
|
|
1194
1285
|
}
|
|
1195
1286
|
},
|
|
1196
1287
|
"additionalProperties": false
|
|
@@ -1240,7 +1331,6 @@
|
|
|
1240
1331
|
"properties": {
|
|
1241
1332
|
"enabled": {
|
|
1242
1333
|
"description": "if `false`, it disables the feature and the linter won't be executed. `true` by default",
|
|
1243
|
-
"default": true,
|
|
1244
1334
|
"type": ["boolean", "null"]
|
|
1245
1335
|
},
|
|
1246
1336
|
"ignore": {
|
|
@@ -1253,12 +1343,17 @@
|
|
|
1253
1343
|
},
|
|
1254
1344
|
"rules": {
|
|
1255
1345
|
"description": "List of rules",
|
|
1256
|
-
"default": { "recommended": true },
|
|
1257
1346
|
"anyOf": [{ "$ref": "#/definitions/Rules" }, { "type": "null" }]
|
|
1258
1347
|
}
|
|
1259
1348
|
},
|
|
1260
1349
|
"additionalProperties": false
|
|
1261
1350
|
},
|
|
1351
|
+
"NamingConventionConfiguration": {
|
|
1352
|
+
"anyOf": [
|
|
1353
|
+
{ "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1354
|
+
{ "$ref": "#/definitions/RuleWithNamingConventionOptions" }
|
|
1355
|
+
]
|
|
1356
|
+
},
|
|
1262
1357
|
"NamingConventionOptions": {
|
|
1263
1358
|
"description": "Rule's options.",
|
|
1264
1359
|
"type": "object",
|
|
@@ -1267,6 +1362,10 @@
|
|
|
1267
1362
|
"description": "Allowed cases for _TypeScript_ `enum` member names.",
|
|
1268
1363
|
"allOf": [{ "$ref": "#/definitions/EnumMemberCase" }]
|
|
1269
1364
|
},
|
|
1365
|
+
"requireAscii": {
|
|
1366
|
+
"description": "If `false`, then non-ASCII characters are allowed.",
|
|
1367
|
+
"type": "boolean"
|
|
1368
|
+
},
|
|
1270
1369
|
"strictCase": {
|
|
1271
1370
|
"description": "If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].",
|
|
1272
1371
|
"type": "boolean"
|
|
@@ -1282,142 +1381,121 @@
|
|
|
1282
1381
|
"description": "It enables ALL rules for this group.",
|
|
1283
1382
|
"type": ["boolean", "null"]
|
|
1284
1383
|
},
|
|
1285
|
-
"
|
|
1286
|
-
"description": "Disallow
|
|
1287
|
-
"anyOf": [
|
|
1288
|
-
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1289
|
-
{ "type": "null" }
|
|
1290
|
-
]
|
|
1291
|
-
},
|
|
1292
|
-
"noEmptyBlockStatements": {
|
|
1293
|
-
"description": "Disallow empty block statements and static blocks.",
|
|
1384
|
+
"noBarrelFile": {
|
|
1385
|
+
"description": "Disallow the use of barrel file.",
|
|
1294
1386
|
"anyOf": [
|
|
1295
1387
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1296
1388
|
{ "type": "null" }
|
|
1297
1389
|
]
|
|
1298
1390
|
},
|
|
1299
|
-
"
|
|
1300
|
-
"description": "Disallow
|
|
1391
|
+
"noConsole": {
|
|
1392
|
+
"description": "Disallow the use of console.",
|
|
1301
1393
|
"anyOf": [
|
|
1302
1394
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1303
1395
|
{ "type": "null" }
|
|
1304
1396
|
]
|
|
1305
1397
|
},
|
|
1306
|
-
"
|
|
1307
|
-
"description": "Disallow
|
|
1398
|
+
"noDoneCallback": {
|
|
1399
|
+
"description": "Disallow using a callback in asynchronous tests and hooks.",
|
|
1308
1400
|
"anyOf": [
|
|
1309
1401
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1310
1402
|
{ "type": "null" }
|
|
1311
1403
|
]
|
|
1312
1404
|
},
|
|
1313
|
-
"
|
|
1314
|
-
"description": "Disallow the
|
|
1315
|
-
"anyOf": [
|
|
1316
|
-
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1317
|
-
{ "type": "null" }
|
|
1318
|
-
]
|
|
1319
|
-
},
|
|
1320
|
-
"noInvalidUseBeforeDeclaration": {
|
|
1321
|
-
"description": "Disallow the use of variables and function parameters before their declaration",
|
|
1405
|
+
"noDuplicateJsonKeys": {
|
|
1406
|
+
"description": "Disallow two keys with the same name inside a JSON object.",
|
|
1322
1407
|
"anyOf": [
|
|
1323
1408
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1324
1409
|
{ "type": "null" }
|
|
1325
1410
|
]
|
|
1326
1411
|
},
|
|
1327
|
-
"
|
|
1328
|
-
"description": "
|
|
1412
|
+
"noDuplicateTestHooks": {
|
|
1413
|
+
"description": "A describe block should not contain duplicate hooks.",
|
|
1329
1414
|
"anyOf": [
|
|
1330
1415
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1331
1416
|
{ "type": "null" }
|
|
1332
1417
|
]
|
|
1333
1418
|
},
|
|
1334
|
-
"
|
|
1335
|
-
"description": "
|
|
1419
|
+
"noExcessiveNestedTestSuites": {
|
|
1420
|
+
"description": "This rule enforces a maximum depth to nested describe() in test files.",
|
|
1336
1421
|
"anyOf": [
|
|
1337
1422
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1338
1423
|
{ "type": "null" }
|
|
1339
1424
|
]
|
|
1340
1425
|
},
|
|
1341
|
-
"
|
|
1342
|
-
"description": "Disallow
|
|
1426
|
+
"noExportsInTest": {
|
|
1427
|
+
"description": "Disallow using export or module.exports in files containing tests",
|
|
1343
1428
|
"anyOf": [
|
|
1344
1429
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1345
1430
|
{ "type": "null" }
|
|
1346
1431
|
]
|
|
1347
1432
|
},
|
|
1348
|
-
"
|
|
1349
|
-
"description": "Disallow
|
|
1433
|
+
"noFocusedTests": {
|
|
1434
|
+
"description": "Disallow focused tests.",
|
|
1350
1435
|
"anyOf": [
|
|
1351
1436
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1352
1437
|
{ "type": "null" }
|
|
1353
1438
|
]
|
|
1354
1439
|
},
|
|
1355
|
-
"
|
|
1356
|
-
"description": "Disallow
|
|
1440
|
+
"noNamespaceImport": {
|
|
1441
|
+
"description": "Disallow the use of namespace imports.",
|
|
1357
1442
|
"anyOf": [
|
|
1358
1443
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1359
1444
|
{ "type": "null" }
|
|
1360
1445
|
]
|
|
1361
1446
|
},
|
|
1362
|
-
"
|
|
1363
|
-
"description": "
|
|
1447
|
+
"noNodejsModules": {
|
|
1448
|
+
"description": "Forbid the use of Node.js builtin modules.",
|
|
1364
1449
|
"anyOf": [
|
|
1365
1450
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1366
1451
|
{ "type": "null" }
|
|
1367
1452
|
]
|
|
1368
1453
|
},
|
|
1369
|
-
"
|
|
1370
|
-
"description": "
|
|
1454
|
+
"noReExportAll": {
|
|
1455
|
+
"description": "Avoid re-export all.",
|
|
1371
1456
|
"anyOf": [
|
|
1372
1457
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1373
1458
|
{ "type": "null" }
|
|
1374
1459
|
]
|
|
1375
1460
|
},
|
|
1376
|
-
"
|
|
1377
|
-
"description": "
|
|
1378
|
-
"type": ["boolean", "null"]
|
|
1379
|
-
},
|
|
1380
|
-
"useAwait": {
|
|
1381
|
-
"description": "Ensure async functions utilize await.",
|
|
1461
|
+
"noRestrictedImports": {
|
|
1462
|
+
"description": "Disallow specified modules when loaded by import or require.",
|
|
1382
1463
|
"anyOf": [
|
|
1383
|
-
{ "$ref": "#/definitions/
|
|
1464
|
+
{ "$ref": "#/definitions/RestrictedImportsConfiguration" },
|
|
1384
1465
|
{ "type": "null" }
|
|
1385
1466
|
]
|
|
1386
1467
|
},
|
|
1387
|
-
"
|
|
1388
|
-
"description": "
|
|
1468
|
+
"noSemicolonInJsx": {
|
|
1469
|
+
"description": "It detects possible \"wrong\" semicolons inside JSX elements.",
|
|
1389
1470
|
"anyOf": [
|
|
1390
1471
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1391
1472
|
{ "type": "null" }
|
|
1392
1473
|
]
|
|
1393
1474
|
},
|
|
1394
|
-
"
|
|
1395
|
-
"description": "
|
|
1475
|
+
"noSkippedTests": {
|
|
1476
|
+
"description": "Disallow disabled tests.",
|
|
1396
1477
|
"anyOf": [
|
|
1397
1478
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1398
1479
|
{ "type": "null" }
|
|
1399
1480
|
]
|
|
1400
1481
|
},
|
|
1401
|
-
"
|
|
1402
|
-
"description": "
|
|
1482
|
+
"noUndeclaredDependencies": {
|
|
1483
|
+
"description": "Disallow the use of dependencies that aren't specified in the package.json.",
|
|
1403
1484
|
"anyOf": [
|
|
1404
1485
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1405
1486
|
{ "type": "null" }
|
|
1406
1487
|
]
|
|
1407
1488
|
},
|
|
1408
|
-
"
|
|
1409
|
-
"description": "
|
|
1489
|
+
"noUselessTernary": {
|
|
1490
|
+
"description": "Disallow ternary operators when simpler alternatives exist.",
|
|
1410
1491
|
"anyOf": [
|
|
1411
1492
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1412
1493
|
{ "type": "null" }
|
|
1413
1494
|
]
|
|
1414
1495
|
},
|
|
1415
|
-
"
|
|
1416
|
-
"description": "
|
|
1417
|
-
"
|
|
1418
|
-
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1419
|
-
{ "type": "null" }
|
|
1420
|
-
]
|
|
1496
|
+
"recommended": {
|
|
1497
|
+
"description": "It enables the recommended rules for this group",
|
|
1498
|
+
"type": ["boolean", "null"]
|
|
1421
1499
|
},
|
|
1422
1500
|
"useImportRestrictions": {
|
|
1423
1501
|
"description": "Disallows package private imports.",
|
|
@@ -1426,42 +1504,35 @@
|
|
|
1426
1504
|
{ "type": "null" }
|
|
1427
1505
|
]
|
|
1428
1506
|
},
|
|
1429
|
-
"
|
|
1430
|
-
"description": "
|
|
1507
|
+
"useJsxKeyInIterable": {
|
|
1508
|
+
"description": "Disallow missing key props in iterators/collection literals.",
|
|
1431
1509
|
"anyOf": [
|
|
1432
1510
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1433
1511
|
{ "type": "null" }
|
|
1434
1512
|
]
|
|
1435
1513
|
},
|
|
1436
|
-
"
|
|
1437
|
-
"description": "
|
|
1514
|
+
"useNodeAssertStrict": {
|
|
1515
|
+
"description": "Promotes the usage of node:assert/strict over node:assert.",
|
|
1438
1516
|
"anyOf": [
|
|
1439
1517
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1440
1518
|
{ "type": "null" }
|
|
1441
1519
|
]
|
|
1442
1520
|
},
|
|
1443
|
-
"
|
|
1444
|
-
"description": "
|
|
1521
|
+
"useSortedClasses": {
|
|
1522
|
+
"description": "Enforce the sorting of CSS utility classes.",
|
|
1445
1523
|
"anyOf": [
|
|
1446
|
-
{ "$ref": "#/definitions/
|
|
1447
|
-
{ "type": "null" }
|
|
1448
|
-
]
|
|
1449
|
-
},
|
|
1450
|
-
"useShorthandFunctionType": {
|
|
1451
|
-
"description": "Enforce using function types instead of object type with call signatures.",
|
|
1452
|
-
"anyOf": [
|
|
1453
|
-
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1524
|
+
{ "$ref": "#/definitions/UtilityClassSortingConfiguration" },
|
|
1454
1525
|
{ "type": "null" }
|
|
1455
1526
|
]
|
|
1456
1527
|
}
|
|
1457
|
-
}
|
|
1528
|
+
},
|
|
1529
|
+
"additionalProperties": false
|
|
1458
1530
|
},
|
|
1459
1531
|
"OrganizeImports": {
|
|
1460
1532
|
"type": "object",
|
|
1461
1533
|
"properties": {
|
|
1462
1534
|
"enabled": {
|
|
1463
1535
|
"description": "Enables the organization of imports",
|
|
1464
|
-
"default": true,
|
|
1465
1536
|
"type": ["boolean", "null"]
|
|
1466
1537
|
},
|
|
1467
1538
|
"ignore": {
|
|
@@ -1478,6 +1549,14 @@
|
|
|
1478
1549
|
"OverrideFormatterConfiguration": {
|
|
1479
1550
|
"type": "object",
|
|
1480
1551
|
"properties": {
|
|
1552
|
+
"attributePosition": {
|
|
1553
|
+
"description": "The attribute position style.",
|
|
1554
|
+
"default": null,
|
|
1555
|
+
"anyOf": [
|
|
1556
|
+
{ "$ref": "#/definitions/AttributePosition" },
|
|
1557
|
+
{ "type": "null" }
|
|
1558
|
+
]
|
|
1559
|
+
},
|
|
1481
1560
|
"enabled": { "default": null, "type": ["boolean", "null"] },
|
|
1482
1561
|
"formatWithErrors": {
|
|
1483
1562
|
"description": "Stores whether formatting should be allowed to proceed if a given file has syntax errors",
|
|
@@ -1625,7 +1704,8 @@
|
|
|
1625
1704
|
"description": "It enables the recommended rules for this group",
|
|
1626
1705
|
"type": ["boolean", "null"]
|
|
1627
1706
|
}
|
|
1628
|
-
}
|
|
1707
|
+
},
|
|
1708
|
+
"additionalProperties": false
|
|
1629
1709
|
},
|
|
1630
1710
|
"PlainIndentStyle": {
|
|
1631
1711
|
"oneOf": [
|
|
@@ -1633,44 +1713,14 @@
|
|
|
1633
1713
|
{ "description": "Space", "type": "string", "enum": ["space"] }
|
|
1634
1714
|
]
|
|
1635
1715
|
},
|
|
1636
|
-
"
|
|
1716
|
+
"QuoteProperties": { "type": "string", "enum": ["asNeeded", "preserve"] },
|
|
1717
|
+
"QuoteStyle": { "type": "string", "enum": ["double", "single"] },
|
|
1718
|
+
"RestrictedGlobalsConfiguration": {
|
|
1637
1719
|
"anyOf": [
|
|
1638
|
-
{
|
|
1639
|
-
|
|
1640
|
-
"allOf": [{ "$ref": "#/definitions/ComplexityOptions" }]
|
|
1641
|
-
},
|
|
1642
|
-
{
|
|
1643
|
-
"description": "Options for `useConsistentArrayType` rule",
|
|
1644
|
-
"allOf": [{ "$ref": "#/definitions/ConsistentArrayTypeOptions" }]
|
|
1645
|
-
},
|
|
1646
|
-
{
|
|
1647
|
-
"description": "Options for `useFilenamingConvention` rule",
|
|
1648
|
-
"allOf": [{ "$ref": "#/definitions/FilenamingConventionOptions" }]
|
|
1649
|
-
},
|
|
1650
|
-
{
|
|
1651
|
-
"description": "Options for `useExhaustiveDependencies` rule",
|
|
1652
|
-
"allOf": [{ "$ref": "#/definitions/HooksOptions" }]
|
|
1653
|
-
},
|
|
1654
|
-
{
|
|
1655
|
-
"description": "Deprecated options for `useHookAtTopLevel` rule",
|
|
1656
|
-
"allOf": [{ "$ref": "#/definitions/DeprecatedHooksOptions" }]
|
|
1657
|
-
},
|
|
1658
|
-
{
|
|
1659
|
-
"description": "Options for `useNamingConvention` rule",
|
|
1660
|
-
"allOf": [{ "$ref": "#/definitions/NamingConventionOptions" }]
|
|
1661
|
-
},
|
|
1662
|
-
{
|
|
1663
|
-
"description": "Options for `noRestrictedGlobals` rule",
|
|
1664
|
-
"allOf": [{ "$ref": "#/definitions/RestrictedGlobalsOptions" }]
|
|
1665
|
-
},
|
|
1666
|
-
{
|
|
1667
|
-
"description": "Options for `useValidAriaRole` rule",
|
|
1668
|
-
"allOf": [{ "$ref": "#/definitions/ValidAriaRoleOptions" }]
|
|
1669
|
-
}
|
|
1720
|
+
{ "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1721
|
+
{ "$ref": "#/definitions/RuleWithRestrictedGlobalsOptions" }
|
|
1670
1722
|
]
|
|
1671
1723
|
},
|
|
1672
|
-
"QuoteProperties": { "type": "string", "enum": ["asNeeded", "preserve"] },
|
|
1673
|
-
"QuoteStyle": { "type": "string", "enum": ["double", "single"] },
|
|
1674
1724
|
"RestrictedGlobalsOptions": {
|
|
1675
1725
|
"description": "Options for the rule `noRestrictedGlobals`.",
|
|
1676
1726
|
"type": "object",
|
|
@@ -1684,27 +1734,131 @@
|
|
|
1684
1734
|
},
|
|
1685
1735
|
"additionalProperties": false
|
|
1686
1736
|
},
|
|
1737
|
+
"RestrictedImportsConfiguration": {
|
|
1738
|
+
"anyOf": [
|
|
1739
|
+
{ "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1740
|
+
{ "$ref": "#/definitions/RuleWithRestrictedImportsOptions" }
|
|
1741
|
+
]
|
|
1742
|
+
},
|
|
1743
|
+
"RestrictedImportsOptions": {
|
|
1744
|
+
"description": "Options for the rule `noRestrictedImports`.",
|
|
1745
|
+
"type": "object",
|
|
1746
|
+
"required": ["paths"],
|
|
1747
|
+
"properties": {
|
|
1748
|
+
"paths": {
|
|
1749
|
+
"description": "A list of names that should trigger the rule",
|
|
1750
|
+
"type": "object",
|
|
1751
|
+
"additionalProperties": { "type": "string" }
|
|
1752
|
+
}
|
|
1753
|
+
},
|
|
1754
|
+
"additionalProperties": false
|
|
1755
|
+
},
|
|
1687
1756
|
"RuleConfiguration": {
|
|
1688
1757
|
"anyOf": [
|
|
1689
1758
|
{ "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1690
|
-
{ "$ref": "#/definitions/
|
|
1759
|
+
{ "$ref": "#/definitions/RuleWithNoOptions" }
|
|
1691
1760
|
]
|
|
1692
1761
|
},
|
|
1693
1762
|
"RulePlainConfiguration": {
|
|
1694
1763
|
"type": "string",
|
|
1695
1764
|
"enum": ["warn", "error", "off"]
|
|
1696
1765
|
},
|
|
1697
|
-
"
|
|
1766
|
+
"RuleWithComplexityOptions": {
|
|
1698
1767
|
"type": "object",
|
|
1699
|
-
"required": ["level"],
|
|
1768
|
+
"required": ["level", "options"],
|
|
1700
1769
|
"properties": {
|
|
1701
1770
|
"level": { "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1702
|
-
"options": {
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1771
|
+
"options": { "$ref": "#/definitions/ComplexityOptions" }
|
|
1772
|
+
},
|
|
1773
|
+
"additionalProperties": false
|
|
1774
|
+
},
|
|
1775
|
+
"RuleWithConsistentArrayTypeOptions": {
|
|
1776
|
+
"type": "object",
|
|
1777
|
+
"required": ["level", "options"],
|
|
1778
|
+
"properties": {
|
|
1779
|
+
"level": { "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1780
|
+
"options": { "$ref": "#/definitions/ConsistentArrayTypeOptions" }
|
|
1781
|
+
},
|
|
1782
|
+
"additionalProperties": false
|
|
1783
|
+
},
|
|
1784
|
+
"RuleWithDeprecatedHooksOptions": {
|
|
1785
|
+
"type": "object",
|
|
1786
|
+
"required": ["level", "options"],
|
|
1787
|
+
"properties": {
|
|
1788
|
+
"level": { "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1789
|
+
"options": { "$ref": "#/definitions/DeprecatedHooksOptions" }
|
|
1790
|
+
},
|
|
1791
|
+
"additionalProperties": false
|
|
1792
|
+
},
|
|
1793
|
+
"RuleWithFilenamingConventionOptions": {
|
|
1794
|
+
"type": "object",
|
|
1795
|
+
"required": ["level", "options"],
|
|
1796
|
+
"properties": {
|
|
1797
|
+
"level": { "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1798
|
+
"options": { "$ref": "#/definitions/FilenamingConventionOptions" }
|
|
1799
|
+
},
|
|
1800
|
+
"additionalProperties": false
|
|
1801
|
+
},
|
|
1802
|
+
"RuleWithHooksOptions": {
|
|
1803
|
+
"type": "object",
|
|
1804
|
+
"required": ["level", "options"],
|
|
1805
|
+
"properties": {
|
|
1806
|
+
"level": { "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1807
|
+
"options": { "$ref": "#/definitions/HooksOptions" }
|
|
1808
|
+
},
|
|
1809
|
+
"additionalProperties": false
|
|
1810
|
+
},
|
|
1811
|
+
"RuleWithNamingConventionOptions": {
|
|
1812
|
+
"type": "object",
|
|
1813
|
+
"required": ["level", "options"],
|
|
1814
|
+
"properties": {
|
|
1815
|
+
"level": { "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1816
|
+
"options": { "$ref": "#/definitions/NamingConventionOptions" }
|
|
1817
|
+
},
|
|
1818
|
+
"additionalProperties": false
|
|
1819
|
+
},
|
|
1820
|
+
"RuleWithNoOptions": {
|
|
1821
|
+
"type": "object",
|
|
1822
|
+
"required": ["level", "options"],
|
|
1823
|
+
"properties": {
|
|
1824
|
+
"level": { "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1825
|
+
"options": { "type": "null" }
|
|
1826
|
+
},
|
|
1827
|
+
"additionalProperties": false
|
|
1828
|
+
},
|
|
1829
|
+
"RuleWithRestrictedGlobalsOptions": {
|
|
1830
|
+
"type": "object",
|
|
1831
|
+
"required": ["level", "options"],
|
|
1832
|
+
"properties": {
|
|
1833
|
+
"level": { "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1834
|
+
"options": { "$ref": "#/definitions/RestrictedGlobalsOptions" }
|
|
1835
|
+
},
|
|
1836
|
+
"additionalProperties": false
|
|
1837
|
+
},
|
|
1838
|
+
"RuleWithRestrictedImportsOptions": {
|
|
1839
|
+
"type": "object",
|
|
1840
|
+
"required": ["level", "options"],
|
|
1841
|
+
"properties": {
|
|
1842
|
+
"level": { "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1843
|
+
"options": { "$ref": "#/definitions/RestrictedImportsOptions" }
|
|
1844
|
+
},
|
|
1845
|
+
"additionalProperties": false
|
|
1846
|
+
},
|
|
1847
|
+
"RuleWithUtilityClassSortingOptions": {
|
|
1848
|
+
"type": "object",
|
|
1849
|
+
"required": ["level", "options"],
|
|
1850
|
+
"properties": {
|
|
1851
|
+
"level": { "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1852
|
+
"options": { "$ref": "#/definitions/UtilityClassSortingOptions" }
|
|
1853
|
+
},
|
|
1854
|
+
"additionalProperties": false
|
|
1855
|
+
},
|
|
1856
|
+
"RuleWithValidAriaRoleOptions": {
|
|
1857
|
+
"type": "object",
|
|
1858
|
+
"required": ["level", "options"],
|
|
1859
|
+
"properties": {
|
|
1860
|
+
"level": { "$ref": "#/definitions/RulePlainConfiguration" },
|
|
1861
|
+
"options": { "$ref": "#/definitions/ValidAriaRoleOptions" }
|
|
1708
1862
|
},
|
|
1709
1863
|
"additionalProperties": false
|
|
1710
1864
|
},
|
|
@@ -1768,13 +1922,47 @@
|
|
|
1768
1922
|
{ "type": "null" }
|
|
1769
1923
|
]
|
|
1770
1924
|
},
|
|
1925
|
+
"noGlobalEval": {
|
|
1926
|
+
"description": "Disallow the use of global eval().",
|
|
1927
|
+
"anyOf": [
|
|
1928
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1929
|
+
{ "type": "null" }
|
|
1930
|
+
]
|
|
1931
|
+
},
|
|
1771
1932
|
"recommended": {
|
|
1772
1933
|
"description": "It enables the recommended rules for this group",
|
|
1773
1934
|
"type": ["boolean", "null"]
|
|
1774
1935
|
}
|
|
1775
|
-
}
|
|
1936
|
+
},
|
|
1937
|
+
"additionalProperties": false
|
|
1776
1938
|
},
|
|
1777
1939
|
"Semicolons": { "type": "string", "enum": ["always", "asNeeded"] },
|
|
1940
|
+
"StableHookResult": {
|
|
1941
|
+
"oneOf": [
|
|
1942
|
+
{
|
|
1943
|
+
"description": "Used to indicate the hook does not have a stable result.",
|
|
1944
|
+
"type": "string",
|
|
1945
|
+
"enum": ["None"]
|
|
1946
|
+
},
|
|
1947
|
+
{
|
|
1948
|
+
"description": "Used to indicate the identity of the result value is stable.\n\nNote this does not imply internal stability. For instance, the ref objects returned by React's `useRef()` always have a stable identity, but their internal value may be mutable.",
|
|
1949
|
+
"type": "string",
|
|
1950
|
+
"enum": ["Identity"]
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
"description": "Used to indicate the hook returns an array and some of its indices have stable identities.\n\nFor example, React's `useState()` hook returns a stable function at index 1.",
|
|
1954
|
+
"type": "object",
|
|
1955
|
+
"required": ["Indices"],
|
|
1956
|
+
"properties": {
|
|
1957
|
+
"Indices": {
|
|
1958
|
+
"type": "array",
|
|
1959
|
+
"items": { "type": "integer", "format": "uint8", "minimum": 0.0 }
|
|
1960
|
+
}
|
|
1961
|
+
},
|
|
1962
|
+
"additionalProperties": false
|
|
1963
|
+
}
|
|
1964
|
+
]
|
|
1965
|
+
},
|
|
1778
1966
|
"StringSet": {
|
|
1779
1967
|
"type": "array",
|
|
1780
1968
|
"items": { "type": "string" },
|
|
@@ -1861,7 +2049,7 @@
|
|
|
1861
2049
|
"noRestrictedGlobals": {
|
|
1862
2050
|
"description": "This rule allows you to specify global variable names that you don’t want to use in your application.",
|
|
1863
2051
|
"anyOf": [
|
|
1864
|
-
{ "$ref": "#/definitions/
|
|
2052
|
+
{ "$ref": "#/definitions/RestrictedGlobalsConfiguration" },
|
|
1865
2053
|
{ "type": "null" }
|
|
1866
2054
|
]
|
|
1867
2055
|
},
|
|
@@ -1918,6 +2106,13 @@
|
|
|
1918
2106
|
{ "type": "null" }
|
|
1919
2107
|
]
|
|
1920
2108
|
},
|
|
2109
|
+
"useConsistentArrayType": {
|
|
2110
|
+
"description": "Require consistently using either T[] or Array<T>",
|
|
2111
|
+
"anyOf": [
|
|
2112
|
+
{ "$ref": "#/definitions/ConsistentArrayTypeConfiguration" },
|
|
2113
|
+
{ "type": "null" }
|
|
2114
|
+
]
|
|
2115
|
+
},
|
|
1921
2116
|
"useConst": {
|
|
1922
2117
|
"description": "Require const declarations for variables that are never reassigned after declared.",
|
|
1923
2118
|
"anyOf": [
|
|
@@ -1946,6 +2141,27 @@
|
|
|
1946
2141
|
{ "type": "null" }
|
|
1947
2142
|
]
|
|
1948
2143
|
},
|
|
2144
|
+
"useExportType": {
|
|
2145
|
+
"description": "Promotes the use of export type for types.",
|
|
2146
|
+
"anyOf": [
|
|
2147
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
2148
|
+
{ "type": "null" }
|
|
2149
|
+
]
|
|
2150
|
+
},
|
|
2151
|
+
"useFilenamingConvention": {
|
|
2152
|
+
"description": "Enforce naming conventions for JavaScript and TypeScript filenames.",
|
|
2153
|
+
"anyOf": [
|
|
2154
|
+
{ "$ref": "#/definitions/FilenamingConventionConfiguration" },
|
|
2155
|
+
{ "type": "null" }
|
|
2156
|
+
]
|
|
2157
|
+
},
|
|
2158
|
+
"useForOf": {
|
|
2159
|
+
"description": "This rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array.",
|
|
2160
|
+
"anyOf": [
|
|
2161
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
2162
|
+
{ "type": "null" }
|
|
2163
|
+
]
|
|
2164
|
+
},
|
|
1949
2165
|
"useFragmentSyntax": {
|
|
1950
2166
|
"description": "This rule enforces the use of <>...</> over <Fragment>...</Fragment>.",
|
|
1951
2167
|
"anyOf": [
|
|
@@ -1953,6 +2169,13 @@
|
|
|
1953
2169
|
{ "type": "null" }
|
|
1954
2170
|
]
|
|
1955
2171
|
},
|
|
2172
|
+
"useImportType": {
|
|
2173
|
+
"description": "Promotes the use of import type for types.",
|
|
2174
|
+
"anyOf": [
|
|
2175
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
2176
|
+
{ "type": "null" }
|
|
2177
|
+
]
|
|
2178
|
+
},
|
|
1956
2179
|
"useLiteralEnumMembers": {
|
|
1957
2180
|
"description": "Require all enum members to be literal values.",
|
|
1958
2181
|
"anyOf": [
|
|
@@ -1962,6 +2185,20 @@
|
|
|
1962
2185
|
},
|
|
1963
2186
|
"useNamingConvention": {
|
|
1964
2187
|
"description": "Enforce naming conventions for everything across a codebase.",
|
|
2188
|
+
"anyOf": [
|
|
2189
|
+
{ "$ref": "#/definitions/NamingConventionConfiguration" },
|
|
2190
|
+
{ "type": "null" }
|
|
2191
|
+
]
|
|
2192
|
+
},
|
|
2193
|
+
"useNodejsImportProtocol": {
|
|
2194
|
+
"description": "Enforces using the node: protocol for Node.js builtin modules.",
|
|
2195
|
+
"anyOf": [
|
|
2196
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
2197
|
+
{ "type": "null" }
|
|
2198
|
+
]
|
|
2199
|
+
},
|
|
2200
|
+
"useNumberNamespace": {
|
|
2201
|
+
"description": "Use the Number properties instead of global ones.",
|
|
1965
2202
|
"anyOf": [
|
|
1966
2203
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1967
2204
|
{ "type": "null" }
|
|
@@ -1995,6 +2232,13 @@
|
|
|
1995
2232
|
{ "type": "null" }
|
|
1996
2233
|
]
|
|
1997
2234
|
},
|
|
2235
|
+
"useShorthandFunctionType": {
|
|
2236
|
+
"description": "Enforce using function types instead of object type with call signatures.",
|
|
2237
|
+
"anyOf": [
|
|
2238
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
2239
|
+
{ "type": "null" }
|
|
2240
|
+
]
|
|
2241
|
+
},
|
|
1998
2242
|
"useSingleCaseStatement": {
|
|
1999
2243
|
"description": "Enforces switch clauses have a single statement, emits a quick fix wrapping the statements in a block.",
|
|
2000
2244
|
"anyOf": [
|
|
@@ -2023,7 +2267,8 @@
|
|
|
2023
2267
|
{ "type": "null" }
|
|
2024
2268
|
]
|
|
2025
2269
|
}
|
|
2026
|
-
}
|
|
2270
|
+
},
|
|
2271
|
+
"additionalProperties": false
|
|
2027
2272
|
},
|
|
2028
2273
|
"Suspicious": {
|
|
2029
2274
|
"description": "A list of rules that belong to this group",
|
|
@@ -2034,7 +2279,7 @@
|
|
|
2034
2279
|
"type": ["boolean", "null"]
|
|
2035
2280
|
},
|
|
2036
2281
|
"noApproximativeNumericConstant": {
|
|
2037
|
-
"description": "
|
|
2282
|
+
"description": "Use standard constants instead of approximated literals.",
|
|
2038
2283
|
"anyOf": [
|
|
2039
2284
|
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
2040
2285
|
{ "type": "null" }
|
|
@@ -2173,6 +2418,13 @@
|
|
|
2173
2418
|
{ "type": "null" }
|
|
2174
2419
|
]
|
|
2175
2420
|
},
|
|
2421
|
+
"noEmptyBlockStatements": {
|
|
2422
|
+
"description": "Disallow empty block statements and static blocks.",
|
|
2423
|
+
"anyOf": [
|
|
2424
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
2425
|
+
{ "type": "null" }
|
|
2426
|
+
]
|
|
2427
|
+
},
|
|
2176
2428
|
"noEmptyInterface": {
|
|
2177
2429
|
"description": "Disallow the declaration of empty interfaces.",
|
|
2178
2430
|
"anyOf": [
|
|
@@ -2208,6 +2460,13 @@
|
|
|
2208
2460
|
{ "type": "null" }
|
|
2209
2461
|
]
|
|
2210
2462
|
},
|
|
2463
|
+
"noGlobalAssign": {
|
|
2464
|
+
"description": "Disallow assignments to native objects and read-only global variables.",
|
|
2465
|
+
"anyOf": [
|
|
2466
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
2467
|
+
{ "type": "null" }
|
|
2468
|
+
]
|
|
2469
|
+
},
|
|
2211
2470
|
"noGlobalIsFinite": {
|
|
2212
2471
|
"description": "Use Number.isFinite instead of global isFinite.",
|
|
2213
2472
|
"anyOf": [
|
|
@@ -2243,6 +2502,13 @@
|
|
|
2243
2502
|
{ "type": "null" }
|
|
2244
2503
|
]
|
|
2245
2504
|
},
|
|
2505
|
+
"noMisleadingCharacterClass": {
|
|
2506
|
+
"description": "Disallow characters made with multiple code points in character class syntax.",
|
|
2507
|
+
"anyOf": [
|
|
2508
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
2509
|
+
{ "type": "null" }
|
|
2510
|
+
]
|
|
2511
|
+
},
|
|
2246
2512
|
"noMisleadingInstantiator": {
|
|
2247
2513
|
"description": "Enforce proper usage of new and constructor.",
|
|
2248
2514
|
"anyOf": [
|
|
@@ -2299,6 +2565,13 @@
|
|
|
2299
2565
|
{ "type": "null" }
|
|
2300
2566
|
]
|
|
2301
2567
|
},
|
|
2568
|
+
"noThenProperty": {
|
|
2569
|
+
"description": "Disallow then property.",
|
|
2570
|
+
"anyOf": [
|
|
2571
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
2572
|
+
{ "type": "null" }
|
|
2573
|
+
]
|
|
2574
|
+
},
|
|
2302
2575
|
"noUnsafeDeclarationMerging": {
|
|
2303
2576
|
"description": "Disallow unsafe declaration merging between interfaces and classes.",
|
|
2304
2577
|
"anyOf": [
|
|
@@ -2317,6 +2590,13 @@
|
|
|
2317
2590
|
"description": "It enables the recommended rules for this group",
|
|
2318
2591
|
"type": ["boolean", "null"]
|
|
2319
2592
|
},
|
|
2593
|
+
"useAwait": {
|
|
2594
|
+
"description": "Ensure async functions utilize await.",
|
|
2595
|
+
"anyOf": [
|
|
2596
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
2597
|
+
{ "type": "null" }
|
|
2598
|
+
]
|
|
2599
|
+
},
|
|
2320
2600
|
"useDefaultSwitchClauseLast": {
|
|
2321
2601
|
"description": "Enforce default clauses in switch statements to be last",
|
|
2322
2602
|
"anyOf": [
|
|
@@ -2352,7 +2632,8 @@
|
|
|
2352
2632
|
{ "type": "null" }
|
|
2353
2633
|
]
|
|
2354
2634
|
}
|
|
2355
|
-
}
|
|
2635
|
+
},
|
|
2636
|
+
"additionalProperties": false
|
|
2356
2637
|
},
|
|
2357
2638
|
"TrailingComma": {
|
|
2358
2639
|
"description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.",
|
|
@@ -2374,6 +2655,48 @@
|
|
|
2374
2655
|
}
|
|
2375
2656
|
]
|
|
2376
2657
|
},
|
|
2658
|
+
"TrailingCommas": {
|
|
2659
|
+
"oneOf": [
|
|
2660
|
+
{
|
|
2661
|
+
"description": "The formatter will remove the trailing commas",
|
|
2662
|
+
"type": "string",
|
|
2663
|
+
"enum": ["none"]
|
|
2664
|
+
},
|
|
2665
|
+
{
|
|
2666
|
+
"description": "The trailing commas are allowed and advised",
|
|
2667
|
+
"type": "string",
|
|
2668
|
+
"enum": ["all"]
|
|
2669
|
+
}
|
|
2670
|
+
]
|
|
2671
|
+
},
|
|
2672
|
+
"UtilityClassSortingConfiguration": {
|
|
2673
|
+
"anyOf": [
|
|
2674
|
+
{ "$ref": "#/definitions/RulePlainConfiguration" },
|
|
2675
|
+
{ "$ref": "#/definitions/RuleWithUtilityClassSortingOptions" }
|
|
2676
|
+
]
|
|
2677
|
+
},
|
|
2678
|
+
"UtilityClassSortingOptions": {
|
|
2679
|
+
"type": "object",
|
|
2680
|
+
"properties": {
|
|
2681
|
+
"attributes": {
|
|
2682
|
+
"description": "Additional attributes that will be sorted.",
|
|
2683
|
+
"type": ["array", "null"],
|
|
2684
|
+
"items": { "type": "string" }
|
|
2685
|
+
},
|
|
2686
|
+
"functions": {
|
|
2687
|
+
"description": "Names of the functions or tagged templates that will be sorted.",
|
|
2688
|
+
"type": ["array", "null"],
|
|
2689
|
+
"items": { "type": "string" }
|
|
2690
|
+
}
|
|
2691
|
+
},
|
|
2692
|
+
"additionalProperties": false
|
|
2693
|
+
},
|
|
2694
|
+
"ValidAriaRoleConfiguration": {
|
|
2695
|
+
"anyOf": [
|
|
2696
|
+
{ "$ref": "#/definitions/RulePlainConfiguration" },
|
|
2697
|
+
{ "$ref": "#/definitions/RuleWithValidAriaRoleOptions" }
|
|
2698
|
+
]
|
|
2699
|
+
},
|
|
2377
2700
|
"ValidAriaRoleOptions": {
|
|
2378
2701
|
"type": "object",
|
|
2379
2702
|
"required": ["allowInvalidRoles", "ignoreNonDom"],
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@biomejs/biome","version":"1.
|
|
1
|
+
{"name":"@biomejs/biome","version":"1.6.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 OR Apache-2.0","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","LICENSE-APACHE","LICENSE-MIT","ROME-LICENSE-MIT"],"keywords":["JavaScript","TypeScript","format","lint","toolchain","JSON"],"engines":{"node":">=14.*"},"funding":{"type":"opencollective","url":"https://opencollective.com/biome"},"optionalDependencies":{"@biomejs/cli-win32-x64":"1.6.1","@biomejs/cli-win32-arm64":"1.6.1","@biomejs/cli-darwin-x64":"1.6.1","@biomejs/cli-darwin-arm64":"1.6.1","@biomejs/cli-linux-x64":"1.6.1","@biomejs/cli-linux-arm64":"1.6.1","@biomejs/cli-linux-x64-musl":"1.6.1","@biomejs/cli-linux-arm64-musl":"1.6.1"}}
|