@quentinhsu/biome-config 0.2.0 → 0.3.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.
- package/README.md +44 -0
- package/package.json +7 -4
- package/dist/build.mjs +0 -387
- package/dist/index.jsonc +0 -152
- package/dist/index.mjs +0 -357
- package/dist/next.jsonc +0 -169
- package/dist/nuxt.jsonc +0 -224
- package/dist/react.jsonc +0 -167
- package/dist/types/scripts/generate-biome-types.d.ts +0 -1
- package/dist/types/scripts/generate-changelog.d.ts +0 -6
- package/dist/types/src/build.d.ts +0 -1
- package/dist/types/src/constants/biome.d.ts +0 -1
- package/dist/types/src/generated/biome/index.d.ts +0 -11
- package/dist/types/src/generated/biome/no-compare-neg-zero-configuration.d.ts +0 -986
- package/dist/types/src/generated/biome/no-global-object-calls-options.d.ts +0 -306
- package/dist/types/src/generated/biome/no-nested-ternary-options.d.ts +0 -292
- package/dist/types/src/generated/biome/no-octal-escape-options.d.ts +0 -1138
- package/dist/types/src/generated/biome/no-shadow-configuration.d.ts +0 -241
- package/dist/types/src/generated/biome/nursery.d.ts +0 -1023
- package/dist/types/src/generated/biome/rule-with-no-duplicate-custom-properties-options.d.ts +0 -1095
- package/dist/types/src/generated/biome/rule-with-no-useless-catch-options.d.ts +0 -1430
- package/dist/types/src/generated/biome/rule-with-use-image-size-options.d.ts +0 -1339
- package/dist/types/src/generated/biome/schema.d.ts +0 -291
- package/dist/types/src/generated/biome/use-valid-lang-configuration.d.ts +0 -163
- package/dist/types/src/index.d.ts +0 -15
- package/dist/types/src/presets/next.d.ts +0 -1
- package/dist/types/src/presets/nuxt.d.ts +0 -1
- package/dist/types/src/presets/react.d.ts +0 -1
- package/dist/types/src/presets/vue.d.ts +0 -1
- package/dist/types/src/source/index.d.ts +0 -2
- package/dist/types/src/types.d.ts +0 -1
- package/dist/types/src/utils/merge.d.ts +0 -2
- package/dist/vue.jsonc +0 -176
|
@@ -1,1023 +0,0 @@
|
|
|
1
|
-
import type { Bool, Extends, FixKind, GroupPlainConfiguration, RuleAssistPlainConfiguration, RulePlainConfiguration, Schema, SortOrder } from './schema.ts';
|
|
2
|
-
import type { NormalizedGlob, OverrideFilesConfiguration, OverrideFormatterConfiguration, OverrideGlobs, RuleDomains } from './no-octal-escape-options.ts';
|
|
3
|
-
import type { Paths } from './rule-with-use-image-size-options.ts';
|
|
4
|
-
import type { CssConfiguration, FilesConfiguration, FormatterConfiguration, GraphqlConfiguration, GritConfiguration, HtmlConfiguration, JsConfiguration, JsonConfiguration, Plugins, RuleAssistConfigurationFor_UseSortedPropertiesOptions, SourceMatcher, VcsConfiguration } from './rule-with-no-duplicate-custom-properties-options.ts';
|
|
5
|
-
import type { NoChildrenPropConfiguration, NoConstAssignConfiguration, NoConstantConditionConfiguration, NoConstantMathMinMaxClampConfiguration, NoConstructorReturnConfiguration, NoDeprecatedImportsConfiguration, NoDuplicateDependenciesConfiguration, NoEmptyCharacterClassInRegexConfiguration, NoEmptyPatternConfiguration, NoFloatingPromisesConfiguration, NoGlobalDirnameFilenameConfiguration, NoGlobalObjectCallsConfiguration, NoImportCyclesConfiguration, NoInnerDeclarationsConfiguration, NoInvalidBuiltinInstantiationConfiguration, NoInvalidConstructorSuperConfiguration, NoInvalidDirectionInLinearGradientConfiguration, NoInvalidGridAreasConfiguration, NoInvalidPositionAtImportRuleConfiguration, NoInvalidUseBeforeDeclarationConfiguration, NoJsxLiteralsConfiguration, NoMissingVarFunctionConfiguration, NoMisusedPromisesConfiguration, NoNestedComponentDefinitionsConfiguration, NoNextAsyncClientComponentConfiguration, NoNodejsModulesConfiguration, NoNonNullAssertedOptionalChainConfiguration, NoNonoctalDecimalEscapeConfiguration, NoPrecisionLossConfiguration, NoProcessGlobalConfiguration, NoQwikUseVisibleTaskConfiguration, NoReactForwardRefConfiguration, NoReactPropAssignmentsConfiguration, NoRenderReturnValueConfiguration, NoSecretsConfiguration, NoSelfAssignConfiguration, NoSetterReturnConfiguration, NoSolidDestructuredPropsConfiguration, NoStringCaseMismatchConfiguration, NoSwitchDeclarationsConfiguration, NoUndeclaredVariablesConfiguration, NoUnknownFunctionConfiguration, NoUnknownMediaFeatureNameConfiguration, NoUnknownPropertyConfiguration, NoUnknownPseudoClassConfiguration, NoUnknownPseudoElementConfiguration, NoUnknownTypeSelectorConfiguration, NoUnknownUnitConfiguration, NoUnmatchableAnbSelectorConfiguration, NoUnreachableConfiguration, NoUnreachableSuperConfiguration, NoUnsafeFinallyConfiguration, NoUnsafeOptionalChainingConfiguration, NoUnusedFunctionParametersConfiguration, NoUnusedImportsConfiguration, NoUnusedLabelsConfiguration, NoUnusedPrivateClassMembersConfiguration, NoUnusedVariablesConfiguration, NoVoidElementsWithChildrenConfiguration, NoVoidTypeReturnConfiguration, UseGraphqlNamedOperationsConfiguration, UseHookAtTopLevelConfiguration, UseImportExtensionsConfiguration, UseIsNanConfiguration, UseJsonImportAttributesConfiguration, UseJsxKeyInIterableConfiguration, UseParseIntRadixConfiguration, UseSingleJsDocAsteriskConfiguration, UseUniqueElementIdsConfiguration, UseValidForDirectionConfiguration, UseValidTypeofConfiguration, UseYieldConfiguration } from './use-valid-lang-configuration.ts';
|
|
6
|
-
import type { NoCommonJsConfiguration, NoDefaultExportConfiguration, NoDescendingSpecificityConfiguration, NoDoneCallbackConfiguration, NoEnumConfiguration, NoExportedImportsConfiguration, NoHeadElementConfiguration, NoImplicitBooleanConfiguration, NoInferrableTypesConfiguration, NoMagicNumbersConfiguration, NoNamespaceConfiguration, NoNegationElseConfiguration, NoNestedTernaryConfiguration, NoNonNullAssertionConfiguration, NoParameterPropertiesConfiguration, NoProcessEnvConfiguration, NoRestrictedGlobalsConfiguration, NoShadowConfiguration, NoShoutyConstantsConfiguration, NoSubstrConfiguration, NoUnnecessaryConditionsConfiguration, NoUnresolvedImportsConfiguration, NoUnusedExpressionsConfiguration, NoUnusedTemplateLiteralConfiguration, NoUselessCatchBindingConfiguration, NoUselessElseConfiguration, NoUselessUndefinedConfiguration, NoValueAtRuleConfiguration, NoVueDataObjectDeclarationConfiguration, NoVueDuplicateKeysConfiguration, NoVueReservedKeysConfiguration, NoVueReservedPropsConfiguration, NoYodaExpressionConfiguration, UseAnchorHrefConfiguration, UseArrayLiteralsConfiguration, UseAsConstAssertionConfiguration, UseAtIndexConfiguration, UseBlockStatementsConfiguration, UseCollapsedElseIfConfiguration, UseCollapsedIfConfiguration, UseComponentExportOnlyModulesConfiguration, UseConsistentBuiltinInstantiationConfiguration, UseConsistentCurlyBracesConfiguration, UseConstConfiguration, UseDefaultParameterLastConfiguration, UseDefaultSwitchClauseConfiguration, UseDeprecatedDateConfiguration, UseDeprecatedReasonConfiguration, UseEnumInitializersConfiguration, UseExhaustiveSwitchCasesConfiguration, UseExplicitLengthCheckConfiguration, UseExplicitTypeConfiguration, UseExponentiationOperatorConfiguration, UseExportTypeConfiguration, UseExportsLastConfiguration, UseForOfConfiguration, UseFragmentSyntaxConfiguration, UseGraphqlNamingConventionConfiguration, UseGroupedAccessorPairsConfiguration, UseImageSizeConfiguration, UseLiteralEnumMembersConfiguration, UseMaxParamsConfiguration, UseNodeAssertStrictConfiguration, UseNodejsImportProtocolConfiguration, UseNumberNamespaceConfiguration, UseNumericSeparatorsConfiguration, UseObjectSpreadConfiguration, UseQwikClasslistConfiguration, UseQwikMethodUsageConfiguration, UseQwikValidLexicalScopeConfiguration, UseReactFunctionComponentsConfiguration, UseReadonlyClassPropertiesConfiguration, UseSelfClosingElementsConfiguration, UseShorthandAssignConfiguration, UseShorthandFunctionTypeConfiguration, UseSingleVarDeclaratorConfiguration, UseSortedClassesConfiguration, UseSymbolDescriptionConfiguration, UseTemplateConfiguration, UseThrowNewErrorConfiguration, UseThrowOnlyErrorConfiguration, UseTrimStartEndConfiguration, UseUnifiedTypeSignaturesConfiguration, UseVueMultiWordComponentNamesConfiguration } from './no-shadow-configuration.ts';
|
|
7
|
-
import type { Convention, ImportMatcher, NoParameterAssignConfiguration, NoPrivateImportsConfiguration, NoRestrictedElementsConfiguration, NoUndeclaredDependenciesConfiguration, PatternOptions, Performance, RuleAssistConfigurationFor_UseSortedAttributesOptions, RuleAssistConfigurationFor_UseSortedKeysOptions, RuleWithNoRestrictedTypesOptions, RuleWithUseFilenamingConventionOptions, Security, SeverityOrGroupFor_A11Y, SeverityOrGroupFor_Complexity, Suspicious, UseConsistentArrayTypeConfiguration, UseConsistentArrowReturnConfiguration, UseConsistentMemberAccessibilityConfiguration, UseConsistentObjectDefinitionsConfiguration, UseConsistentTypeDefinitionsConfiguration, UseExhaustiveDependenciesConfiguration, UseImportTypeConfiguration } from './no-compare-neg-zero-configuration.ts';
|
|
8
|
-
/**
|
|
9
|
-
* A list of rules that belong to this group
|
|
10
|
-
*/
|
|
11
|
-
export interface Nursery {
|
|
12
|
-
/**
|
|
13
|
-
* Restrict imports of deprecated exports.
|
|
14
|
-
*/
|
|
15
|
-
noDeprecatedImports?: NoDeprecatedImportsConfiguration | null;
|
|
16
|
-
/**
|
|
17
|
-
* Prevent the listing of duplicate dependencies. The rule supports the following dependency groups: "bundledDependencies", "bundleDependencies", "dependencies", "devDependencies", "overrides", "optionalDependencies", and "peerDependencies".
|
|
18
|
-
*/
|
|
19
|
-
noDuplicateDependencies?: NoDuplicateDependenciesConfiguration | null;
|
|
20
|
-
/**
|
|
21
|
-
* Require Promise-like statements to be handled appropriately.
|
|
22
|
-
*/
|
|
23
|
-
noFloatingPromises?: NoFloatingPromisesConfiguration | null;
|
|
24
|
-
/**
|
|
25
|
-
* Prevent import cycles.
|
|
26
|
-
*/
|
|
27
|
-
noImportCycles?: NoImportCyclesConfiguration | null;
|
|
28
|
-
/**
|
|
29
|
-
* Disallow string literals inside JSX elements.
|
|
30
|
-
*/
|
|
31
|
-
noJsxLiterals?: NoJsxLiteralsConfiguration | null;
|
|
32
|
-
/**
|
|
33
|
-
* Disallow Promises to be used in places where they are almost certainly a mistake.
|
|
34
|
-
*/
|
|
35
|
-
noMisusedPromises?: NoMisusedPromisesConfiguration | null;
|
|
36
|
-
/**
|
|
37
|
-
* Prevent client components from being async functions.
|
|
38
|
-
*/
|
|
39
|
-
noNextAsyncClientComponent?: NoNextAsyncClientComponentConfiguration | null;
|
|
40
|
-
/**
|
|
41
|
-
* Disallow non-null assertions after optional chaining expressions.
|
|
42
|
-
*/
|
|
43
|
-
noNonNullAssertedOptionalChain?: NoNonNullAssertedOptionalChainConfiguration | null;
|
|
44
|
-
/**
|
|
45
|
-
* Disallow useVisibleTask$() functions in Qwik components.
|
|
46
|
-
*/
|
|
47
|
-
noQwikUseVisibleTask?: NoQwikUseVisibleTaskConfiguration | null;
|
|
48
|
-
/**
|
|
49
|
-
* Replaces usages of forwardRef with passing ref as a prop.
|
|
50
|
-
*/
|
|
51
|
-
noReactForwardRef?: NoReactForwardRefConfiguration | null;
|
|
52
|
-
/**
|
|
53
|
-
* Disallow usage of sensitive data such as API keys and tokens.
|
|
54
|
-
*/
|
|
55
|
-
noSecrets?: NoSecretsConfiguration | null;
|
|
56
|
-
/**
|
|
57
|
-
* Disallow variable declarations from shadowing variables declared in the outer scope.
|
|
58
|
-
*/
|
|
59
|
-
noShadow?: NoShadowConfiguration | null;
|
|
60
|
-
/**
|
|
61
|
-
* Disallow unnecessary type-based conditions that can be statically determined as redundant.
|
|
62
|
-
*/
|
|
63
|
-
noUnnecessaryConditions?: NoUnnecessaryConditionsConfiguration | null;
|
|
64
|
-
/**
|
|
65
|
-
* Warn when importing non-existing exports.
|
|
66
|
-
*/
|
|
67
|
-
noUnresolvedImports?: NoUnresolvedImportsConfiguration | null;
|
|
68
|
-
/**
|
|
69
|
-
* Disallow expression statements that are neither a function call nor an assignment.
|
|
70
|
-
*/
|
|
71
|
-
noUnusedExpressions?: NoUnusedExpressionsConfiguration | null;
|
|
72
|
-
/**
|
|
73
|
-
* Disallow unused catch bindings.
|
|
74
|
-
*/
|
|
75
|
-
noUselessCatchBinding?: NoUselessCatchBindingConfiguration | null;
|
|
76
|
-
/**
|
|
77
|
-
* Disallow the use of useless undefined.
|
|
78
|
-
*/
|
|
79
|
-
noUselessUndefined?: NoUselessUndefinedConfiguration | null;
|
|
80
|
-
/**
|
|
81
|
-
* Enforce that Vue component data options are declared as functions.
|
|
82
|
-
*/
|
|
83
|
-
noVueDataObjectDeclaration?: NoVueDataObjectDeclarationConfiguration | null;
|
|
84
|
-
/**
|
|
85
|
-
* Disallow duplicate keys in Vue component data, methods, computed properties, and other options.
|
|
86
|
-
*/
|
|
87
|
-
noVueDuplicateKeys?: NoVueDuplicateKeysConfiguration | null;
|
|
88
|
-
/**
|
|
89
|
-
* Disallow reserved keys in Vue component data and computed properties.
|
|
90
|
-
*/
|
|
91
|
-
noVueReservedKeys?: NoVueReservedKeysConfiguration | null;
|
|
92
|
-
/**
|
|
93
|
-
* Disallow reserved names to be used as props.
|
|
94
|
-
*/
|
|
95
|
-
noVueReservedProps?: NoVueReservedPropsConfiguration | null;
|
|
96
|
-
/**
|
|
97
|
-
* Enables the recommended rules for this group
|
|
98
|
-
*/
|
|
99
|
-
recommended?: boolean | null;
|
|
100
|
-
/**
|
|
101
|
-
* Enforces href attribute for \<a> elements.
|
|
102
|
-
*/
|
|
103
|
-
useAnchorHref?: UseAnchorHrefConfiguration | null;
|
|
104
|
-
/**
|
|
105
|
-
* Enforce consistent arrow function bodies.
|
|
106
|
-
*/
|
|
107
|
-
useConsistentArrowReturn?: UseConsistentArrowReturnConfiguration | null;
|
|
108
|
-
/**
|
|
109
|
-
* Enforce type definitions to consistently use either interface or type.
|
|
110
|
-
*/
|
|
111
|
-
useConsistentTypeDefinitions?: UseConsistentTypeDefinitionsConfiguration | null;
|
|
112
|
-
/**
|
|
113
|
-
* Require the @deprecated directive to specify a deletion date.
|
|
114
|
-
*/
|
|
115
|
-
useDeprecatedDate?: UseDeprecatedDateConfiguration | null;
|
|
116
|
-
/**
|
|
117
|
-
* Require switch-case statements to be exhaustive.
|
|
118
|
-
*/
|
|
119
|
-
useExhaustiveSwitchCases?: UseExhaustiveSwitchCasesConfiguration | null;
|
|
120
|
-
/**
|
|
121
|
-
* Enforce types in functions, methods, variables, and parameters.
|
|
122
|
-
*/
|
|
123
|
-
useExplicitType?: UseExplicitTypeConfiguration | null;
|
|
124
|
-
/**
|
|
125
|
-
* Enforces that \<img> elements have both width and height attributes.
|
|
126
|
-
*/
|
|
127
|
-
useImageSize?: UseImageSizeConfiguration | null;
|
|
128
|
-
/**
|
|
129
|
-
* Enforce a maximum number of parameters in function definitions.
|
|
130
|
-
*/
|
|
131
|
-
useMaxParams?: UseMaxParamsConfiguration | null;
|
|
132
|
-
/**
|
|
133
|
-
* Prefer using the class prop as a classlist over the classnames helper.
|
|
134
|
-
*/
|
|
135
|
-
useQwikClasslist?: UseQwikClasslistConfiguration | null;
|
|
136
|
-
/**
|
|
137
|
-
* Disallow use* hooks outside of component$ or other use* hooks in Qwik applications.
|
|
138
|
-
*/
|
|
139
|
-
useQwikMethodUsage?: UseQwikMethodUsageConfiguration | null;
|
|
140
|
-
/**
|
|
141
|
-
* Disallow unserializable expressions in Qwik dollar ($) scopes.
|
|
142
|
-
*/
|
|
143
|
-
useQwikValidLexicalScope?: UseQwikValidLexicalScopeConfiguration | null;
|
|
144
|
-
/**
|
|
145
|
-
* Enforce that components are defined as functions and never as classes.
|
|
146
|
-
*/
|
|
147
|
-
useReactFunctionComponents?: UseReactFunctionComponentsConfiguration | null;
|
|
148
|
-
/**
|
|
149
|
-
* Enforce the sorting of CSS utility classes.
|
|
150
|
-
*/
|
|
151
|
-
useSortedClasses?: UseSortedClassesConfiguration | null;
|
|
152
|
-
/**
|
|
153
|
-
* Enforce multi-word component names in Vue components.
|
|
154
|
-
*/
|
|
155
|
-
useVueMultiWordComponentNames?: UseVueMultiWordComponentNamesConfiguration | null;
|
|
156
|
-
}
|
|
157
|
-
export type SeverityOrGroupFor_Performance = GroupPlainConfiguration | Performance;
|
|
158
|
-
export type SeverityOrGroupFor_Security = GroupPlainConfiguration | Security;
|
|
159
|
-
export type NoRestrictedTypesConfiguration = RulePlainConfiguration | RuleWithNoRestrictedTypesOptions;
|
|
160
|
-
export type UseFilenamingConventionConfiguration = RulePlainConfiguration | RuleWithUseFilenamingConventionOptions;
|
|
161
|
-
/**
|
|
162
|
-
* Rule's options.
|
|
163
|
-
*/
|
|
164
|
-
export interface UseNamingConventionOptions {
|
|
165
|
-
/**
|
|
166
|
-
* Custom conventions.
|
|
167
|
-
*/
|
|
168
|
-
conventions?: Convention[];
|
|
169
|
-
/**
|
|
170
|
-
* If `false`, then non-ASCII characters are allowed.
|
|
171
|
-
*/
|
|
172
|
-
requireAscii?: boolean;
|
|
173
|
-
/**
|
|
174
|
-
* If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].
|
|
175
|
-
*/
|
|
176
|
-
strictCase?: boolean;
|
|
177
|
-
}
|
|
178
|
-
export type SeverityOrGroupFor_Suspicious = GroupPlainConfiguration | Suspicious;
|
|
179
|
-
export type GroupMatcher = ImportMatcher | SourceMatcher;
|
|
180
|
-
export type Patterns = PatternOptions;
|
|
181
|
-
/**
|
|
182
|
-
* A list of rules that belong to this group
|
|
183
|
-
*/
|
|
184
|
-
export interface Correctness {
|
|
185
|
-
/**
|
|
186
|
-
* Prevent passing of children as props.
|
|
187
|
-
*/
|
|
188
|
-
noChildrenProp?: NoChildrenPropConfiguration | null;
|
|
189
|
-
/**
|
|
190
|
-
* Prevents from having const variables being re-assigned.
|
|
191
|
-
*/
|
|
192
|
-
noConstAssign?: NoConstAssignConfiguration | null;
|
|
193
|
-
/**
|
|
194
|
-
* Disallow constant expressions in conditions
|
|
195
|
-
*/
|
|
196
|
-
noConstantCondition?: NoConstantConditionConfiguration | null;
|
|
197
|
-
/**
|
|
198
|
-
* Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant.
|
|
199
|
-
*/
|
|
200
|
-
noConstantMathMinMaxClamp?: NoConstantMathMinMaxClampConfiguration | null;
|
|
201
|
-
/**
|
|
202
|
-
* Disallow returning a value from a constructor.
|
|
203
|
-
*/
|
|
204
|
-
noConstructorReturn?: NoConstructorReturnConfiguration | null;
|
|
205
|
-
/**
|
|
206
|
-
* Disallow empty character classes in regular expression literals.
|
|
207
|
-
*/
|
|
208
|
-
noEmptyCharacterClassInRegex?: NoEmptyCharacterClassInRegexConfiguration | null;
|
|
209
|
-
/**
|
|
210
|
-
* Disallows empty destructuring patterns.
|
|
211
|
-
*/
|
|
212
|
-
noEmptyPattern?: NoEmptyPatternConfiguration | null;
|
|
213
|
-
/**
|
|
214
|
-
* Disallow the use of __dirname and __filename in the global scope.
|
|
215
|
-
*/
|
|
216
|
-
noGlobalDirnameFilename?: NoGlobalDirnameFilenameConfiguration | null;
|
|
217
|
-
/**
|
|
218
|
-
* Disallow calling global object properties as functions
|
|
219
|
-
*/
|
|
220
|
-
noGlobalObjectCalls?: NoGlobalObjectCallsConfiguration | null;
|
|
221
|
-
/**
|
|
222
|
-
* Disallow function and var declarations that are accessible outside their block.
|
|
223
|
-
*/
|
|
224
|
-
noInnerDeclarations?: NoInnerDeclarationsConfiguration | null;
|
|
225
|
-
/**
|
|
226
|
-
* Ensure that builtins are correctly instantiated.
|
|
227
|
-
*/
|
|
228
|
-
noInvalidBuiltinInstantiation?: NoInvalidBuiltinInstantiationConfiguration | null;
|
|
229
|
-
/**
|
|
230
|
-
* Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.
|
|
231
|
-
*/
|
|
232
|
-
noInvalidConstructorSuper?: NoInvalidConstructorSuperConfiguration | null;
|
|
233
|
-
/**
|
|
234
|
-
* Disallow non-standard direction values for linear gradient functions.
|
|
235
|
-
*/
|
|
236
|
-
noInvalidDirectionInLinearGradient?: NoInvalidDirectionInLinearGradientConfiguration | null;
|
|
237
|
-
/**
|
|
238
|
-
* Disallows invalid named grid areas in CSS Grid Layouts.
|
|
239
|
-
*/
|
|
240
|
-
noInvalidGridAreas?: NoInvalidGridAreasConfiguration | null;
|
|
241
|
-
/**
|
|
242
|
-
* Disallow the use of @import at-rules in invalid positions.
|
|
243
|
-
*/
|
|
244
|
-
noInvalidPositionAtImportRule?: NoInvalidPositionAtImportRuleConfiguration | null;
|
|
245
|
-
/**
|
|
246
|
-
* Disallow the use of variables and function parameters before their declaration
|
|
247
|
-
*/
|
|
248
|
-
noInvalidUseBeforeDeclaration?: NoInvalidUseBeforeDeclarationConfiguration | null;
|
|
249
|
-
/**
|
|
250
|
-
* Disallow missing var function for css variables.
|
|
251
|
-
*/
|
|
252
|
-
noMissingVarFunction?: NoMissingVarFunctionConfiguration | null;
|
|
253
|
-
/**
|
|
254
|
-
* Disallows defining React components inside other components.
|
|
255
|
-
*/
|
|
256
|
-
noNestedComponentDefinitions?: NoNestedComponentDefinitionsConfiguration | null;
|
|
257
|
-
/**
|
|
258
|
-
* Forbid the use of Node.js builtin modules.
|
|
259
|
-
*/
|
|
260
|
-
noNodejsModules?: NoNodejsModulesConfiguration | null;
|
|
261
|
-
/**
|
|
262
|
-
* Disallow \8 and \9 escape sequences in string literals.
|
|
263
|
-
*/
|
|
264
|
-
noNonoctalDecimalEscape?: NoNonoctalDecimalEscapeConfiguration | null;
|
|
265
|
-
/**
|
|
266
|
-
* Disallow literal numbers that lose precision
|
|
267
|
-
*/
|
|
268
|
-
noPrecisionLoss?: NoPrecisionLossConfiguration | null;
|
|
269
|
-
/**
|
|
270
|
-
* Restrict imports of private exports.
|
|
271
|
-
*/
|
|
272
|
-
noPrivateImports?: NoPrivateImportsConfiguration | null;
|
|
273
|
-
/**
|
|
274
|
-
* Disallow the use of process global.
|
|
275
|
-
*/
|
|
276
|
-
noProcessGlobal?: NoProcessGlobalConfiguration | null;
|
|
277
|
-
/**
|
|
278
|
-
* Disallow assigning to React component props.
|
|
279
|
-
*/
|
|
280
|
-
noReactPropAssignments?: NoReactPropAssignmentsConfiguration | null;
|
|
281
|
-
/**
|
|
282
|
-
* Prevent the usage of the return value of React.render.
|
|
283
|
-
*/
|
|
284
|
-
noRenderReturnValue?: NoRenderReturnValueConfiguration | null;
|
|
285
|
-
/**
|
|
286
|
-
* Disallow the use of configured elements.
|
|
287
|
-
*/
|
|
288
|
-
noRestrictedElements?: NoRestrictedElementsConfiguration | null;
|
|
289
|
-
/**
|
|
290
|
-
* Disallow assignments where both sides are exactly the same.
|
|
291
|
-
*/
|
|
292
|
-
noSelfAssign?: NoSelfAssignConfiguration | null;
|
|
293
|
-
/**
|
|
294
|
-
* Disallow returning a value from a setter
|
|
295
|
-
*/
|
|
296
|
-
noSetterReturn?: NoSetterReturnConfiguration | null;
|
|
297
|
-
/**
|
|
298
|
-
* Disallow destructuring props inside JSX components in Solid projects.
|
|
299
|
-
*/
|
|
300
|
-
noSolidDestructuredProps?: NoSolidDestructuredPropsConfiguration | null;
|
|
301
|
-
/**
|
|
302
|
-
* Disallow comparison of expressions modifying the string case with non-compliant value.
|
|
303
|
-
*/
|
|
304
|
-
noStringCaseMismatch?: NoStringCaseMismatchConfiguration | null;
|
|
305
|
-
/**
|
|
306
|
-
* Disallow lexical declarations in switch clauses.
|
|
307
|
-
*/
|
|
308
|
-
noSwitchDeclarations?: NoSwitchDeclarationsConfiguration | null;
|
|
309
|
-
/**
|
|
310
|
-
* Disallow the use of dependencies that aren't specified in the package.json.
|
|
311
|
-
*/
|
|
312
|
-
noUndeclaredDependencies?: NoUndeclaredDependenciesConfiguration | null;
|
|
313
|
-
/**
|
|
314
|
-
* Prevents the usage of variables that haven't been declared inside the document.
|
|
315
|
-
*/
|
|
316
|
-
noUndeclaredVariables?: NoUndeclaredVariablesConfiguration | null;
|
|
317
|
-
/**
|
|
318
|
-
* Disallow unknown CSS value functions.
|
|
319
|
-
*/
|
|
320
|
-
noUnknownFunction?: NoUnknownFunctionConfiguration | null;
|
|
321
|
-
/**
|
|
322
|
-
* Disallow unknown media feature names.
|
|
323
|
-
*/
|
|
324
|
-
noUnknownMediaFeatureName?: NoUnknownMediaFeatureNameConfiguration | null;
|
|
325
|
-
/**
|
|
326
|
-
* Disallow unknown properties.
|
|
327
|
-
*/
|
|
328
|
-
noUnknownProperty?: NoUnknownPropertyConfiguration | null;
|
|
329
|
-
/**
|
|
330
|
-
* Disallow unknown pseudo-class selectors.
|
|
331
|
-
*/
|
|
332
|
-
noUnknownPseudoClass?: NoUnknownPseudoClassConfiguration | null;
|
|
333
|
-
/**
|
|
334
|
-
* Disallow unknown pseudo-element selectors.
|
|
335
|
-
*/
|
|
336
|
-
noUnknownPseudoElement?: NoUnknownPseudoElementConfiguration | null;
|
|
337
|
-
/**
|
|
338
|
-
* Disallow unknown type selectors.
|
|
339
|
-
*/
|
|
340
|
-
noUnknownTypeSelector?: NoUnknownTypeSelectorConfiguration | null;
|
|
341
|
-
/**
|
|
342
|
-
* Disallow unknown CSS units.
|
|
343
|
-
*/
|
|
344
|
-
noUnknownUnit?: NoUnknownUnitConfiguration | null;
|
|
345
|
-
/**
|
|
346
|
-
* Disallow unmatchable An+B selectors.
|
|
347
|
-
*/
|
|
348
|
-
noUnmatchableAnbSelector?: NoUnmatchableAnbSelectorConfiguration | null;
|
|
349
|
-
/**
|
|
350
|
-
* Disallow unreachable code
|
|
351
|
-
*/
|
|
352
|
-
noUnreachable?: NoUnreachableConfiguration | null;
|
|
353
|
-
/**
|
|
354
|
-
* 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
|
|
355
|
-
*/
|
|
356
|
-
noUnreachableSuper?: NoUnreachableSuperConfiguration | null;
|
|
357
|
-
/**
|
|
358
|
-
* Disallow control flow statements in finally blocks.
|
|
359
|
-
*/
|
|
360
|
-
noUnsafeFinally?: NoUnsafeFinallyConfiguration | null;
|
|
361
|
-
/**
|
|
362
|
-
* Disallow the use of optional chaining in contexts where the undefined value is not allowed.
|
|
363
|
-
*/
|
|
364
|
-
noUnsafeOptionalChaining?: NoUnsafeOptionalChainingConfiguration | null;
|
|
365
|
-
/**
|
|
366
|
-
* Disallow unused function parameters.
|
|
367
|
-
*/
|
|
368
|
-
noUnusedFunctionParameters?: NoUnusedFunctionParametersConfiguration | null;
|
|
369
|
-
/**
|
|
370
|
-
* Disallow unused imports.
|
|
371
|
-
*/
|
|
372
|
-
noUnusedImports?: NoUnusedImportsConfiguration | null;
|
|
373
|
-
/**
|
|
374
|
-
* Disallow unused labels.
|
|
375
|
-
*/
|
|
376
|
-
noUnusedLabels?: NoUnusedLabelsConfiguration | null;
|
|
377
|
-
/**
|
|
378
|
-
* Disallow unused private class members
|
|
379
|
-
*/
|
|
380
|
-
noUnusedPrivateClassMembers?: NoUnusedPrivateClassMembersConfiguration | null;
|
|
381
|
-
/**
|
|
382
|
-
* Disallow unused variables.
|
|
383
|
-
*/
|
|
384
|
-
noUnusedVariables?: NoUnusedVariablesConfiguration | null;
|
|
385
|
-
/**
|
|
386
|
-
* This rules prevents void elements (AKA self-closing elements) from having children.
|
|
387
|
-
*/
|
|
388
|
-
noVoidElementsWithChildren?: NoVoidElementsWithChildrenConfiguration | null;
|
|
389
|
-
/**
|
|
390
|
-
* Disallow returning a value from a function with the return type 'void'
|
|
391
|
-
*/
|
|
392
|
-
noVoidTypeReturn?: NoVoidTypeReturnConfiguration | null;
|
|
393
|
-
/**
|
|
394
|
-
* Enables the recommended rules for this group
|
|
395
|
-
*/
|
|
396
|
-
recommended?: boolean | null;
|
|
397
|
-
/**
|
|
398
|
-
* Enforce all dependencies are correctly specified in a React hook.
|
|
399
|
-
*/
|
|
400
|
-
useExhaustiveDependencies?: UseExhaustiveDependenciesConfiguration | null;
|
|
401
|
-
/**
|
|
402
|
-
* Enforce specifying the name of GraphQL operations.
|
|
403
|
-
*/
|
|
404
|
-
useGraphqlNamedOperations?: UseGraphqlNamedOperationsConfiguration | null;
|
|
405
|
-
/**
|
|
406
|
-
* Enforce that all React hooks are being called from the Top Level component functions.
|
|
407
|
-
*/
|
|
408
|
-
useHookAtTopLevel?: UseHookAtTopLevelConfiguration | null;
|
|
409
|
-
/**
|
|
410
|
-
* Enforce file extensions for relative imports.
|
|
411
|
-
*/
|
|
412
|
-
useImportExtensions?: UseImportExtensionsConfiguration | null;
|
|
413
|
-
/**
|
|
414
|
-
* Require calls to isNaN() when checking for NaN.
|
|
415
|
-
*/
|
|
416
|
-
useIsNan?: UseIsNanConfiguration | null;
|
|
417
|
-
/**
|
|
418
|
-
* Enforces the use of with { type: "json" } for JSON module imports.
|
|
419
|
-
*/
|
|
420
|
-
useJsonImportAttributes?: UseJsonImportAttributesConfiguration | null;
|
|
421
|
-
/**
|
|
422
|
-
* Disallow missing key props in iterators/collection literals.
|
|
423
|
-
*/
|
|
424
|
-
useJsxKeyInIterable?: UseJsxKeyInIterableConfiguration | null;
|
|
425
|
-
/**
|
|
426
|
-
* Enforce the consistent use of the radix argument when using parseInt().
|
|
427
|
-
*/
|
|
428
|
-
useParseIntRadix?: UseParseIntRadixConfiguration | null;
|
|
429
|
-
/**
|
|
430
|
-
* Enforce JSDoc comment lines to start with a single asterisk, except for the first one.
|
|
431
|
-
*/
|
|
432
|
-
useSingleJsDocAsterisk?: UseSingleJsDocAsteriskConfiguration | null;
|
|
433
|
-
/**
|
|
434
|
-
* Prevent the usage of static string literal id attribute on elements.
|
|
435
|
-
*/
|
|
436
|
-
useUniqueElementIds?: UseUniqueElementIdsConfiguration | null;
|
|
437
|
-
/**
|
|
438
|
-
* Enforce "for" loop update clause moving the counter in the right direction.
|
|
439
|
-
*/
|
|
440
|
-
useValidForDirection?: UseValidForDirectionConfiguration | null;
|
|
441
|
-
/**
|
|
442
|
-
* This rule checks that the result of a typeof expression is compared to a valid value.
|
|
443
|
-
*/
|
|
444
|
-
useValidTypeof?: UseValidTypeofConfiguration | null;
|
|
445
|
-
/**
|
|
446
|
-
* Require generator functions to contain yield.
|
|
447
|
-
*/
|
|
448
|
-
useYield?: UseYieldConfiguration | null;
|
|
449
|
-
}
|
|
450
|
-
export type SeverityOrGroupFor_Nursery = GroupPlainConfiguration | Nursery;
|
|
451
|
-
export interface RuleWithUseNamingConventionOptions {
|
|
452
|
-
/**
|
|
453
|
-
* The kind of the code actions emitted by the rule
|
|
454
|
-
*/
|
|
455
|
-
fix?: FixKind | null;
|
|
456
|
-
/**
|
|
457
|
-
* The severity of the emitted diagnostics by the rule
|
|
458
|
-
*/
|
|
459
|
-
level: RulePlainConfiguration;
|
|
460
|
-
/**
|
|
461
|
-
* Rule's options
|
|
462
|
-
*/
|
|
463
|
-
options: UseNamingConventionOptions;
|
|
464
|
-
}
|
|
465
|
-
export type ImportGroup = null | GroupMatcher | GroupMatcher[];
|
|
466
|
-
export interface NoRestrictedImportsOptions {
|
|
467
|
-
/**
|
|
468
|
-
* A list of import paths that should trigger the rule.
|
|
469
|
-
*/
|
|
470
|
-
paths?: {
|
|
471
|
-
[k: string]: Paths;
|
|
472
|
-
};
|
|
473
|
-
/**
|
|
474
|
-
* gitignore-style patterns that should trigger the rule.
|
|
475
|
-
*/
|
|
476
|
-
patterns?: Patterns[] | null;
|
|
477
|
-
}
|
|
478
|
-
export type SeverityOrGroupFor_Correctness = GroupPlainConfiguration | Correctness;
|
|
479
|
-
export type UseNamingConventionConfiguration = RulePlainConfiguration | RuleWithUseNamingConventionOptions;
|
|
480
|
-
export type ImportGroups = ImportGroup[];
|
|
481
|
-
export interface RuleWithNoRestrictedImportsOptions {
|
|
482
|
-
/**
|
|
483
|
-
* The severity of the emitted diagnostics by the rule
|
|
484
|
-
*/
|
|
485
|
-
level: RulePlainConfiguration;
|
|
486
|
-
/**
|
|
487
|
-
* Rule's options
|
|
488
|
-
*/
|
|
489
|
-
options: NoRestrictedImportsOptions;
|
|
490
|
-
}
|
|
491
|
-
export interface OrganizeImportsOptions {
|
|
492
|
-
groups?: ImportGroups;
|
|
493
|
-
identifierOrder?: SortOrder & string;
|
|
494
|
-
}
|
|
495
|
-
export type NoRestrictedImportsConfiguration = RulePlainConfiguration | RuleWithNoRestrictedImportsOptions;
|
|
496
|
-
export interface RuleAssistWithOptionsFor_OrganizeImportsOptions {
|
|
497
|
-
/**
|
|
498
|
-
* The severity of the emitted diagnostics by the rule
|
|
499
|
-
*/
|
|
500
|
-
level: RuleAssistPlainConfiguration;
|
|
501
|
-
/**
|
|
502
|
-
* Rule's options
|
|
503
|
-
*/
|
|
504
|
-
options: OrganizeImportsOptions;
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* A list of rules that belong to this group
|
|
508
|
-
*/
|
|
509
|
-
export interface Style {
|
|
510
|
-
/**
|
|
511
|
-
* Disallow use of CommonJs module system in favor of ESM style imports.
|
|
512
|
-
*/
|
|
513
|
-
noCommonJs?: NoCommonJsConfiguration | null;
|
|
514
|
-
/**
|
|
515
|
-
* Disallow default exports.
|
|
516
|
-
*/
|
|
517
|
-
noDefaultExport?: NoDefaultExportConfiguration | null;
|
|
518
|
-
/**
|
|
519
|
-
* Disallow a lower specificity selector from coming after a higher specificity selector.
|
|
520
|
-
*/
|
|
521
|
-
noDescendingSpecificity?: NoDescendingSpecificityConfiguration | null;
|
|
522
|
-
/**
|
|
523
|
-
* Disallow using a callback in asynchronous tests and hooks.
|
|
524
|
-
*/
|
|
525
|
-
noDoneCallback?: NoDoneCallbackConfiguration | null;
|
|
526
|
-
/**
|
|
527
|
-
* Disallow TypeScript enum.
|
|
528
|
-
*/
|
|
529
|
-
noEnum?: NoEnumConfiguration | null;
|
|
530
|
-
/**
|
|
531
|
-
* Disallow exporting an imported variable.
|
|
532
|
-
*/
|
|
533
|
-
noExportedImports?: NoExportedImportsConfiguration | null;
|
|
534
|
-
/**
|
|
535
|
-
* Prevent usage of \<head> element in a Next.js project.
|
|
536
|
-
*/
|
|
537
|
-
noHeadElement?: NoHeadElementConfiguration | null;
|
|
538
|
-
/**
|
|
539
|
-
* Disallow implicit true values on JSX boolean attributes
|
|
540
|
-
*/
|
|
541
|
-
noImplicitBoolean?: NoImplicitBooleanConfiguration | null;
|
|
542
|
-
/**
|
|
543
|
-
* Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.
|
|
544
|
-
*/
|
|
545
|
-
noInferrableTypes?: NoInferrableTypesConfiguration | null;
|
|
546
|
-
/**
|
|
547
|
-
* Reports usage of "magic numbers" — numbers used directly instead of being assigned to named constants.
|
|
548
|
-
*/
|
|
549
|
-
noMagicNumbers?: NoMagicNumbersConfiguration | null;
|
|
550
|
-
/**
|
|
551
|
-
* Disallow the use of TypeScript's namespaces.
|
|
552
|
-
*/
|
|
553
|
-
noNamespace?: NoNamespaceConfiguration | null;
|
|
554
|
-
/**
|
|
555
|
-
* Disallow negation in the condition of an if statement if it has an else clause.
|
|
556
|
-
*/
|
|
557
|
-
noNegationElse?: NoNegationElseConfiguration | null;
|
|
558
|
-
/**
|
|
559
|
-
* Disallow nested ternary expressions.
|
|
560
|
-
*/
|
|
561
|
-
noNestedTernary?: NoNestedTernaryConfiguration | null;
|
|
562
|
-
/**
|
|
563
|
-
* Disallow non-null assertions using the ! postfix operator.
|
|
564
|
-
*/
|
|
565
|
-
noNonNullAssertion?: NoNonNullAssertionConfiguration | null;
|
|
566
|
-
/**
|
|
567
|
-
* Disallow reassigning function parameters.
|
|
568
|
-
*/
|
|
569
|
-
noParameterAssign?: NoParameterAssignConfiguration | null;
|
|
570
|
-
/**
|
|
571
|
-
* Disallow the use of parameter properties in class constructors.
|
|
572
|
-
*/
|
|
573
|
-
noParameterProperties?: NoParameterPropertiesConfiguration | null;
|
|
574
|
-
/**
|
|
575
|
-
* Disallow the use of process.env.
|
|
576
|
-
*/
|
|
577
|
-
noProcessEnv?: NoProcessEnvConfiguration | null;
|
|
578
|
-
/**
|
|
579
|
-
* This rule allows you to specify global variable names that you don’t want to use in your application.
|
|
580
|
-
*/
|
|
581
|
-
noRestrictedGlobals?: NoRestrictedGlobalsConfiguration | null;
|
|
582
|
-
/**
|
|
583
|
-
* Disallow specified modules when loaded by import or require.
|
|
584
|
-
*/
|
|
585
|
-
noRestrictedImports?: NoRestrictedImportsConfiguration | null;
|
|
586
|
-
/**
|
|
587
|
-
* Disallow user defined types.
|
|
588
|
-
*/
|
|
589
|
-
noRestrictedTypes?: NoRestrictedTypesConfiguration | null;
|
|
590
|
-
/**
|
|
591
|
-
* Disallow the use of constants which its value is the upper-case version of its name.
|
|
592
|
-
*/
|
|
593
|
-
noShoutyConstants?: NoShoutyConstantsConfiguration | null;
|
|
594
|
-
/**
|
|
595
|
-
* Enforce the use of String.slice() over String.substr() and String.substring().
|
|
596
|
-
*/
|
|
597
|
-
noSubstr?: NoSubstrConfiguration | null;
|
|
598
|
-
/**
|
|
599
|
-
* Disallow template literals if interpolation and special-character handling are not needed
|
|
600
|
-
*/
|
|
601
|
-
noUnusedTemplateLiteral?: NoUnusedTemplateLiteralConfiguration | null;
|
|
602
|
-
/**
|
|
603
|
-
* Disallow else block when the if block breaks early.
|
|
604
|
-
*/
|
|
605
|
-
noUselessElse?: NoUselessElseConfiguration | null;
|
|
606
|
-
/**
|
|
607
|
-
* Disallow use of @value rule in css modules.
|
|
608
|
-
*/
|
|
609
|
-
noValueAtRule?: NoValueAtRuleConfiguration | null;
|
|
610
|
-
/**
|
|
611
|
-
* Disallow the use of yoda expressions.
|
|
612
|
-
*/
|
|
613
|
-
noYodaExpression?: NoYodaExpressionConfiguration | null;
|
|
614
|
-
/**
|
|
615
|
-
* Enables the recommended rules for this group
|
|
616
|
-
*/
|
|
617
|
-
recommended?: boolean | null;
|
|
618
|
-
/**
|
|
619
|
-
* Disallow Array constructors.
|
|
620
|
-
*/
|
|
621
|
-
useArrayLiterals?: UseArrayLiteralsConfiguration | null;
|
|
622
|
-
/**
|
|
623
|
-
* Enforce the use of as const over literal type and type annotation.
|
|
624
|
-
*/
|
|
625
|
-
useAsConstAssertion?: UseAsConstAssertionConfiguration | null;
|
|
626
|
-
/**
|
|
627
|
-
* Use at() instead of integer index access.
|
|
628
|
-
*/
|
|
629
|
-
useAtIndex?: UseAtIndexConfiguration | null;
|
|
630
|
-
/**
|
|
631
|
-
* Requires following curly brace conventions.
|
|
632
|
-
*/
|
|
633
|
-
useBlockStatements?: UseBlockStatementsConfiguration | null;
|
|
634
|
-
/**
|
|
635
|
-
* Enforce using else if instead of nested if in else clauses.
|
|
636
|
-
*/
|
|
637
|
-
useCollapsedElseIf?: UseCollapsedElseIfConfiguration | null;
|
|
638
|
-
/**
|
|
639
|
-
* Enforce using single if instead of nested if clauses.
|
|
640
|
-
*/
|
|
641
|
-
useCollapsedIf?: UseCollapsedIfConfiguration | null;
|
|
642
|
-
/**
|
|
643
|
-
* Enforce declaring components only within modules that export React Components exclusively.
|
|
644
|
-
*/
|
|
645
|
-
useComponentExportOnlyModules?: UseComponentExportOnlyModulesConfiguration | null;
|
|
646
|
-
/**
|
|
647
|
-
* Require consistently using either T\[] or Array\<T>
|
|
648
|
-
*/
|
|
649
|
-
useConsistentArrayType?: UseConsistentArrayTypeConfiguration | null;
|
|
650
|
-
/**
|
|
651
|
-
* Enforce the use of new for all builtins, except String, Number and Boolean.
|
|
652
|
-
*/
|
|
653
|
-
useConsistentBuiltinInstantiation?: UseConsistentBuiltinInstantiationConfiguration | null;
|
|
654
|
-
/**
|
|
655
|
-
* This rule enforces consistent use of curly braces inside JSX attributes and JSX children.
|
|
656
|
-
*/
|
|
657
|
-
useConsistentCurlyBraces?: UseConsistentCurlyBracesConfiguration | null;
|
|
658
|
-
/**
|
|
659
|
-
* Require consistent accessibility modifiers on class properties and methods.
|
|
660
|
-
*/
|
|
661
|
-
useConsistentMemberAccessibility?: UseConsistentMemberAccessibilityConfiguration | null;
|
|
662
|
-
/**
|
|
663
|
-
* Require the consistent declaration of object literals. Defaults to explicit definitions.
|
|
664
|
-
*/
|
|
665
|
-
useConsistentObjectDefinitions?: UseConsistentObjectDefinitionsConfiguration | null;
|
|
666
|
-
/**
|
|
667
|
-
* Require const declarations for variables that are only assigned once.
|
|
668
|
-
*/
|
|
669
|
-
useConst?: UseConstConfiguration | null;
|
|
670
|
-
/**
|
|
671
|
-
* Enforce default function parameters and optional function parameters to be last.
|
|
672
|
-
*/
|
|
673
|
-
useDefaultParameterLast?: UseDefaultParameterLastConfiguration | null;
|
|
674
|
-
/**
|
|
675
|
-
* Require the default clause in switch statements.
|
|
676
|
-
*/
|
|
677
|
-
useDefaultSwitchClause?: UseDefaultSwitchClauseConfiguration | null;
|
|
678
|
-
/**
|
|
679
|
-
* Require specifying the reason argument when using @deprecated directive
|
|
680
|
-
*/
|
|
681
|
-
useDeprecatedReason?: UseDeprecatedReasonConfiguration | null;
|
|
682
|
-
/**
|
|
683
|
-
* Require that each enum member value be explicitly initialized.
|
|
684
|
-
*/
|
|
685
|
-
useEnumInitializers?: UseEnumInitializersConfiguration | null;
|
|
686
|
-
/**
|
|
687
|
-
* Enforce explicitly comparing the length, size, byteLength or byteOffset property of a value.
|
|
688
|
-
*/
|
|
689
|
-
useExplicitLengthCheck?: UseExplicitLengthCheckConfiguration | null;
|
|
690
|
-
/**
|
|
691
|
-
* Disallow the use of Math.pow in favor of the ** operator.
|
|
692
|
-
*/
|
|
693
|
-
useExponentiationOperator?: UseExponentiationOperatorConfiguration | null;
|
|
694
|
-
/**
|
|
695
|
-
* Promotes the use of export type for types.
|
|
696
|
-
*/
|
|
697
|
-
useExportType?: UseExportTypeConfiguration | null;
|
|
698
|
-
/**
|
|
699
|
-
* Require that all exports are declared after all non-export statements.
|
|
700
|
-
*/
|
|
701
|
-
useExportsLast?: UseExportsLastConfiguration | null;
|
|
702
|
-
/**
|
|
703
|
-
* Enforce naming conventions for JavaScript and TypeScript filenames.
|
|
704
|
-
*/
|
|
705
|
-
useFilenamingConvention?: UseFilenamingConventionConfiguration | null;
|
|
706
|
-
/**
|
|
707
|
-
* Prefer using for...of loops over standard for loops where possible.
|
|
708
|
-
*/
|
|
709
|
-
useForOf?: UseForOfConfiguration | null;
|
|
710
|
-
/**
|
|
711
|
-
* This rule enforces the use of \<>...\</> over \<Fragment>...\</Fragment>.
|
|
712
|
-
*/
|
|
713
|
-
useFragmentSyntax?: UseFragmentSyntaxConfiguration | null;
|
|
714
|
-
/**
|
|
715
|
-
* Validates that all enum values are capitalized.
|
|
716
|
-
*/
|
|
717
|
-
useGraphqlNamingConvention?: UseGraphqlNamingConventionConfiguration | null;
|
|
718
|
-
/**
|
|
719
|
-
* Enforce that getters and setters for the same property are adjacent in class and object definitions.
|
|
720
|
-
*/
|
|
721
|
-
useGroupedAccessorPairs?: UseGroupedAccessorPairsConfiguration | null;
|
|
722
|
-
/**
|
|
723
|
-
* Promotes the use of import type for types.
|
|
724
|
-
*/
|
|
725
|
-
useImportType?: UseImportTypeConfiguration | null;
|
|
726
|
-
/**
|
|
727
|
-
* Require all enum members to be literal values.
|
|
728
|
-
*/
|
|
729
|
-
useLiteralEnumMembers?: UseLiteralEnumMembersConfiguration | null;
|
|
730
|
-
/**
|
|
731
|
-
* Enforce naming conventions for everything across a codebase.
|
|
732
|
-
*/
|
|
733
|
-
useNamingConvention?: UseNamingConventionConfiguration | null;
|
|
734
|
-
/**
|
|
735
|
-
* Promotes the usage of node:assert/strict over node:assert.
|
|
736
|
-
*/
|
|
737
|
-
useNodeAssertStrict?: UseNodeAssertStrictConfiguration | null;
|
|
738
|
-
/**
|
|
739
|
-
* Enforces using the node: protocol for Node.js builtin modules.
|
|
740
|
-
*/
|
|
741
|
-
useNodejsImportProtocol?: UseNodejsImportProtocolConfiguration | null;
|
|
742
|
-
/**
|
|
743
|
-
* Use the Number properties instead of global ones.
|
|
744
|
-
*/
|
|
745
|
-
useNumberNamespace?: UseNumberNamespaceConfiguration | null;
|
|
746
|
-
/**
|
|
747
|
-
* Enforce the use of numeric separators in numeric literals.
|
|
748
|
-
*/
|
|
749
|
-
useNumericSeparators?: UseNumericSeparatorsConfiguration | null;
|
|
750
|
-
/**
|
|
751
|
-
* Prefer object spread over Object.assign() when constructing new objects.
|
|
752
|
-
*/
|
|
753
|
-
useObjectSpread?: UseObjectSpreadConfiguration | null;
|
|
754
|
-
/**
|
|
755
|
-
* Enforce marking members as readonly if they are never modified outside the constructor.
|
|
756
|
-
*/
|
|
757
|
-
useReadonlyClassProperties?: UseReadonlyClassPropertiesConfiguration | null;
|
|
758
|
-
/**
|
|
759
|
-
* Prevent extra closing tags for components without children.
|
|
760
|
-
*/
|
|
761
|
-
useSelfClosingElements?: UseSelfClosingElementsConfiguration | null;
|
|
762
|
-
/**
|
|
763
|
-
* Require assignment operator shorthand where possible.
|
|
764
|
-
*/
|
|
765
|
-
useShorthandAssign?: UseShorthandAssignConfiguration | null;
|
|
766
|
-
/**
|
|
767
|
-
* Enforce using function types instead of object type with call signatures.
|
|
768
|
-
*/
|
|
769
|
-
useShorthandFunctionType?: UseShorthandFunctionTypeConfiguration | null;
|
|
770
|
-
/**
|
|
771
|
-
* Disallow multiple variable declarations in the same variable statement
|
|
772
|
-
*/
|
|
773
|
-
useSingleVarDeclarator?: UseSingleVarDeclaratorConfiguration | null;
|
|
774
|
-
/**
|
|
775
|
-
* Require a description parameter for the Symbol().
|
|
776
|
-
*/
|
|
777
|
-
useSymbolDescription?: UseSymbolDescriptionConfiguration | null;
|
|
778
|
-
/**
|
|
779
|
-
* Prefer template literals over string concatenation.
|
|
780
|
-
*/
|
|
781
|
-
useTemplate?: UseTemplateConfiguration | null;
|
|
782
|
-
/**
|
|
783
|
-
* Require new when throwing an error.
|
|
784
|
-
*/
|
|
785
|
-
useThrowNewError?: UseThrowNewErrorConfiguration | null;
|
|
786
|
-
/**
|
|
787
|
-
* Disallow throwing non-Error values.
|
|
788
|
-
*/
|
|
789
|
-
useThrowOnlyError?: UseThrowOnlyErrorConfiguration | null;
|
|
790
|
-
/**
|
|
791
|
-
* Enforce the use of String.trimStart() and String.trimEnd() over String.trimLeft() and String.trimRight().
|
|
792
|
-
*/
|
|
793
|
-
useTrimStartEnd?: UseTrimStartEndConfiguration | null;
|
|
794
|
-
/**
|
|
795
|
-
* Disallow overload signatures that can be unified into a single signature.
|
|
796
|
-
*/
|
|
797
|
-
useUnifiedTypeSignatures?: UseUnifiedTypeSignaturesConfiguration | null;
|
|
798
|
-
}
|
|
799
|
-
export type RuleAssistConfigurationFor_OrganizeImportsOptions = RuleAssistPlainConfiguration | RuleAssistWithOptionsFor_OrganizeImportsOptions;
|
|
800
|
-
export type SeverityOrGroupFor_Style = GroupPlainConfiguration | Style;
|
|
801
|
-
/**
|
|
802
|
-
* A list of rules that belong to this group
|
|
803
|
-
*/
|
|
804
|
-
export interface Source {
|
|
805
|
-
/**
|
|
806
|
-
* Provides a code action to sort the imports and exports in the file using a built-in or custom order.
|
|
807
|
-
*/
|
|
808
|
-
organizeImports?: RuleAssistConfigurationFor_OrganizeImportsOptions | null;
|
|
809
|
-
/**
|
|
810
|
-
* Enables the recommended rules for this group
|
|
811
|
-
*/
|
|
812
|
-
recommended?: boolean | null;
|
|
813
|
-
/**
|
|
814
|
-
* Enforce attribute sorting in JSX elements.
|
|
815
|
-
*/
|
|
816
|
-
useSortedAttributes?: RuleAssistConfigurationFor_UseSortedAttributesOptions | null;
|
|
817
|
-
/**
|
|
818
|
-
* Sort the keys of a JSON object in natural order.
|
|
819
|
-
*/
|
|
820
|
-
useSortedKeys?: RuleAssistConfigurationFor_UseSortedKeysOptions | null;
|
|
821
|
-
/**
|
|
822
|
-
* Enforce ordering of CSS properties and nested rules.
|
|
823
|
-
*/
|
|
824
|
-
useSortedProperties?: RuleAssistConfigurationFor_UseSortedPropertiesOptions | null;
|
|
825
|
-
}
|
|
826
|
-
export interface Rules {
|
|
827
|
-
a11y?: SeverityOrGroupFor_A11Y | null;
|
|
828
|
-
complexity?: SeverityOrGroupFor_Complexity | null;
|
|
829
|
-
correctness?: SeverityOrGroupFor_Correctness | null;
|
|
830
|
-
nursery?: SeverityOrGroupFor_Nursery | null;
|
|
831
|
-
performance?: SeverityOrGroupFor_Performance | null;
|
|
832
|
-
/**
|
|
833
|
-
* It enables the lint rules recommended by Biome. `true` by default.
|
|
834
|
-
*/
|
|
835
|
-
recommended?: boolean | null;
|
|
836
|
-
security?: SeverityOrGroupFor_Security | null;
|
|
837
|
-
style?: SeverityOrGroupFor_Style | null;
|
|
838
|
-
suspicious?: SeverityOrGroupFor_Suspicious | null;
|
|
839
|
-
}
|
|
840
|
-
export interface Actions {
|
|
841
|
-
/**
|
|
842
|
-
* It enables the assist actions recommended by Biome. `true` by default.
|
|
843
|
-
*/
|
|
844
|
-
recommended?: boolean | null;
|
|
845
|
-
source?: Source | null;
|
|
846
|
-
}
|
|
847
|
-
export interface LinterConfiguration {
|
|
848
|
-
/**
|
|
849
|
-
* An object where the keys are the names of the domains, and the values are `all`, `recommended`, or `none`.
|
|
850
|
-
*/
|
|
851
|
-
domains?: RuleDomains | null;
|
|
852
|
-
/**
|
|
853
|
-
* if `false`, it disables the feature and the linter won't be executed. `true` by default
|
|
854
|
-
*/
|
|
855
|
-
enabled?: Bool | null;
|
|
856
|
-
/**
|
|
857
|
-
* A list of glob patterns. The analyzer will handle only those files/folders that will match these patterns.
|
|
858
|
-
*/
|
|
859
|
-
includes?: NormalizedGlob[] | null;
|
|
860
|
-
/**
|
|
861
|
-
* List of rules
|
|
862
|
-
*/
|
|
863
|
-
rules?: Rules | null;
|
|
864
|
-
}
|
|
865
|
-
export interface OverrideLinterConfiguration {
|
|
866
|
-
/**
|
|
867
|
-
* List of rules
|
|
868
|
-
*/
|
|
869
|
-
domains?: RuleDomains | null;
|
|
870
|
-
/**
|
|
871
|
-
* if `false`, it disables the feature and the linter won't be executed. `true` by default
|
|
872
|
-
*/
|
|
873
|
-
enabled?: Bool | null;
|
|
874
|
-
/**
|
|
875
|
-
* List of rules
|
|
876
|
-
*/
|
|
877
|
-
rules?: Rules | null;
|
|
878
|
-
}
|
|
879
|
-
export interface AssistConfiguration {
|
|
880
|
-
/**
|
|
881
|
-
* Whether Biome should fail in CLI if the assist were not applied to the code.
|
|
882
|
-
*/
|
|
883
|
-
actions?: Actions | null;
|
|
884
|
-
/**
|
|
885
|
-
* Whether Biome should enable assist via LSP and CLI.
|
|
886
|
-
*/
|
|
887
|
-
enabled?: Bool | null;
|
|
888
|
-
/**
|
|
889
|
-
* A list of glob patterns. Biome will include files/folders that will match these patterns.
|
|
890
|
-
*/
|
|
891
|
-
includes?: NormalizedGlob[] | null;
|
|
892
|
-
}
|
|
893
|
-
export interface OverrideAssistConfiguration {
|
|
894
|
-
/**
|
|
895
|
-
* List of actions
|
|
896
|
-
*/
|
|
897
|
-
actions?: Actions | null;
|
|
898
|
-
/**
|
|
899
|
-
* if `false`, it disables the feature and the assist won't be executed. `true` by default
|
|
900
|
-
*/
|
|
901
|
-
enabled?: Bool | null;
|
|
902
|
-
}
|
|
903
|
-
export interface OverridePattern {
|
|
904
|
-
/**
|
|
905
|
-
* Specific configuration for the Json language
|
|
906
|
-
*/
|
|
907
|
-
assist?: OverrideAssistConfiguration | null;
|
|
908
|
-
/**
|
|
909
|
-
* Specific configuration for the CSS language
|
|
910
|
-
*/
|
|
911
|
-
css?: CssConfiguration | null;
|
|
912
|
-
/**
|
|
913
|
-
* Specific configuration for the filesystem
|
|
914
|
-
*/
|
|
915
|
-
files?: OverrideFilesConfiguration | null;
|
|
916
|
-
/**
|
|
917
|
-
* Specific configuration for the Json language
|
|
918
|
-
*/
|
|
919
|
-
formatter?: OverrideFormatterConfiguration | null;
|
|
920
|
-
/**
|
|
921
|
-
* Specific configuration for the Graphql language
|
|
922
|
-
*/
|
|
923
|
-
graphql?: GraphqlConfiguration | null;
|
|
924
|
-
/**
|
|
925
|
-
* Specific configuration for the GritQL language
|
|
926
|
-
*/
|
|
927
|
-
grit?: GritConfiguration | null;
|
|
928
|
-
/**
|
|
929
|
-
* Specific configuration for the GritQL language
|
|
930
|
-
*/
|
|
931
|
-
html?: HtmlConfiguration | null;
|
|
932
|
-
/**
|
|
933
|
-
* A list of glob patterns. Biome will include files/folders that will match these patterns.
|
|
934
|
-
*/
|
|
935
|
-
includes?: OverrideGlobs | null;
|
|
936
|
-
/**
|
|
937
|
-
* Specific configuration for the JavaScript language
|
|
938
|
-
*/
|
|
939
|
-
javascript?: JsConfiguration | null;
|
|
940
|
-
/**
|
|
941
|
-
* Specific configuration for the Json language
|
|
942
|
-
*/
|
|
943
|
-
json?: JsonConfiguration | null;
|
|
944
|
-
/**
|
|
945
|
-
* Specific configuration for the Json language
|
|
946
|
-
*/
|
|
947
|
-
linter?: OverrideLinterConfiguration | null;
|
|
948
|
-
/**
|
|
949
|
-
* Specific configuration for additional plugins
|
|
950
|
-
*/
|
|
951
|
-
plugins?: Plugins | null;
|
|
952
|
-
}
|
|
953
|
-
export type Overrides = OverridePattern[];
|
|
954
|
-
/**
|
|
955
|
-
* The configuration that is contained inside the file `biome.json`
|
|
956
|
-
*/
|
|
957
|
-
export interface Configuration {
|
|
958
|
-
/**
|
|
959
|
-
* A field for the [JSON schema](https://json-schema.org/) specification
|
|
960
|
-
*/
|
|
961
|
-
$schema?: Schema | null;
|
|
962
|
-
/**
|
|
963
|
-
* Specific configuration for assists
|
|
964
|
-
*/
|
|
965
|
-
assist?: AssistConfiguration | null;
|
|
966
|
-
/**
|
|
967
|
-
* Specific configuration for the Css language
|
|
968
|
-
*/
|
|
969
|
-
css?: CssConfiguration | null;
|
|
970
|
-
/**
|
|
971
|
-
* A list of paths to other JSON files, used to extends the current configuration.
|
|
972
|
-
*/
|
|
973
|
-
extends?: Extends | null;
|
|
974
|
-
/**
|
|
975
|
-
* The configuration of the filesystem
|
|
976
|
-
*/
|
|
977
|
-
files?: FilesConfiguration | null;
|
|
978
|
-
/**
|
|
979
|
-
* The configuration of the formatter
|
|
980
|
-
*/
|
|
981
|
-
formatter?: FormatterConfiguration | null;
|
|
982
|
-
/**
|
|
983
|
-
* Specific configuration for the GraphQL language
|
|
984
|
-
*/
|
|
985
|
-
graphql?: GraphqlConfiguration | null;
|
|
986
|
-
/**
|
|
987
|
-
* Specific configuration for the GraphQL language
|
|
988
|
-
*/
|
|
989
|
-
grit?: GritConfiguration | null;
|
|
990
|
-
/**
|
|
991
|
-
* Specific configuration for the HTML language
|
|
992
|
-
*/
|
|
993
|
-
html?: HtmlConfiguration | null;
|
|
994
|
-
/**
|
|
995
|
-
* Specific configuration for the JavaScript language
|
|
996
|
-
*/
|
|
997
|
-
javascript?: JsConfiguration | null;
|
|
998
|
-
/**
|
|
999
|
-
* Specific configuration for the Json language
|
|
1000
|
-
*/
|
|
1001
|
-
json?: JsonConfiguration | null;
|
|
1002
|
-
/**
|
|
1003
|
-
* The configuration for the linter
|
|
1004
|
-
*/
|
|
1005
|
-
linter?: LinterConfiguration | null;
|
|
1006
|
-
/**
|
|
1007
|
-
* A list of granular patterns that should be applied only to a sub set of files
|
|
1008
|
-
*/
|
|
1009
|
-
overrides?: Overrides | null;
|
|
1010
|
-
/**
|
|
1011
|
-
* List of plugins to load.
|
|
1012
|
-
*/
|
|
1013
|
-
plugins?: Plugins | null;
|
|
1014
|
-
/**
|
|
1015
|
-
* Indicates whether this configuration file is at the root of a Biome project. By default, this is `true`.
|
|
1016
|
-
*/
|
|
1017
|
-
root?: Bool | null;
|
|
1018
|
-
/**
|
|
1019
|
-
* The configuration of the VCS integration
|
|
1020
|
-
*/
|
|
1021
|
-
vcs?: VcsConfiguration | null;
|
|
1022
|
-
}
|
|
1023
|
-
export type BiomeConfig = Configuration;
|