@quentinhsu/biome-config 0.3.2 → 0.3.5
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/dist/build.mjs +388 -0
- package/dist/index.jsonc +153 -0
- package/dist/index.mjs +358 -0
- package/dist/next.jsonc +170 -0
- package/dist/nuxt.jsonc +225 -0
- package/dist/react.jsonc +168 -0
- package/dist/types/scripts/build-presets.d.ts +1 -0
- package/dist/types/scripts/generate-biome-types.d.ts +1 -0
- package/dist/types/scripts/utils/biome-version.d.ts +12 -0
- package/dist/types/src/build.d.ts +1 -0
- package/dist/types/src/constants/biome.d.ts +1 -0
- package/dist/types/src/generated/biome/index.d.ts +12 -0
- package/dist/types/src/generated/biome/linter-configuration.d.ts +181 -0
- package/dist/types/src/generated/biome/no-global-object-calls-options.d.ts +321 -0
- package/dist/types/src/generated/biome/no-label-var-options.d.ts +1076 -0
- package/dist/types/src/generated/biome/no-magic-numbers-options.d.ts +291 -0
- package/dist/types/src/generated/biome/rule-with-no-confusing-labels-options.d.ts +1236 -0
- package/dist/types/src/generated/biome/rule-with-no-excessive-nested-test-suites-options.d.ts +1440 -0
- package/dist/types/src/generated/biome/rule-with-no-unused-expressions-options.d.ts +1337 -0
- package/dist/types/src/generated/biome/schema.d.ts +291 -0
- package/dist/types/src/generated/biome/use-consistent-object-definitions-configuration.d.ts +1304 -0
- package/dist/types/src/generated/biome/use-focusable-interactive-configuration.d.ts +163 -0
- package/dist/types/src/generated/biome/use-qwik-classlist-configuration.d.ts +241 -0
- package/dist/types/src/generated/biome/use-shorthand-assign-configuration.d.ts +571 -0
- package/dist/types/src/index.d.ts +15 -0
- package/dist/types/src/presets/next.d.ts +1 -0
- package/dist/types/src/presets/nuxt.d.ts +1 -0
- package/dist/types/src/presets/react.d.ts +1 -0
- package/dist/types/src/presets/vue.d.ts +1 -0
- package/dist/types/src/source/index.d.ts +2 -0
- package/dist/types/src/types.d.ts +1 -0
- package/dist/types/src/utils/merge.d.ts +2 -0
- package/dist/vue.jsonc +177 -0
- package/package.json +29 -28
|
@@ -0,0 +1,1304 @@
|
|
|
1
|
+
import type { FixKind, GroupPlainConfiguration, RuleAssistPlainConfiguration, RulePlainConfiguration, SortOrder } from './schema.ts';
|
|
2
|
+
import type { Regex } from './no-magic-numbers-options.ts';
|
|
3
|
+
import type { Formats, Paths } from './rule-with-no-unused-expressions-options.ts';
|
|
4
|
+
import type { RuleAssistConfigurationFor_UseSortedPropertiesOptions, SourceMatcher } from './rule-with-no-confusing-labels-options.ts';
|
|
5
|
+
import type { NoChildrenPropConfiguration, NoConstAssignConfiguration, NoConstantConditionConfiguration, NoConstantMathMinMaxClampConfiguration, NoConstructorReturnConfiguration, NoEmptyCharacterClassInRegexConfiguration, NoEmptyPatternConfiguration, NoGlobalDirnameFilenameConfiguration, NoGlobalObjectCallsConfiguration, NoInnerDeclarationsConfiguration, NoInvalidBuiltinInstantiationConfiguration, NoInvalidConstructorSuperConfiguration, NoInvalidDirectionInLinearGradientConfiguration, NoInvalidGridAreasConfiguration, NoInvalidPositionAtImportRuleConfiguration, NoInvalidUseBeforeDeclarationConfiguration, NoMissingVarFunctionConfiguration, NoNestedComponentDefinitionsConfiguration, NoNodejsModulesConfiguration, NoNonoctalDecimalEscapeConfiguration, NoPrecisionLossConfiguration, NoProcessGlobalConfiguration, NoQwikUseVisibleTaskConfiguration, NoReactPropAssignmentsConfiguration, NoRenderReturnValueConfiguration, 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, UseImageSizeConfiguration, UseImportExtensionsConfiguration, UseIsNanConfiguration, UseJsonImportAttributesConfiguration, UseJsxKeyInIterableConfiguration, UseParseIntRadixConfiguration } from './use-focusable-interactive-configuration.ts';
|
|
6
|
+
import type { NoCommonJsConfiguration, NoContinueConfiguration, NoDefaultExportConfiguration, NoDeprecatedImportsConfiguration, NoDescendingSpecificityConfiguration, NoDoneCallbackConfiguration, NoDuplicateDependenciesConfiguration, NoEmptySourceConfiguration, NoEnumConfiguration, NoExportedImportsConfiguration, NoFloatingPromisesConfiguration, NoHeadElementConfiguration, NoImplicitBooleanConfiguration, NoImportCyclesConfiguration, NoIncrementDecrementConfiguration, NoInferrableTypesConfiguration, NoJsxLiteralsConfiguration, NoMagicNumbersConfiguration, NoMisusedPromisesConfiguration, NoNamespaceConfiguration, NoNegationElseConfiguration, NoNestedTernaryConfiguration, NoNextAsyncClientComponentConfiguration, NoNonNullAssertionConfiguration, NoParameterPropertiesConfiguration, NoParametersOnlyUsedInRecursionConfiguration, NoProcessEnvConfiguration, NoReactForwardRefConfiguration, NoRestrictedGlobalsConfiguration, NoShadowConfiguration, NoShoutyConstantsConfiguration, NoSubstrConfiguration, NoUnknownAttributeConfiguration, NoUnnecessaryConditionsConfiguration, NoUnresolvedImportsConfiguration, NoUnusedExpressionsConfiguration, NoUnusedTemplateLiteralConfiguration, NoUselessCatchBindingConfiguration, NoUselessElseConfiguration, NoUselessUndefinedConfiguration, NoValueAtRuleConfiguration, NoVueDataObjectDeclarationConfiguration, NoVueDuplicateKeysConfiguration, NoVueReservedKeysConfiguration, NoVueReservedPropsConfiguration, NoYodaExpressionConfiguration, RuleWithUseConsistentObjectDefinitionsOptions, RuleWithUseConsistentTypeDefinitionsOptions, RuleWithUseImportTypeOptions, Selector, UseArrayLiteralsConfiguration, UseArraySortCompareConfiguration, UseAsConstAssertionConfiguration, UseAtIndexConfiguration, UseBlockStatementsConfiguration, UseCollapsedElseIfConfiguration, UseCollapsedIfConfiguration, UseComponentExportOnlyModulesConfiguration, UseConsistentBuiltinInstantiationConfiguration, UseConsistentCurlyBracesConfiguration, UseConstConfiguration, UseDefaultParameterLastConfiguration, UseDefaultSwitchClauseConfiguration, UseDeprecatedDateConfiguration, UseDeprecatedReasonConfiguration, UseEnumInitializersConfiguration, UseExhaustiveSwitchCasesConfiguration, UseExplicitLengthCheckConfiguration, UseExplicitTypeConfiguration, UseExponentiationOperatorConfiguration, UseExportTypeConfiguration, UseExportsLastConfiguration, UseFilenamingConventionOptions, UseForOfConfiguration, UseFragmentSyntaxConfiguration, UseGraphqlNamingConventionConfiguration, UseGroupedAccessorPairsConfiguration, UseLiteralEnumMembersConfiguration, UseMaxParamsConfiguration, UseNodeAssertStrictConfiguration, UseNodejsImportProtocolConfiguration, UseNumberNamespaceConfiguration, UseNumericSeparatorsConfiguration, UseObjectSpreadConfiguration, UseQwikClasslistConfiguration, UseQwikMethodUsageConfiguration, UseQwikValidLexicalScopeConfiguration, UseReactFunctionComponentsConfiguration, UseReadonlyClassPropertiesConfiguration, UseSelfClosingElementsConfiguration, UseSingleJsDocAsteriskConfiguration, UseSortedClassesConfiguration, UseUniqueElementIdsConfiguration, UseValidForDirectionConfiguration, UseValidTypeofConfiguration, UseVueDefineMacrosOrderConfiguration, UseVueMultiWordComponentNamesConfiguration, UseYieldConfiguration } from './use-qwik-classlist-configuration.ts';
|
|
7
|
+
import type { A11Y, Complexity, NoAlertConfiguration, NoApproximativeNumericConstantConfiguration, NoArrayIndexKeyConfiguration, NoAssignInExpressionsConfiguration, NoAsyncPromiseExecutorConfiguration, NoBiomeFirstExceptionConfiguration, NoBitwiseOperatorsConfiguration, NoCatchAssignConfiguration, NoClassAssignConfiguration, NoCommentTextConfiguration, NoCompareNegZeroConfiguration, NoConfusingLabelsConfiguration, NoConfusingVoidTypeConfiguration, NoConsoleConfiguration, NoConstEnumConfiguration, NoConstantBinaryExpressionsConfiguration, NoControlCharactersInRegexConfiguration, NoDebuggerConfiguration, NoDocumentCookieConfiguration, NoDocumentImportInPageConfiguration, NoDoubleEqualsConfiguration, NoDuplicateAtImportRulesConfiguration, NoDuplicateCaseConfiguration, NoDuplicateClassMembersConfiguration, NoDuplicateCustomPropertiesConfiguration, NoDuplicateElseIfConfiguration, NoDuplicateFieldsConfiguration, NoDuplicateFontNamesConfiguration, NoDuplicateJsxPropsConfiguration, NoDuplicateObjectKeysConfiguration, NoDuplicateParametersConfiguration, NoDuplicatePropertiesConfiguration, NoDuplicateSelectorsKeyframeBlockConfiguration, NoDuplicateTestHooksConfiguration, NoEmptyBlockConfiguration, NoEmptyBlockStatementsConfiguration, NoEmptyInterfaceConfiguration, NoEvolvingTypesConfiguration, NoExplicitAnyConfiguration, NoExportsInTestConfiguration, NoExtraNonNullAssertionConfiguration, NoFallthroughSwitchClauseConfiguration, NoFocusedTestsConfiguration, NoFunctionAssignConfiguration, NoGlobalAssignConfiguration, NoGlobalIsFiniteConfiguration, NoGlobalIsNanConfiguration, NoHeadImportInDocumentConfiguration, NoImplicitAnyLetConfiguration, NoImportAssignConfiguration, NoImportantInKeyframeConfiguration, NoIrregularWhitespaceConfiguration, NoLabelVarConfiguration, NoMisleadingCharacterClassConfiguration, NoMisleadingInstantiatorConfiguration, NoMisplacedAssertionConfiguration, NoMisrefactoredShorthandAssignConfiguration, NoNonNullAssertedOptionalChainConfiguration, NoOctalEscapeConfiguration, NoParameterAssignConfiguration, NoPrivateImportsConfiguration, NoPrototypeBuiltinsConfiguration, NoQuickfixBiomeConfiguration, NoReactSpecificPropsConfiguration, NoRedeclareConfiguration, NoRedundantUseStrictConfiguration, NoRestrictedElementsConfiguration, NoSelfCompareConfiguration, NoShadowRestrictedNamesConfiguration, NoShorthandPropertyOverridesConfiguration, NoSkippedTestsConfiguration, NoSparseArrayConfiguration, NoSuspiciousSemicolonInJsxConfiguration, NoTemplateCurlyInStringConfiguration, NoThenPropertyConfiguration, NoTsIgnoreConfiguration, NoUnassignedVariablesConfiguration, NoUndeclaredDependenciesConfiguration, NoUnknownAtRulesConfiguration, NoUnsafeDeclarationMergingConfiguration, NoUnsafeNegationConfiguration, NoUselessEscapeInStringConfiguration, NoUselessRegexBackrefsConfiguration, NoVarConfiguration, NoWithConfiguration, Performance, RuleAssistConfigurationFor_UseSortedAttributesOptions, RuleAssistConfigurationFor_UseSortedKeysOptions, RuleWithNoRestrictedTypesOptions, RuleWithUseExhaustiveDependenciesOptions, Security, SourcesMatcher, UseAdjacentOverloadSignaturesConfiguration, UseAwaitConfiguration, UseBiomeIgnoreFolderConfiguration, UseConsistentArrayTypeConfiguration, UseConsistentArrowReturnConfiguration, UseConsistentMemberAccessibilityConfiguration, UseDefaultSwitchClauseLastConfiguration, UseErrorMessageConfiguration, UseGetterReturnConfiguration, UseGoogleFontDisplayConfiguration, UseGuardForInConfiguration, UseIsArrayConfiguration, UseIterableCallbackReturnConfiguration, UseNamespaceKeywordConfiguration, UseNumberToFixedDigitsArgumentConfiguration, UseShorthandAssignConfiguration, UseShorthandFunctionTypeConfiguration, UseSingleVarDeclaratorConfiguration, UseStaticResponseMethodsConfiguration, UseStrictModeConfiguration, UseSymbolDescriptionConfiguration, UseTemplateConfiguration, UseThrowNewErrorConfiguration, UseThrowOnlyErrorConfiguration, UseTrimStartEndConfiguration, UseUnifiedTypeSignaturesConfiguration } from './use-shorthand-assign-configuration.ts';
|
|
8
|
+
export type UseConsistentObjectDefinitionsConfiguration = RulePlainConfiguration | RuleWithUseConsistentObjectDefinitionsOptions;
|
|
9
|
+
export type UseConsistentTypeDefinitionsConfiguration = RulePlainConfiguration | RuleWithUseConsistentTypeDefinitionsOptions;
|
|
10
|
+
export interface RuleWithUseFilenamingConventionOptions {
|
|
11
|
+
/**
|
|
12
|
+
* The severity of the emitted diagnostics by the rule
|
|
13
|
+
*/
|
|
14
|
+
level: RulePlainConfiguration;
|
|
15
|
+
/**
|
|
16
|
+
* Rule's options
|
|
17
|
+
*/
|
|
18
|
+
options?: UseFilenamingConventionOptions;
|
|
19
|
+
}
|
|
20
|
+
export type UseImportTypeConfiguration = RulePlainConfiguration | RuleWithUseImportTypeOptions;
|
|
21
|
+
export interface Convention {
|
|
22
|
+
/**
|
|
23
|
+
* String cases to enforce
|
|
24
|
+
*/
|
|
25
|
+
formats?: Formats;
|
|
26
|
+
/**
|
|
27
|
+
* Regular expression to enforce
|
|
28
|
+
*/
|
|
29
|
+
match?: Regex | null;
|
|
30
|
+
/**
|
|
31
|
+
* Declarations concerned by this convention
|
|
32
|
+
*/
|
|
33
|
+
selector?: Selector;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A list of rules that belong to this group
|
|
37
|
+
*/
|
|
38
|
+
export interface Suspicious {
|
|
39
|
+
/**
|
|
40
|
+
* Disallow the use of alert, confirm, and prompt.
|
|
41
|
+
*/
|
|
42
|
+
noAlert?: NoAlertConfiguration | null;
|
|
43
|
+
/**
|
|
44
|
+
* Use standard constants instead of approximated literals.
|
|
45
|
+
*/
|
|
46
|
+
noApproximativeNumericConstant?: NoApproximativeNumericConstantConfiguration | null;
|
|
47
|
+
/**
|
|
48
|
+
* Discourage the usage of Array index in keys.
|
|
49
|
+
*/
|
|
50
|
+
noArrayIndexKey?: NoArrayIndexKeyConfiguration | null;
|
|
51
|
+
/**
|
|
52
|
+
* Disallow assignments in expressions.
|
|
53
|
+
*/
|
|
54
|
+
noAssignInExpressions?: NoAssignInExpressionsConfiguration | null;
|
|
55
|
+
/**
|
|
56
|
+
* Disallows using an async function as a Promise executor.
|
|
57
|
+
*/
|
|
58
|
+
noAsyncPromiseExecutor?: NoAsyncPromiseExecutorConfiguration | null;
|
|
59
|
+
/**
|
|
60
|
+
* Prevents the use of the ! pattern in the first position of files.includes in the configuration file.
|
|
61
|
+
*/
|
|
62
|
+
noBiomeFirstException?: NoBiomeFirstExceptionConfiguration | null;
|
|
63
|
+
/**
|
|
64
|
+
* Disallow bitwise operators.
|
|
65
|
+
*/
|
|
66
|
+
noBitwiseOperators?: NoBitwiseOperatorsConfiguration | null;
|
|
67
|
+
/**
|
|
68
|
+
* Disallow reassigning exceptions in catch clauses.
|
|
69
|
+
*/
|
|
70
|
+
noCatchAssign?: NoCatchAssignConfiguration | null;
|
|
71
|
+
/**
|
|
72
|
+
* Disallow reassigning class members.
|
|
73
|
+
*/
|
|
74
|
+
noClassAssign?: NoClassAssignConfiguration | null;
|
|
75
|
+
/**
|
|
76
|
+
* Prevent comments from being inserted as text nodes
|
|
77
|
+
*/
|
|
78
|
+
noCommentText?: NoCommentTextConfiguration | null;
|
|
79
|
+
/**
|
|
80
|
+
* Disallow comparing against -0
|
|
81
|
+
*/
|
|
82
|
+
noCompareNegZero?: NoCompareNegZeroConfiguration | null;
|
|
83
|
+
/**
|
|
84
|
+
* Disallow labeled statements that are not loops.
|
|
85
|
+
*/
|
|
86
|
+
noConfusingLabels?: NoConfusingLabelsConfiguration | null;
|
|
87
|
+
/**
|
|
88
|
+
* Disallow void type outside of generic or return types.
|
|
89
|
+
*/
|
|
90
|
+
noConfusingVoidType?: NoConfusingVoidTypeConfiguration | null;
|
|
91
|
+
/**
|
|
92
|
+
* Disallow the use of console.
|
|
93
|
+
*/
|
|
94
|
+
noConsole?: NoConsoleConfiguration | null;
|
|
95
|
+
/**
|
|
96
|
+
* Disallow TypeScript const enum
|
|
97
|
+
*/
|
|
98
|
+
noConstEnum?: NoConstEnumConfiguration | null;
|
|
99
|
+
/**
|
|
100
|
+
* Disallow expressions where the operation doesn't affect the value
|
|
101
|
+
*/
|
|
102
|
+
noConstantBinaryExpressions?: NoConstantBinaryExpressionsConfiguration | null;
|
|
103
|
+
/**
|
|
104
|
+
* Prevents from having control characters and some escape sequences that match control characters in regular expression literals.
|
|
105
|
+
*/
|
|
106
|
+
noControlCharactersInRegex?: NoControlCharactersInRegexConfiguration | null;
|
|
107
|
+
/**
|
|
108
|
+
* Disallow the use of debugger
|
|
109
|
+
*/
|
|
110
|
+
noDebugger?: NoDebuggerConfiguration | null;
|
|
111
|
+
/**
|
|
112
|
+
* Disallow direct assignments to document.cookie.
|
|
113
|
+
*/
|
|
114
|
+
noDocumentCookie?: NoDocumentCookieConfiguration | null;
|
|
115
|
+
/**
|
|
116
|
+
* Prevents importing next/document outside of pages/_document.jsx in Next.js projects.
|
|
117
|
+
*/
|
|
118
|
+
noDocumentImportInPage?: NoDocumentImportInPageConfiguration | null;
|
|
119
|
+
/**
|
|
120
|
+
* Require the use of === and !==.
|
|
121
|
+
*/
|
|
122
|
+
noDoubleEquals?: NoDoubleEqualsConfiguration | null;
|
|
123
|
+
/**
|
|
124
|
+
* Disallow duplicate @import rules.
|
|
125
|
+
*/
|
|
126
|
+
noDuplicateAtImportRules?: NoDuplicateAtImportRulesConfiguration | null;
|
|
127
|
+
/**
|
|
128
|
+
* Disallow duplicate case labels.
|
|
129
|
+
*/
|
|
130
|
+
noDuplicateCase?: NoDuplicateCaseConfiguration | null;
|
|
131
|
+
/**
|
|
132
|
+
* Disallow duplicate class members.
|
|
133
|
+
*/
|
|
134
|
+
noDuplicateClassMembers?: NoDuplicateClassMembersConfiguration | null;
|
|
135
|
+
/**
|
|
136
|
+
* Disallow duplicate custom properties within declaration blocks.
|
|
137
|
+
*/
|
|
138
|
+
noDuplicateCustomProperties?: NoDuplicateCustomPropertiesConfiguration | null;
|
|
139
|
+
/**
|
|
140
|
+
* Disallow duplicate conditions in if-else-if chains
|
|
141
|
+
*/
|
|
142
|
+
noDuplicateElseIf?: NoDuplicateElseIfConfiguration | null;
|
|
143
|
+
/**
|
|
144
|
+
* No duplicated fields in GraphQL operations.
|
|
145
|
+
*/
|
|
146
|
+
noDuplicateFields?: NoDuplicateFieldsConfiguration | null;
|
|
147
|
+
/**
|
|
148
|
+
* Disallow duplicate names within font families.
|
|
149
|
+
*/
|
|
150
|
+
noDuplicateFontNames?: NoDuplicateFontNamesConfiguration | null;
|
|
151
|
+
/**
|
|
152
|
+
* Prevents JSX properties to be assigned multiple times.
|
|
153
|
+
*/
|
|
154
|
+
noDuplicateJsxProps?: NoDuplicateJsxPropsConfiguration | null;
|
|
155
|
+
/**
|
|
156
|
+
* Disallow two keys with the same name inside objects.
|
|
157
|
+
*/
|
|
158
|
+
noDuplicateObjectKeys?: NoDuplicateObjectKeysConfiguration | null;
|
|
159
|
+
/**
|
|
160
|
+
* Disallow duplicate function parameter name.
|
|
161
|
+
*/
|
|
162
|
+
noDuplicateParameters?: NoDuplicateParametersConfiguration | null;
|
|
163
|
+
/**
|
|
164
|
+
* Disallow duplicate properties within declaration blocks.
|
|
165
|
+
*/
|
|
166
|
+
noDuplicateProperties?: NoDuplicatePropertiesConfiguration | null;
|
|
167
|
+
/**
|
|
168
|
+
* Disallow duplicate selectors within keyframe blocks.
|
|
169
|
+
*/
|
|
170
|
+
noDuplicateSelectorsKeyframeBlock?: NoDuplicateSelectorsKeyframeBlockConfiguration | null;
|
|
171
|
+
/**
|
|
172
|
+
* A describe block should not contain duplicate hooks.
|
|
173
|
+
*/
|
|
174
|
+
noDuplicateTestHooks?: NoDuplicateTestHooksConfiguration | null;
|
|
175
|
+
/**
|
|
176
|
+
* Disallow CSS empty blocks.
|
|
177
|
+
*/
|
|
178
|
+
noEmptyBlock?: NoEmptyBlockConfiguration | null;
|
|
179
|
+
/**
|
|
180
|
+
* Disallow empty block statements and static blocks.
|
|
181
|
+
*/
|
|
182
|
+
noEmptyBlockStatements?: NoEmptyBlockStatementsConfiguration | null;
|
|
183
|
+
/**
|
|
184
|
+
* Disallow the declaration of empty interfaces.
|
|
185
|
+
*/
|
|
186
|
+
noEmptyInterface?: NoEmptyInterfaceConfiguration | null;
|
|
187
|
+
/**
|
|
188
|
+
* Disallow variables from evolving into any type through reassignments.
|
|
189
|
+
*/
|
|
190
|
+
noEvolvingTypes?: NoEvolvingTypesConfiguration | null;
|
|
191
|
+
/**
|
|
192
|
+
* Disallow the any type usage.
|
|
193
|
+
*/
|
|
194
|
+
noExplicitAny?: NoExplicitAnyConfiguration | null;
|
|
195
|
+
/**
|
|
196
|
+
* Disallow using export or module.exports in files containing tests
|
|
197
|
+
*/
|
|
198
|
+
noExportsInTest?: NoExportsInTestConfiguration | null;
|
|
199
|
+
/**
|
|
200
|
+
* Prevents the wrong usage of the non-null assertion operator (!) in TypeScript files.
|
|
201
|
+
*/
|
|
202
|
+
noExtraNonNullAssertion?: NoExtraNonNullAssertionConfiguration | null;
|
|
203
|
+
/**
|
|
204
|
+
* Disallow fallthrough of switch clauses.
|
|
205
|
+
*/
|
|
206
|
+
noFallthroughSwitchClause?: NoFallthroughSwitchClauseConfiguration | null;
|
|
207
|
+
/**
|
|
208
|
+
* Disallow focused tests.
|
|
209
|
+
*/
|
|
210
|
+
noFocusedTests?: NoFocusedTestsConfiguration | null;
|
|
211
|
+
/**
|
|
212
|
+
* Disallow reassigning function declarations.
|
|
213
|
+
*/
|
|
214
|
+
noFunctionAssign?: NoFunctionAssignConfiguration | null;
|
|
215
|
+
/**
|
|
216
|
+
* Disallow assignments to native objects and read-only global variables.
|
|
217
|
+
*/
|
|
218
|
+
noGlobalAssign?: NoGlobalAssignConfiguration | null;
|
|
219
|
+
/**
|
|
220
|
+
* Use Number.isFinite instead of global isFinite.
|
|
221
|
+
*/
|
|
222
|
+
noGlobalIsFinite?: NoGlobalIsFiniteConfiguration | null;
|
|
223
|
+
/**
|
|
224
|
+
* Use Number.isNaN instead of global isNaN.
|
|
225
|
+
*/
|
|
226
|
+
noGlobalIsNan?: NoGlobalIsNanConfiguration | null;
|
|
227
|
+
/**
|
|
228
|
+
* Prevent using the next/head module in pages/_document.js on Next.js projects.
|
|
229
|
+
*/
|
|
230
|
+
noHeadImportInDocument?: NoHeadImportInDocumentConfiguration | null;
|
|
231
|
+
/**
|
|
232
|
+
* Disallow use of implicit any type on variable declarations.
|
|
233
|
+
*/
|
|
234
|
+
noImplicitAnyLet?: NoImplicitAnyLetConfiguration | null;
|
|
235
|
+
/**
|
|
236
|
+
* Disallow assigning to imported bindings
|
|
237
|
+
*/
|
|
238
|
+
noImportAssign?: NoImportAssignConfiguration | null;
|
|
239
|
+
/**
|
|
240
|
+
* Disallow invalid !important within keyframe declarations
|
|
241
|
+
*/
|
|
242
|
+
noImportantInKeyframe?: NoImportantInKeyframeConfiguration | null;
|
|
243
|
+
/**
|
|
244
|
+
* Disallows the use of irregular whitespace characters.
|
|
245
|
+
*/
|
|
246
|
+
noIrregularWhitespace?: NoIrregularWhitespaceConfiguration | null;
|
|
247
|
+
/**
|
|
248
|
+
* Disallow labels that share a name with a variable
|
|
249
|
+
*/
|
|
250
|
+
noLabelVar?: NoLabelVarConfiguration | null;
|
|
251
|
+
/**
|
|
252
|
+
* Disallow characters made with multiple code points in character class syntax.
|
|
253
|
+
*/
|
|
254
|
+
noMisleadingCharacterClass?: NoMisleadingCharacterClassConfiguration | null;
|
|
255
|
+
/**
|
|
256
|
+
* Enforce proper usage of new and constructor.
|
|
257
|
+
*/
|
|
258
|
+
noMisleadingInstantiator?: NoMisleadingInstantiatorConfiguration | null;
|
|
259
|
+
/**
|
|
260
|
+
* Checks that the assertion function, for example expect, is placed inside an it() function call.
|
|
261
|
+
*/
|
|
262
|
+
noMisplacedAssertion?: NoMisplacedAssertionConfiguration | null;
|
|
263
|
+
/**
|
|
264
|
+
* Disallow shorthand assign when variable appears on both sides.
|
|
265
|
+
*/
|
|
266
|
+
noMisrefactoredShorthandAssign?: NoMisrefactoredShorthandAssignConfiguration | null;
|
|
267
|
+
/**
|
|
268
|
+
* Disallow non-null assertions after optional chaining expressions.
|
|
269
|
+
*/
|
|
270
|
+
noNonNullAssertedOptionalChain?: NoNonNullAssertedOptionalChainConfiguration | null;
|
|
271
|
+
/**
|
|
272
|
+
* Disallow octal escape sequences in string literals
|
|
273
|
+
*/
|
|
274
|
+
noOctalEscape?: NoOctalEscapeConfiguration | null;
|
|
275
|
+
/**
|
|
276
|
+
* Disallow direct use of Object.prototype builtins.
|
|
277
|
+
*/
|
|
278
|
+
noPrototypeBuiltins?: NoPrototypeBuiltinsConfiguration | null;
|
|
279
|
+
/**
|
|
280
|
+
* Disallow the use if quickfix.biome inside editor settings file.
|
|
281
|
+
*/
|
|
282
|
+
noQuickfixBiome?: NoQuickfixBiomeConfiguration | null;
|
|
283
|
+
/**
|
|
284
|
+
* Prevents React-specific JSX properties from being used.
|
|
285
|
+
*/
|
|
286
|
+
noReactSpecificProps?: NoReactSpecificPropsConfiguration | null;
|
|
287
|
+
/**
|
|
288
|
+
* Disallow variable, function, class, and type redeclarations in the same scope.
|
|
289
|
+
*/
|
|
290
|
+
noRedeclare?: NoRedeclareConfiguration | null;
|
|
291
|
+
/**
|
|
292
|
+
* Prevents from having redundant "use strict".
|
|
293
|
+
*/
|
|
294
|
+
noRedundantUseStrict?: NoRedundantUseStrictConfiguration | null;
|
|
295
|
+
/**
|
|
296
|
+
* Disallow comparisons where both sides are exactly the same.
|
|
297
|
+
*/
|
|
298
|
+
noSelfCompare?: NoSelfCompareConfiguration | null;
|
|
299
|
+
/**
|
|
300
|
+
* Disallow identifiers from shadowing restricted names.
|
|
301
|
+
*/
|
|
302
|
+
noShadowRestrictedNames?: NoShadowRestrictedNamesConfiguration | null;
|
|
303
|
+
/**
|
|
304
|
+
* Disallow shorthand properties that override related longhand properties.
|
|
305
|
+
*/
|
|
306
|
+
noShorthandPropertyOverrides?: NoShorthandPropertyOverridesConfiguration | null;
|
|
307
|
+
/**
|
|
308
|
+
* Disallow disabled tests.
|
|
309
|
+
*/
|
|
310
|
+
noSkippedTests?: NoSkippedTestsConfiguration | null;
|
|
311
|
+
/**
|
|
312
|
+
* Prevents the use of sparse arrays (arrays with holes).
|
|
313
|
+
*/
|
|
314
|
+
noSparseArray?: NoSparseArrayConfiguration | null;
|
|
315
|
+
/**
|
|
316
|
+
* It detects possible "wrong" semicolons inside JSX elements.
|
|
317
|
+
*/
|
|
318
|
+
noSuspiciousSemicolonInJsx?: NoSuspiciousSemicolonInJsxConfiguration | null;
|
|
319
|
+
/**
|
|
320
|
+
* Disallow template literal placeholder syntax in regular strings.
|
|
321
|
+
*/
|
|
322
|
+
noTemplateCurlyInString?: NoTemplateCurlyInStringConfiguration | null;
|
|
323
|
+
/**
|
|
324
|
+
* Disallow then property.
|
|
325
|
+
*/
|
|
326
|
+
noThenProperty?: NoThenPropertyConfiguration | null;
|
|
327
|
+
/**
|
|
328
|
+
* Prevents the use of the TypeScript directive @ts-ignore.
|
|
329
|
+
*/
|
|
330
|
+
noTsIgnore?: NoTsIgnoreConfiguration | null;
|
|
331
|
+
/**
|
|
332
|
+
* Disallow let or var variables that are read but never assigned.
|
|
333
|
+
*/
|
|
334
|
+
noUnassignedVariables?: NoUnassignedVariablesConfiguration | null;
|
|
335
|
+
/**
|
|
336
|
+
* Disallow unknown at-rules.
|
|
337
|
+
*/
|
|
338
|
+
noUnknownAtRules?: NoUnknownAtRulesConfiguration | null;
|
|
339
|
+
/**
|
|
340
|
+
* Disallow unsafe declaration merging between interfaces and classes.
|
|
341
|
+
*/
|
|
342
|
+
noUnsafeDeclarationMerging?: NoUnsafeDeclarationMergingConfiguration | null;
|
|
343
|
+
/**
|
|
344
|
+
* Disallow using unsafe negation.
|
|
345
|
+
*/
|
|
346
|
+
noUnsafeNegation?: NoUnsafeNegationConfiguration | null;
|
|
347
|
+
/**
|
|
348
|
+
* Disallow unnecessary escapes in string literals.
|
|
349
|
+
*/
|
|
350
|
+
noUselessEscapeInString?: NoUselessEscapeInStringConfiguration | null;
|
|
351
|
+
/**
|
|
352
|
+
* Disallow useless backreferences in regular expression literals that always match an empty string.
|
|
353
|
+
*/
|
|
354
|
+
noUselessRegexBackrefs?: NoUselessRegexBackrefsConfiguration | null;
|
|
355
|
+
/**
|
|
356
|
+
* Disallow the use of var
|
|
357
|
+
*/
|
|
358
|
+
noVar?: NoVarConfiguration | null;
|
|
359
|
+
/**
|
|
360
|
+
* Disallow with statements in non-strict contexts.
|
|
361
|
+
*/
|
|
362
|
+
noWith?: NoWithConfiguration | null;
|
|
363
|
+
/**
|
|
364
|
+
* Enables the recommended rules for this group
|
|
365
|
+
*/
|
|
366
|
+
recommended?: boolean | null;
|
|
367
|
+
/**
|
|
368
|
+
* Disallow the use of overload signatures that are not next to each other.
|
|
369
|
+
*/
|
|
370
|
+
useAdjacentOverloadSignatures?: UseAdjacentOverloadSignaturesConfiguration | null;
|
|
371
|
+
/**
|
|
372
|
+
* Ensure async functions utilize await.
|
|
373
|
+
*/
|
|
374
|
+
useAwait?: UseAwaitConfiguration | null;
|
|
375
|
+
/**
|
|
376
|
+
* Promotes the correct usage for ignoring folders in the configuration file.
|
|
377
|
+
*/
|
|
378
|
+
useBiomeIgnoreFolder?: UseBiomeIgnoreFolderConfiguration | null;
|
|
379
|
+
/**
|
|
380
|
+
* Enforce default clauses in switch statements to be last
|
|
381
|
+
*/
|
|
382
|
+
useDefaultSwitchClauseLast?: UseDefaultSwitchClauseLastConfiguration | null;
|
|
383
|
+
/**
|
|
384
|
+
* Enforce passing a message value when creating a built-in error.
|
|
385
|
+
*/
|
|
386
|
+
useErrorMessage?: UseErrorMessageConfiguration | null;
|
|
387
|
+
/**
|
|
388
|
+
* Enforce get methods to always return a value.
|
|
389
|
+
*/
|
|
390
|
+
useGetterReturn?: UseGetterReturnConfiguration | null;
|
|
391
|
+
/**
|
|
392
|
+
* Enforces the use of a recommended display strategy with Google Fonts.
|
|
393
|
+
*/
|
|
394
|
+
useGoogleFontDisplay?: UseGoogleFontDisplayConfiguration | null;
|
|
395
|
+
/**
|
|
396
|
+
* Require for-in loops to include an if statement.
|
|
397
|
+
*/
|
|
398
|
+
useGuardForIn?: UseGuardForInConfiguration | null;
|
|
399
|
+
/**
|
|
400
|
+
* Use Array.isArray() instead of instanceof Array.
|
|
401
|
+
*/
|
|
402
|
+
useIsArray?: UseIsArrayConfiguration | null;
|
|
403
|
+
/**
|
|
404
|
+
* Enforce consistent return values in iterable callbacks.
|
|
405
|
+
*/
|
|
406
|
+
useIterableCallbackReturn?: UseIterableCallbackReturnConfiguration | null;
|
|
407
|
+
/**
|
|
408
|
+
* Require using the namespace keyword over the module keyword to declare TypeScript namespaces.
|
|
409
|
+
*/
|
|
410
|
+
useNamespaceKeyword?: UseNamespaceKeywordConfiguration | null;
|
|
411
|
+
/**
|
|
412
|
+
* Enforce using the digits argument with Number#toFixed().
|
|
413
|
+
*/
|
|
414
|
+
useNumberToFixedDigitsArgument?: UseNumberToFixedDigitsArgumentConfiguration | null;
|
|
415
|
+
/**
|
|
416
|
+
* Use static Response methods instead of new Response() constructor when possible.
|
|
417
|
+
*/
|
|
418
|
+
useStaticResponseMethods?: UseStaticResponseMethodsConfiguration | null;
|
|
419
|
+
/**
|
|
420
|
+
* Enforce the use of the directive "use strict" in script files.
|
|
421
|
+
*/
|
|
422
|
+
useStrictMode?: UseStrictModeConfiguration | null;
|
|
423
|
+
}
|
|
424
|
+
export interface ImportMatcher {
|
|
425
|
+
source?: SourcesMatcher | null;
|
|
426
|
+
type?: boolean | null;
|
|
427
|
+
[k: string]: unknown;
|
|
428
|
+
}
|
|
429
|
+
export interface PatternOptions {
|
|
430
|
+
/**
|
|
431
|
+
* An array of gitignore-style patterns.
|
|
432
|
+
*/
|
|
433
|
+
group?: SourcesMatcher | null;
|
|
434
|
+
/**
|
|
435
|
+
* A regex pattern for import names to forbid within the matched modules.
|
|
436
|
+
*/
|
|
437
|
+
importNamePattern?: Regex | null;
|
|
438
|
+
/**
|
|
439
|
+
* If true, the matched patterns in the importNamePattern will be allowed. Defaults to `false`.
|
|
440
|
+
*/
|
|
441
|
+
invertImportNamePattern?: boolean;
|
|
442
|
+
/**
|
|
443
|
+
* A custom message for diagnostics related to this pattern.
|
|
444
|
+
*/
|
|
445
|
+
message?: string | null;
|
|
446
|
+
}
|
|
447
|
+
export type SeverityOrGroupFor_A11Y = GroupPlainConfiguration | A11Y;
|
|
448
|
+
export type SeverityOrGroupFor_Complexity = GroupPlainConfiguration | Complexity;
|
|
449
|
+
export type UseExhaustiveDependenciesConfiguration = RulePlainConfiguration | RuleWithUseExhaustiveDependenciesOptions;
|
|
450
|
+
/**
|
|
451
|
+
* A list of rules that belong to this group
|
|
452
|
+
*/
|
|
453
|
+
export interface Nursery {
|
|
454
|
+
/**
|
|
455
|
+
* Disallow continue statements.
|
|
456
|
+
*/
|
|
457
|
+
noContinue?: NoContinueConfiguration | null;
|
|
458
|
+
/**
|
|
459
|
+
* Restrict imports of deprecated exports.
|
|
460
|
+
*/
|
|
461
|
+
noDeprecatedImports?: NoDeprecatedImportsConfiguration | null;
|
|
462
|
+
/**
|
|
463
|
+
* Prevent the listing of duplicate dependencies. The rule supports the following dependency groups: "bundledDependencies", "bundleDependencies", "dependencies", "devDependencies", "overrides", "optionalDependencies", and "peerDependencies".
|
|
464
|
+
*/
|
|
465
|
+
noDuplicateDependencies?: NoDuplicateDependenciesConfiguration | null;
|
|
466
|
+
/**
|
|
467
|
+
* Disallow empty sources.
|
|
468
|
+
*/
|
|
469
|
+
noEmptySource?: NoEmptySourceConfiguration | null;
|
|
470
|
+
/**
|
|
471
|
+
* Require Promise-like statements to be handled appropriately.
|
|
472
|
+
*/
|
|
473
|
+
noFloatingPromises?: NoFloatingPromisesConfiguration | null;
|
|
474
|
+
/**
|
|
475
|
+
* Prevent import cycles.
|
|
476
|
+
*/
|
|
477
|
+
noImportCycles?: NoImportCyclesConfiguration | null;
|
|
478
|
+
/**
|
|
479
|
+
* Disallows the usage of the unary operators ++ and --.
|
|
480
|
+
*/
|
|
481
|
+
noIncrementDecrement?: NoIncrementDecrementConfiguration | null;
|
|
482
|
+
/**
|
|
483
|
+
* Disallow string literals inside JSX elements.
|
|
484
|
+
*/
|
|
485
|
+
noJsxLiterals?: NoJsxLiteralsConfiguration | null;
|
|
486
|
+
/**
|
|
487
|
+
* Disallow Promises to be used in places where they are almost certainly a mistake.
|
|
488
|
+
*/
|
|
489
|
+
noMisusedPromises?: NoMisusedPromisesConfiguration | null;
|
|
490
|
+
/**
|
|
491
|
+
* Prevent client components from being async functions.
|
|
492
|
+
*/
|
|
493
|
+
noNextAsyncClientComponent?: NoNextAsyncClientComponentConfiguration | null;
|
|
494
|
+
/**
|
|
495
|
+
* Disallow function parameters that are only used in recursive calls.
|
|
496
|
+
*/
|
|
497
|
+
noParametersOnlyUsedInRecursion?: NoParametersOnlyUsedInRecursionConfiguration | null;
|
|
498
|
+
/**
|
|
499
|
+
* Replaces usages of forwardRef with passing ref as a prop.
|
|
500
|
+
*/
|
|
501
|
+
noReactForwardRef?: NoReactForwardRefConfiguration | null;
|
|
502
|
+
/**
|
|
503
|
+
* Disallow variable declarations from shadowing variables declared in the outer scope.
|
|
504
|
+
*/
|
|
505
|
+
noShadow?: NoShadowConfiguration | null;
|
|
506
|
+
/**
|
|
507
|
+
* Disallow unknown DOM properties.
|
|
508
|
+
*/
|
|
509
|
+
noUnknownAttribute?: NoUnknownAttributeConfiguration | null;
|
|
510
|
+
/**
|
|
511
|
+
* Disallow unnecessary type-based conditions that can be statically determined as redundant.
|
|
512
|
+
*/
|
|
513
|
+
noUnnecessaryConditions?: NoUnnecessaryConditionsConfiguration | null;
|
|
514
|
+
/**
|
|
515
|
+
* Warn when importing non-existing exports.
|
|
516
|
+
*/
|
|
517
|
+
noUnresolvedImports?: NoUnresolvedImportsConfiguration | null;
|
|
518
|
+
/**
|
|
519
|
+
* Disallow expression statements that are neither a function call nor an assignment.
|
|
520
|
+
*/
|
|
521
|
+
noUnusedExpressions?: NoUnusedExpressionsConfiguration | null;
|
|
522
|
+
/**
|
|
523
|
+
* Disallow unused catch bindings.
|
|
524
|
+
*/
|
|
525
|
+
noUselessCatchBinding?: NoUselessCatchBindingConfiguration | null;
|
|
526
|
+
/**
|
|
527
|
+
* Disallow the use of useless undefined.
|
|
528
|
+
*/
|
|
529
|
+
noUselessUndefined?: NoUselessUndefinedConfiguration | null;
|
|
530
|
+
/**
|
|
531
|
+
* Enforce that Vue component data options are declared as functions.
|
|
532
|
+
*/
|
|
533
|
+
noVueDataObjectDeclaration?: NoVueDataObjectDeclarationConfiguration | null;
|
|
534
|
+
/**
|
|
535
|
+
* Disallow duplicate keys in Vue component data, methods, computed properties, and other options.
|
|
536
|
+
*/
|
|
537
|
+
noVueDuplicateKeys?: NoVueDuplicateKeysConfiguration | null;
|
|
538
|
+
/**
|
|
539
|
+
* Disallow reserved keys in Vue component data and computed properties.
|
|
540
|
+
*/
|
|
541
|
+
noVueReservedKeys?: NoVueReservedKeysConfiguration | null;
|
|
542
|
+
/**
|
|
543
|
+
* Disallow reserved names to be used as props.
|
|
544
|
+
*/
|
|
545
|
+
noVueReservedProps?: NoVueReservedPropsConfiguration | null;
|
|
546
|
+
/**
|
|
547
|
+
* Enables the recommended rules for this group
|
|
548
|
+
*/
|
|
549
|
+
recommended?: boolean | null;
|
|
550
|
+
/**
|
|
551
|
+
* Require Array#sort and Array#toSorted calls to always provide a compareFunction.
|
|
552
|
+
*/
|
|
553
|
+
useArraySortCompare?: UseArraySortCompareConfiguration | null;
|
|
554
|
+
/**
|
|
555
|
+
* Enforce consistent arrow function bodies.
|
|
556
|
+
*/
|
|
557
|
+
useConsistentArrowReturn?: UseConsistentArrowReturnConfiguration | null;
|
|
558
|
+
/**
|
|
559
|
+
* Require the @deprecated directive to specify a deletion date.
|
|
560
|
+
*/
|
|
561
|
+
useDeprecatedDate?: UseDeprecatedDateConfiguration | null;
|
|
562
|
+
/**
|
|
563
|
+
* Require switch-case statements to be exhaustive.
|
|
564
|
+
*/
|
|
565
|
+
useExhaustiveSwitchCases?: UseExhaustiveSwitchCasesConfiguration | null;
|
|
566
|
+
/**
|
|
567
|
+
* Enforce types in functions, methods, variables, and parameters.
|
|
568
|
+
*/
|
|
569
|
+
useExplicitType?: UseExplicitTypeConfiguration | null;
|
|
570
|
+
/**
|
|
571
|
+
* Enforce a maximum number of parameters in function definitions.
|
|
572
|
+
*/
|
|
573
|
+
useMaxParams?: UseMaxParamsConfiguration | null;
|
|
574
|
+
/**
|
|
575
|
+
* Disallow use* hooks outside of component$ or other use* hooks in Qwik applications.
|
|
576
|
+
*/
|
|
577
|
+
useQwikMethodUsage?: UseQwikMethodUsageConfiguration | null;
|
|
578
|
+
/**
|
|
579
|
+
* Disallow unserializable expressions in Qwik dollar ($) scopes.
|
|
580
|
+
*/
|
|
581
|
+
useQwikValidLexicalScope?: UseQwikValidLexicalScopeConfiguration | null;
|
|
582
|
+
/**
|
|
583
|
+
* Enforce the sorting of CSS utility classes.
|
|
584
|
+
*/
|
|
585
|
+
useSortedClasses?: UseSortedClassesConfiguration | null;
|
|
586
|
+
/**
|
|
587
|
+
* Enforce specific order of Vue compiler macros.
|
|
588
|
+
*/
|
|
589
|
+
useVueDefineMacrosOrder?: UseVueDefineMacrosOrderConfiguration | null;
|
|
590
|
+
/**
|
|
591
|
+
* Enforce multi-word component names in Vue components.
|
|
592
|
+
*/
|
|
593
|
+
useVueMultiWordComponentNames?: UseVueMultiWordComponentNamesConfiguration | null;
|
|
594
|
+
}
|
|
595
|
+
export type SeverityOrGroupFor_Performance = GroupPlainConfiguration | Performance;
|
|
596
|
+
export type SeverityOrGroupFor_Security = GroupPlainConfiguration | Security;
|
|
597
|
+
export type NoRestrictedTypesConfiguration = RulePlainConfiguration | RuleWithNoRestrictedTypesOptions;
|
|
598
|
+
export type UseFilenamingConventionConfiguration = RulePlainConfiguration | RuleWithUseFilenamingConventionOptions;
|
|
599
|
+
/**
|
|
600
|
+
* Rule's options.
|
|
601
|
+
*/
|
|
602
|
+
export interface UseNamingConventionOptions {
|
|
603
|
+
/**
|
|
604
|
+
* Custom conventions.
|
|
605
|
+
*/
|
|
606
|
+
conventions?: Convention[] | null;
|
|
607
|
+
/**
|
|
608
|
+
* If `false`, then non-ASCII characters are allowed.
|
|
609
|
+
*/
|
|
610
|
+
requireAscii?: boolean | null;
|
|
611
|
+
/**
|
|
612
|
+
* If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].
|
|
613
|
+
*/
|
|
614
|
+
strictCase?: boolean | null;
|
|
615
|
+
}
|
|
616
|
+
export type SeverityOrGroupFor_Suspicious = GroupPlainConfiguration | Suspicious;
|
|
617
|
+
export type GroupMatcher = ImportMatcher | SourceMatcher;
|
|
618
|
+
export type Patterns = PatternOptions;
|
|
619
|
+
/**
|
|
620
|
+
* A list of rules that belong to this group
|
|
621
|
+
*/
|
|
622
|
+
export interface Correctness {
|
|
623
|
+
/**
|
|
624
|
+
* Prevent passing of children as props.
|
|
625
|
+
*/
|
|
626
|
+
noChildrenProp?: NoChildrenPropConfiguration | null;
|
|
627
|
+
/**
|
|
628
|
+
* Prevents from having const variables being re-assigned.
|
|
629
|
+
*/
|
|
630
|
+
noConstAssign?: NoConstAssignConfiguration | null;
|
|
631
|
+
/**
|
|
632
|
+
* Disallow constant expressions in conditions
|
|
633
|
+
*/
|
|
634
|
+
noConstantCondition?: NoConstantConditionConfiguration | null;
|
|
635
|
+
/**
|
|
636
|
+
* Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant.
|
|
637
|
+
*/
|
|
638
|
+
noConstantMathMinMaxClamp?: NoConstantMathMinMaxClampConfiguration | null;
|
|
639
|
+
/**
|
|
640
|
+
* Disallow returning a value from a constructor.
|
|
641
|
+
*/
|
|
642
|
+
noConstructorReturn?: NoConstructorReturnConfiguration | null;
|
|
643
|
+
/**
|
|
644
|
+
* Disallow empty character classes in regular expression literals.
|
|
645
|
+
*/
|
|
646
|
+
noEmptyCharacterClassInRegex?: NoEmptyCharacterClassInRegexConfiguration | null;
|
|
647
|
+
/**
|
|
648
|
+
* Disallows empty destructuring patterns.
|
|
649
|
+
*/
|
|
650
|
+
noEmptyPattern?: NoEmptyPatternConfiguration | null;
|
|
651
|
+
/**
|
|
652
|
+
* Disallow the use of __dirname and __filename in the global scope.
|
|
653
|
+
*/
|
|
654
|
+
noGlobalDirnameFilename?: NoGlobalDirnameFilenameConfiguration | null;
|
|
655
|
+
/**
|
|
656
|
+
* Disallow calling global object properties as functions
|
|
657
|
+
*/
|
|
658
|
+
noGlobalObjectCalls?: NoGlobalObjectCallsConfiguration | null;
|
|
659
|
+
/**
|
|
660
|
+
* Disallow function and var declarations that are accessible outside their block.
|
|
661
|
+
*/
|
|
662
|
+
noInnerDeclarations?: NoInnerDeclarationsConfiguration | null;
|
|
663
|
+
/**
|
|
664
|
+
* Ensure that builtins are correctly instantiated.
|
|
665
|
+
*/
|
|
666
|
+
noInvalidBuiltinInstantiation?: NoInvalidBuiltinInstantiationConfiguration | null;
|
|
667
|
+
/**
|
|
668
|
+
* Prevents the incorrect use of super() inside classes. It also checks whether a call super() is missing from classes that extends other constructors.
|
|
669
|
+
*/
|
|
670
|
+
noInvalidConstructorSuper?: NoInvalidConstructorSuperConfiguration | null;
|
|
671
|
+
/**
|
|
672
|
+
* Disallow non-standard direction values for linear gradient functions.
|
|
673
|
+
*/
|
|
674
|
+
noInvalidDirectionInLinearGradient?: NoInvalidDirectionInLinearGradientConfiguration | null;
|
|
675
|
+
/**
|
|
676
|
+
* Disallows invalid named grid areas in CSS Grid Layouts.
|
|
677
|
+
*/
|
|
678
|
+
noInvalidGridAreas?: NoInvalidGridAreasConfiguration | null;
|
|
679
|
+
/**
|
|
680
|
+
* Disallow the use of @import at-rules in invalid positions.
|
|
681
|
+
*/
|
|
682
|
+
noInvalidPositionAtImportRule?: NoInvalidPositionAtImportRuleConfiguration | null;
|
|
683
|
+
/**
|
|
684
|
+
* Disallow the use of variables and function parameters before their declaration
|
|
685
|
+
*/
|
|
686
|
+
noInvalidUseBeforeDeclaration?: NoInvalidUseBeforeDeclarationConfiguration | null;
|
|
687
|
+
/**
|
|
688
|
+
* Disallow missing var function for css variables.
|
|
689
|
+
*/
|
|
690
|
+
noMissingVarFunction?: NoMissingVarFunctionConfiguration | null;
|
|
691
|
+
/**
|
|
692
|
+
* Disallows defining React components inside other components.
|
|
693
|
+
*/
|
|
694
|
+
noNestedComponentDefinitions?: NoNestedComponentDefinitionsConfiguration | null;
|
|
695
|
+
/**
|
|
696
|
+
* Forbid the use of Node.js builtin modules.
|
|
697
|
+
*/
|
|
698
|
+
noNodejsModules?: NoNodejsModulesConfiguration | null;
|
|
699
|
+
/**
|
|
700
|
+
* Disallow \8 and \9 escape sequences in string literals.
|
|
701
|
+
*/
|
|
702
|
+
noNonoctalDecimalEscape?: NoNonoctalDecimalEscapeConfiguration | null;
|
|
703
|
+
/**
|
|
704
|
+
* Disallow literal numbers that lose precision
|
|
705
|
+
*/
|
|
706
|
+
noPrecisionLoss?: NoPrecisionLossConfiguration | null;
|
|
707
|
+
/**
|
|
708
|
+
* Restrict imports of private exports.
|
|
709
|
+
*/
|
|
710
|
+
noPrivateImports?: NoPrivateImportsConfiguration | null;
|
|
711
|
+
/**
|
|
712
|
+
* Disallow the use of process global.
|
|
713
|
+
*/
|
|
714
|
+
noProcessGlobal?: NoProcessGlobalConfiguration | null;
|
|
715
|
+
/**
|
|
716
|
+
* Disallow useVisibleTask$() functions in Qwik components.
|
|
717
|
+
*/
|
|
718
|
+
noQwikUseVisibleTask?: NoQwikUseVisibleTaskConfiguration | null;
|
|
719
|
+
/**
|
|
720
|
+
* Disallow assigning to React component props.
|
|
721
|
+
*/
|
|
722
|
+
noReactPropAssignments?: NoReactPropAssignmentsConfiguration | null;
|
|
723
|
+
/**
|
|
724
|
+
* Prevent the usage of the return value of React.render.
|
|
725
|
+
*/
|
|
726
|
+
noRenderReturnValue?: NoRenderReturnValueConfiguration | null;
|
|
727
|
+
/**
|
|
728
|
+
* Disallow the use of configured elements.
|
|
729
|
+
*/
|
|
730
|
+
noRestrictedElements?: NoRestrictedElementsConfiguration | null;
|
|
731
|
+
/**
|
|
732
|
+
* Disallow assignments where both sides are exactly the same.
|
|
733
|
+
*/
|
|
734
|
+
noSelfAssign?: NoSelfAssignConfiguration | null;
|
|
735
|
+
/**
|
|
736
|
+
* Disallow returning a value from a setter
|
|
737
|
+
*/
|
|
738
|
+
noSetterReturn?: NoSetterReturnConfiguration | null;
|
|
739
|
+
/**
|
|
740
|
+
* Disallow destructuring props inside JSX components in Solid projects.
|
|
741
|
+
*/
|
|
742
|
+
noSolidDestructuredProps?: NoSolidDestructuredPropsConfiguration | null;
|
|
743
|
+
/**
|
|
744
|
+
* Disallow comparison of expressions modifying the string case with non-compliant value.
|
|
745
|
+
*/
|
|
746
|
+
noStringCaseMismatch?: NoStringCaseMismatchConfiguration | null;
|
|
747
|
+
/**
|
|
748
|
+
* Disallow lexical declarations in switch clauses.
|
|
749
|
+
*/
|
|
750
|
+
noSwitchDeclarations?: NoSwitchDeclarationsConfiguration | null;
|
|
751
|
+
/**
|
|
752
|
+
* Disallow the use of dependencies that aren't specified in the package.json.
|
|
753
|
+
*/
|
|
754
|
+
noUndeclaredDependencies?: NoUndeclaredDependenciesConfiguration | null;
|
|
755
|
+
/**
|
|
756
|
+
* Prevents the usage of variables that haven't been declared inside the document.
|
|
757
|
+
*/
|
|
758
|
+
noUndeclaredVariables?: NoUndeclaredVariablesConfiguration | null;
|
|
759
|
+
/**
|
|
760
|
+
* Disallow unknown CSS value functions.
|
|
761
|
+
*/
|
|
762
|
+
noUnknownFunction?: NoUnknownFunctionConfiguration | null;
|
|
763
|
+
/**
|
|
764
|
+
* Disallow unknown media feature names.
|
|
765
|
+
*/
|
|
766
|
+
noUnknownMediaFeatureName?: NoUnknownMediaFeatureNameConfiguration | null;
|
|
767
|
+
/**
|
|
768
|
+
* Disallow unknown properties.
|
|
769
|
+
*/
|
|
770
|
+
noUnknownProperty?: NoUnknownPropertyConfiguration | null;
|
|
771
|
+
/**
|
|
772
|
+
* Disallow unknown pseudo-class selectors.
|
|
773
|
+
*/
|
|
774
|
+
noUnknownPseudoClass?: NoUnknownPseudoClassConfiguration | null;
|
|
775
|
+
/**
|
|
776
|
+
* Disallow unknown pseudo-element selectors.
|
|
777
|
+
*/
|
|
778
|
+
noUnknownPseudoElement?: NoUnknownPseudoElementConfiguration | null;
|
|
779
|
+
/**
|
|
780
|
+
* Disallow unknown type selectors.
|
|
781
|
+
*/
|
|
782
|
+
noUnknownTypeSelector?: NoUnknownTypeSelectorConfiguration | null;
|
|
783
|
+
/**
|
|
784
|
+
* Disallow unknown CSS units.
|
|
785
|
+
*/
|
|
786
|
+
noUnknownUnit?: NoUnknownUnitConfiguration | null;
|
|
787
|
+
/**
|
|
788
|
+
* Disallow unmatchable An+B selectors.
|
|
789
|
+
*/
|
|
790
|
+
noUnmatchableAnbSelector?: NoUnmatchableAnbSelectorConfiguration | null;
|
|
791
|
+
/**
|
|
792
|
+
* Disallow unreachable code
|
|
793
|
+
*/
|
|
794
|
+
noUnreachable?: NoUnreachableConfiguration | null;
|
|
795
|
+
/**
|
|
796
|
+
* 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
|
|
797
|
+
*/
|
|
798
|
+
noUnreachableSuper?: NoUnreachableSuperConfiguration | null;
|
|
799
|
+
/**
|
|
800
|
+
* Disallow control flow statements in finally blocks.
|
|
801
|
+
*/
|
|
802
|
+
noUnsafeFinally?: NoUnsafeFinallyConfiguration | null;
|
|
803
|
+
/**
|
|
804
|
+
* Disallow the use of optional chaining in contexts where the undefined value is not allowed.
|
|
805
|
+
*/
|
|
806
|
+
noUnsafeOptionalChaining?: NoUnsafeOptionalChainingConfiguration | null;
|
|
807
|
+
/**
|
|
808
|
+
* Disallow unused function parameters.
|
|
809
|
+
*/
|
|
810
|
+
noUnusedFunctionParameters?: NoUnusedFunctionParametersConfiguration | null;
|
|
811
|
+
/**
|
|
812
|
+
* Disallow unused imports.
|
|
813
|
+
*/
|
|
814
|
+
noUnusedImports?: NoUnusedImportsConfiguration | null;
|
|
815
|
+
/**
|
|
816
|
+
* Disallow unused labels.
|
|
817
|
+
*/
|
|
818
|
+
noUnusedLabels?: NoUnusedLabelsConfiguration | null;
|
|
819
|
+
/**
|
|
820
|
+
* Disallow unused private class members
|
|
821
|
+
*/
|
|
822
|
+
noUnusedPrivateClassMembers?: NoUnusedPrivateClassMembersConfiguration | null;
|
|
823
|
+
/**
|
|
824
|
+
* Disallow unused variables.
|
|
825
|
+
*/
|
|
826
|
+
noUnusedVariables?: NoUnusedVariablesConfiguration | null;
|
|
827
|
+
/**
|
|
828
|
+
* This rules prevents void elements (AKA self-closing elements) from having children.
|
|
829
|
+
*/
|
|
830
|
+
noVoidElementsWithChildren?: NoVoidElementsWithChildrenConfiguration | null;
|
|
831
|
+
/**
|
|
832
|
+
* Disallow returning a value from a function with the return type 'void'
|
|
833
|
+
*/
|
|
834
|
+
noVoidTypeReturn?: NoVoidTypeReturnConfiguration | null;
|
|
835
|
+
/**
|
|
836
|
+
* Enables the recommended rules for this group
|
|
837
|
+
*/
|
|
838
|
+
recommended?: boolean | null;
|
|
839
|
+
/**
|
|
840
|
+
* Enforce all dependencies are correctly specified in a React hook.
|
|
841
|
+
*/
|
|
842
|
+
useExhaustiveDependencies?: UseExhaustiveDependenciesConfiguration | null;
|
|
843
|
+
/**
|
|
844
|
+
* Enforce specifying the name of GraphQL operations.
|
|
845
|
+
*/
|
|
846
|
+
useGraphqlNamedOperations?: UseGraphqlNamedOperationsConfiguration | null;
|
|
847
|
+
/**
|
|
848
|
+
* Enforce that all React hooks are being called from the Top Level component functions.
|
|
849
|
+
*/
|
|
850
|
+
useHookAtTopLevel?: UseHookAtTopLevelConfiguration | null;
|
|
851
|
+
/**
|
|
852
|
+
* Enforces that \<img> elements have both width and height attributes.
|
|
853
|
+
*/
|
|
854
|
+
useImageSize?: UseImageSizeConfiguration | null;
|
|
855
|
+
/**
|
|
856
|
+
* Enforce file extensions for relative imports.
|
|
857
|
+
*/
|
|
858
|
+
useImportExtensions?: UseImportExtensionsConfiguration | null;
|
|
859
|
+
/**
|
|
860
|
+
* Require calls to isNaN() when checking for NaN.
|
|
861
|
+
*/
|
|
862
|
+
useIsNan?: UseIsNanConfiguration | null;
|
|
863
|
+
/**
|
|
864
|
+
* Enforces the use of with { type: "json" } for JSON module imports.
|
|
865
|
+
*/
|
|
866
|
+
useJsonImportAttributes?: UseJsonImportAttributesConfiguration | null;
|
|
867
|
+
/**
|
|
868
|
+
* Disallow missing key props in iterators/collection literals.
|
|
869
|
+
*/
|
|
870
|
+
useJsxKeyInIterable?: UseJsxKeyInIterableConfiguration | null;
|
|
871
|
+
/**
|
|
872
|
+
* Enforce the consistent use of the radix argument when using parseInt().
|
|
873
|
+
*/
|
|
874
|
+
useParseIntRadix?: UseParseIntRadixConfiguration | null;
|
|
875
|
+
/**
|
|
876
|
+
* Prefer using the class prop as a classlist over the classnames helper.
|
|
877
|
+
*/
|
|
878
|
+
useQwikClasslist?: UseQwikClasslistConfiguration | null;
|
|
879
|
+
/**
|
|
880
|
+
* Enforce JSDoc comment lines to start with a single asterisk, except for the first one.
|
|
881
|
+
*/
|
|
882
|
+
useSingleJsDocAsterisk?: UseSingleJsDocAsteriskConfiguration | null;
|
|
883
|
+
/**
|
|
884
|
+
* Prevent the usage of static string literal id attribute on elements.
|
|
885
|
+
*/
|
|
886
|
+
useUniqueElementIds?: UseUniqueElementIdsConfiguration | null;
|
|
887
|
+
/**
|
|
888
|
+
* Enforce "for" loop update clause moving the counter in the right direction.
|
|
889
|
+
*/
|
|
890
|
+
useValidForDirection?: UseValidForDirectionConfiguration | null;
|
|
891
|
+
/**
|
|
892
|
+
* This rule checks that the result of a typeof expression is compared to a valid value.
|
|
893
|
+
*/
|
|
894
|
+
useValidTypeof?: UseValidTypeofConfiguration | null;
|
|
895
|
+
/**
|
|
896
|
+
* Require generator functions to contain yield.
|
|
897
|
+
*/
|
|
898
|
+
useYield?: UseYieldConfiguration | null;
|
|
899
|
+
}
|
|
900
|
+
export type SeverityOrGroupFor_Nursery = GroupPlainConfiguration | Nursery;
|
|
901
|
+
export interface RuleWithUseNamingConventionOptions {
|
|
902
|
+
/**
|
|
903
|
+
* The kind of the code actions emitted by the rule
|
|
904
|
+
*/
|
|
905
|
+
fix?: FixKind | null;
|
|
906
|
+
/**
|
|
907
|
+
* The severity of the emitted diagnostics by the rule
|
|
908
|
+
*/
|
|
909
|
+
level: RulePlainConfiguration;
|
|
910
|
+
/**
|
|
911
|
+
* Rule's options
|
|
912
|
+
*/
|
|
913
|
+
options?: UseNamingConventionOptions;
|
|
914
|
+
}
|
|
915
|
+
export type ImportGroup = null | GroupMatcher | GroupMatcher[];
|
|
916
|
+
export interface NoRestrictedImportsOptions {
|
|
917
|
+
/**
|
|
918
|
+
* A list of import paths that should trigger the rule.
|
|
919
|
+
*/
|
|
920
|
+
paths?: {
|
|
921
|
+
[k: string]: Paths;
|
|
922
|
+
} | null;
|
|
923
|
+
/**
|
|
924
|
+
* gitignore-style patterns that should trigger the rule.
|
|
925
|
+
*/
|
|
926
|
+
patterns?: Patterns[] | null;
|
|
927
|
+
}
|
|
928
|
+
export type SeverityOrGroupFor_Correctness = GroupPlainConfiguration | Correctness;
|
|
929
|
+
export type UseNamingConventionConfiguration = RulePlainConfiguration | RuleWithUseNamingConventionOptions;
|
|
930
|
+
export type ImportGroups = ImportGroup[];
|
|
931
|
+
export interface RuleWithNoRestrictedImportsOptions {
|
|
932
|
+
/**
|
|
933
|
+
* The severity of the emitted diagnostics by the rule
|
|
934
|
+
*/
|
|
935
|
+
level: RulePlainConfiguration;
|
|
936
|
+
/**
|
|
937
|
+
* Rule's options
|
|
938
|
+
*/
|
|
939
|
+
options?: NoRestrictedImportsOptions;
|
|
940
|
+
}
|
|
941
|
+
export interface OrganizeImportsOptions {
|
|
942
|
+
groups?: ImportGroups | null;
|
|
943
|
+
identifierOrder?: SortOrder | null;
|
|
944
|
+
}
|
|
945
|
+
export type NoRestrictedImportsConfiguration = RulePlainConfiguration | RuleWithNoRestrictedImportsOptions;
|
|
946
|
+
export interface RuleAssistWithOptionsFor_OrganizeImportsOptions {
|
|
947
|
+
/**
|
|
948
|
+
* The severity of the emitted diagnostics by the rule
|
|
949
|
+
*/
|
|
950
|
+
level: RuleAssistPlainConfiguration;
|
|
951
|
+
/**
|
|
952
|
+
* Rule's options
|
|
953
|
+
*/
|
|
954
|
+
options: OrganizeImportsOptions;
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* A list of rules that belong to this group
|
|
958
|
+
*/
|
|
959
|
+
export interface Style {
|
|
960
|
+
/**
|
|
961
|
+
* Disallow use of CommonJs module system in favor of ESM style imports.
|
|
962
|
+
*/
|
|
963
|
+
noCommonJs?: NoCommonJsConfiguration | null;
|
|
964
|
+
/**
|
|
965
|
+
* Disallow default exports.
|
|
966
|
+
*/
|
|
967
|
+
noDefaultExport?: NoDefaultExportConfiguration | null;
|
|
968
|
+
/**
|
|
969
|
+
* Disallow a lower specificity selector from coming after a higher specificity selector.
|
|
970
|
+
*/
|
|
971
|
+
noDescendingSpecificity?: NoDescendingSpecificityConfiguration | null;
|
|
972
|
+
/**
|
|
973
|
+
* Disallow using a callback in asynchronous tests and hooks.
|
|
974
|
+
*/
|
|
975
|
+
noDoneCallback?: NoDoneCallbackConfiguration | null;
|
|
976
|
+
/**
|
|
977
|
+
* Disallow TypeScript enum.
|
|
978
|
+
*/
|
|
979
|
+
noEnum?: NoEnumConfiguration | null;
|
|
980
|
+
/**
|
|
981
|
+
* Disallow exporting an imported variable.
|
|
982
|
+
*/
|
|
983
|
+
noExportedImports?: NoExportedImportsConfiguration | null;
|
|
984
|
+
/**
|
|
985
|
+
* Prevent usage of \<head> element in a Next.js project.
|
|
986
|
+
*/
|
|
987
|
+
noHeadElement?: NoHeadElementConfiguration | null;
|
|
988
|
+
/**
|
|
989
|
+
* Disallow implicit true values on JSX boolean attributes
|
|
990
|
+
*/
|
|
991
|
+
noImplicitBoolean?: NoImplicitBooleanConfiguration | null;
|
|
992
|
+
/**
|
|
993
|
+
* Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.
|
|
994
|
+
*/
|
|
995
|
+
noInferrableTypes?: NoInferrableTypesConfiguration | null;
|
|
996
|
+
/**
|
|
997
|
+
* Reports usage of "magic numbers" — numbers used directly instead of being assigned to named constants.
|
|
998
|
+
*/
|
|
999
|
+
noMagicNumbers?: NoMagicNumbersConfiguration | null;
|
|
1000
|
+
/**
|
|
1001
|
+
* Disallow the use of TypeScript's namespaces.
|
|
1002
|
+
*/
|
|
1003
|
+
noNamespace?: NoNamespaceConfiguration | null;
|
|
1004
|
+
/**
|
|
1005
|
+
* Disallow negation in the condition of an if statement if it has an else clause.
|
|
1006
|
+
*/
|
|
1007
|
+
noNegationElse?: NoNegationElseConfiguration | null;
|
|
1008
|
+
/**
|
|
1009
|
+
* Disallow nested ternary expressions.
|
|
1010
|
+
*/
|
|
1011
|
+
noNestedTernary?: NoNestedTernaryConfiguration | null;
|
|
1012
|
+
/**
|
|
1013
|
+
* Disallow non-null assertions using the ! postfix operator.
|
|
1014
|
+
*/
|
|
1015
|
+
noNonNullAssertion?: NoNonNullAssertionConfiguration | null;
|
|
1016
|
+
/**
|
|
1017
|
+
* Disallow reassigning function parameters.
|
|
1018
|
+
*/
|
|
1019
|
+
noParameterAssign?: NoParameterAssignConfiguration | null;
|
|
1020
|
+
/**
|
|
1021
|
+
* Disallow the use of parameter properties in class constructors.
|
|
1022
|
+
*/
|
|
1023
|
+
noParameterProperties?: NoParameterPropertiesConfiguration | null;
|
|
1024
|
+
/**
|
|
1025
|
+
* Disallow the use of process.env.
|
|
1026
|
+
*/
|
|
1027
|
+
noProcessEnv?: NoProcessEnvConfiguration | null;
|
|
1028
|
+
/**
|
|
1029
|
+
* This rule allows you to specify global variable names that you don’t want to use in your application.
|
|
1030
|
+
*/
|
|
1031
|
+
noRestrictedGlobals?: NoRestrictedGlobalsConfiguration | null;
|
|
1032
|
+
/**
|
|
1033
|
+
* Disallow specified modules when loaded by import or require.
|
|
1034
|
+
*/
|
|
1035
|
+
noRestrictedImports?: NoRestrictedImportsConfiguration | null;
|
|
1036
|
+
/**
|
|
1037
|
+
* Disallow user defined types.
|
|
1038
|
+
*/
|
|
1039
|
+
noRestrictedTypes?: NoRestrictedTypesConfiguration | null;
|
|
1040
|
+
/**
|
|
1041
|
+
* Disallow the use of constants which its value is the upper-case version of its name.
|
|
1042
|
+
*/
|
|
1043
|
+
noShoutyConstants?: NoShoutyConstantsConfiguration | null;
|
|
1044
|
+
/**
|
|
1045
|
+
* Enforce the use of String.slice() over String.substr() and String.substring().
|
|
1046
|
+
*/
|
|
1047
|
+
noSubstr?: NoSubstrConfiguration | null;
|
|
1048
|
+
/**
|
|
1049
|
+
* Disallow template literals if interpolation and special-character handling are not needed
|
|
1050
|
+
*/
|
|
1051
|
+
noUnusedTemplateLiteral?: NoUnusedTemplateLiteralConfiguration | null;
|
|
1052
|
+
/**
|
|
1053
|
+
* Disallow else block when the if block breaks early.
|
|
1054
|
+
*/
|
|
1055
|
+
noUselessElse?: NoUselessElseConfiguration | null;
|
|
1056
|
+
/**
|
|
1057
|
+
* Disallow use of @value rule in css modules.
|
|
1058
|
+
*/
|
|
1059
|
+
noValueAtRule?: NoValueAtRuleConfiguration | null;
|
|
1060
|
+
/**
|
|
1061
|
+
* Disallow the use of yoda expressions.
|
|
1062
|
+
*/
|
|
1063
|
+
noYodaExpression?: NoYodaExpressionConfiguration | null;
|
|
1064
|
+
/**
|
|
1065
|
+
* Enables the recommended rules for this group
|
|
1066
|
+
*/
|
|
1067
|
+
recommended?: boolean | null;
|
|
1068
|
+
/**
|
|
1069
|
+
* Disallow Array constructors.
|
|
1070
|
+
*/
|
|
1071
|
+
useArrayLiterals?: UseArrayLiteralsConfiguration | null;
|
|
1072
|
+
/**
|
|
1073
|
+
* Enforce the use of as const over literal type and type annotation.
|
|
1074
|
+
*/
|
|
1075
|
+
useAsConstAssertion?: UseAsConstAssertionConfiguration | null;
|
|
1076
|
+
/**
|
|
1077
|
+
* Use at() instead of integer index access.
|
|
1078
|
+
*/
|
|
1079
|
+
useAtIndex?: UseAtIndexConfiguration | null;
|
|
1080
|
+
/**
|
|
1081
|
+
* Requires following curly brace conventions.
|
|
1082
|
+
*/
|
|
1083
|
+
useBlockStatements?: UseBlockStatementsConfiguration | null;
|
|
1084
|
+
/**
|
|
1085
|
+
* Enforce using else if instead of nested if in else clauses.
|
|
1086
|
+
*/
|
|
1087
|
+
useCollapsedElseIf?: UseCollapsedElseIfConfiguration | null;
|
|
1088
|
+
/**
|
|
1089
|
+
* Enforce using single if instead of nested if clauses.
|
|
1090
|
+
*/
|
|
1091
|
+
useCollapsedIf?: UseCollapsedIfConfiguration | null;
|
|
1092
|
+
/**
|
|
1093
|
+
* Enforce declaring components only within modules that export React Components exclusively.
|
|
1094
|
+
*/
|
|
1095
|
+
useComponentExportOnlyModules?: UseComponentExportOnlyModulesConfiguration | null;
|
|
1096
|
+
/**
|
|
1097
|
+
* Require consistently using either T\[] or Array\<T>
|
|
1098
|
+
*/
|
|
1099
|
+
useConsistentArrayType?: UseConsistentArrayTypeConfiguration | null;
|
|
1100
|
+
/**
|
|
1101
|
+
* Enforce the use of new for all builtins, except String, Number and Boolean.
|
|
1102
|
+
*/
|
|
1103
|
+
useConsistentBuiltinInstantiation?: UseConsistentBuiltinInstantiationConfiguration | null;
|
|
1104
|
+
/**
|
|
1105
|
+
* This rule enforces consistent use of curly braces inside JSX attributes and JSX children.
|
|
1106
|
+
*/
|
|
1107
|
+
useConsistentCurlyBraces?: UseConsistentCurlyBracesConfiguration | null;
|
|
1108
|
+
/**
|
|
1109
|
+
* Require consistent accessibility modifiers on class properties and methods.
|
|
1110
|
+
*/
|
|
1111
|
+
useConsistentMemberAccessibility?: UseConsistentMemberAccessibilityConfiguration | null;
|
|
1112
|
+
/**
|
|
1113
|
+
* Require the consistent declaration of object literals. Defaults to explicit definitions.
|
|
1114
|
+
*/
|
|
1115
|
+
useConsistentObjectDefinitions?: UseConsistentObjectDefinitionsConfiguration | null;
|
|
1116
|
+
/**
|
|
1117
|
+
* Enforce type definitions to consistently use either interface or type.
|
|
1118
|
+
*/
|
|
1119
|
+
useConsistentTypeDefinitions?: UseConsistentTypeDefinitionsConfiguration | null;
|
|
1120
|
+
/**
|
|
1121
|
+
* Require const declarations for variables that are only assigned once.
|
|
1122
|
+
*/
|
|
1123
|
+
useConst?: UseConstConfiguration | null;
|
|
1124
|
+
/**
|
|
1125
|
+
* Enforce default function parameters and optional function parameters to be last.
|
|
1126
|
+
*/
|
|
1127
|
+
useDefaultParameterLast?: UseDefaultParameterLastConfiguration | null;
|
|
1128
|
+
/**
|
|
1129
|
+
* Require the default clause in switch statements.
|
|
1130
|
+
*/
|
|
1131
|
+
useDefaultSwitchClause?: UseDefaultSwitchClauseConfiguration | null;
|
|
1132
|
+
/**
|
|
1133
|
+
* Require specifying the reason argument when using @deprecated directive
|
|
1134
|
+
*/
|
|
1135
|
+
useDeprecatedReason?: UseDeprecatedReasonConfiguration | null;
|
|
1136
|
+
/**
|
|
1137
|
+
* Require that each enum member value be explicitly initialized.
|
|
1138
|
+
*/
|
|
1139
|
+
useEnumInitializers?: UseEnumInitializersConfiguration | null;
|
|
1140
|
+
/**
|
|
1141
|
+
* Enforce explicitly comparing the length, size, byteLength or byteOffset property of a value.
|
|
1142
|
+
*/
|
|
1143
|
+
useExplicitLengthCheck?: UseExplicitLengthCheckConfiguration | null;
|
|
1144
|
+
/**
|
|
1145
|
+
* Disallow the use of Math.pow in favor of the ** operator.
|
|
1146
|
+
*/
|
|
1147
|
+
useExponentiationOperator?: UseExponentiationOperatorConfiguration | null;
|
|
1148
|
+
/**
|
|
1149
|
+
* Promotes the use of export type for types.
|
|
1150
|
+
*/
|
|
1151
|
+
useExportType?: UseExportTypeConfiguration | null;
|
|
1152
|
+
/**
|
|
1153
|
+
* Require that all exports are declared after all non-export statements.
|
|
1154
|
+
*/
|
|
1155
|
+
useExportsLast?: UseExportsLastConfiguration | null;
|
|
1156
|
+
/**
|
|
1157
|
+
* Enforce naming conventions for JavaScript and TypeScript filenames.
|
|
1158
|
+
*/
|
|
1159
|
+
useFilenamingConvention?: UseFilenamingConventionConfiguration | null;
|
|
1160
|
+
/**
|
|
1161
|
+
* Prefer using for...of loops over standard for loops where possible.
|
|
1162
|
+
*/
|
|
1163
|
+
useForOf?: UseForOfConfiguration | null;
|
|
1164
|
+
/**
|
|
1165
|
+
* This rule enforces the use of \<>...\</> over \<Fragment>...\</Fragment>.
|
|
1166
|
+
*/
|
|
1167
|
+
useFragmentSyntax?: UseFragmentSyntaxConfiguration | null;
|
|
1168
|
+
/**
|
|
1169
|
+
* Validates that all enum values are capitalized.
|
|
1170
|
+
*/
|
|
1171
|
+
useGraphqlNamingConvention?: UseGraphqlNamingConventionConfiguration | null;
|
|
1172
|
+
/**
|
|
1173
|
+
* Enforce that getters and setters for the same property are adjacent in class and object definitions.
|
|
1174
|
+
*/
|
|
1175
|
+
useGroupedAccessorPairs?: UseGroupedAccessorPairsConfiguration | null;
|
|
1176
|
+
/**
|
|
1177
|
+
* Promotes the use of import type for types.
|
|
1178
|
+
*/
|
|
1179
|
+
useImportType?: UseImportTypeConfiguration | null;
|
|
1180
|
+
/**
|
|
1181
|
+
* Require all enum members to be literal values.
|
|
1182
|
+
*/
|
|
1183
|
+
useLiteralEnumMembers?: UseLiteralEnumMembersConfiguration | null;
|
|
1184
|
+
/**
|
|
1185
|
+
* Enforce naming conventions for everything across a codebase.
|
|
1186
|
+
*/
|
|
1187
|
+
useNamingConvention?: UseNamingConventionConfiguration | null;
|
|
1188
|
+
/**
|
|
1189
|
+
* Promotes the usage of node:assert/strict over node:assert.
|
|
1190
|
+
*/
|
|
1191
|
+
useNodeAssertStrict?: UseNodeAssertStrictConfiguration | null;
|
|
1192
|
+
/**
|
|
1193
|
+
* Enforces using the node: protocol for Node.js builtin modules.
|
|
1194
|
+
*/
|
|
1195
|
+
useNodejsImportProtocol?: UseNodejsImportProtocolConfiguration | null;
|
|
1196
|
+
/**
|
|
1197
|
+
* Use the Number properties instead of global ones.
|
|
1198
|
+
*/
|
|
1199
|
+
useNumberNamespace?: UseNumberNamespaceConfiguration | null;
|
|
1200
|
+
/**
|
|
1201
|
+
* Enforce the use of numeric separators in numeric literals.
|
|
1202
|
+
*/
|
|
1203
|
+
useNumericSeparators?: UseNumericSeparatorsConfiguration | null;
|
|
1204
|
+
/**
|
|
1205
|
+
* Prefer object spread over Object.assign() when constructing new objects.
|
|
1206
|
+
*/
|
|
1207
|
+
useObjectSpread?: UseObjectSpreadConfiguration | null;
|
|
1208
|
+
/**
|
|
1209
|
+
* Enforce that components are defined as functions and never as classes.
|
|
1210
|
+
*/
|
|
1211
|
+
useReactFunctionComponents?: UseReactFunctionComponentsConfiguration | null;
|
|
1212
|
+
/**
|
|
1213
|
+
* Enforce marking members as readonly if they are never modified outside the constructor.
|
|
1214
|
+
*/
|
|
1215
|
+
useReadonlyClassProperties?: UseReadonlyClassPropertiesConfiguration | null;
|
|
1216
|
+
/**
|
|
1217
|
+
* Prevent extra closing tags for components without children.
|
|
1218
|
+
*/
|
|
1219
|
+
useSelfClosingElements?: UseSelfClosingElementsConfiguration | null;
|
|
1220
|
+
/**
|
|
1221
|
+
* Require assignment operator shorthand where possible.
|
|
1222
|
+
*/
|
|
1223
|
+
useShorthandAssign?: UseShorthandAssignConfiguration | null;
|
|
1224
|
+
/**
|
|
1225
|
+
* Enforce using function types instead of object type with call signatures.
|
|
1226
|
+
*/
|
|
1227
|
+
useShorthandFunctionType?: UseShorthandFunctionTypeConfiguration | null;
|
|
1228
|
+
/**
|
|
1229
|
+
* Disallow multiple variable declarations in the same variable statement
|
|
1230
|
+
*/
|
|
1231
|
+
useSingleVarDeclarator?: UseSingleVarDeclaratorConfiguration | null;
|
|
1232
|
+
/**
|
|
1233
|
+
* Require a description parameter for the Symbol().
|
|
1234
|
+
*/
|
|
1235
|
+
useSymbolDescription?: UseSymbolDescriptionConfiguration | null;
|
|
1236
|
+
/**
|
|
1237
|
+
* Prefer template literals over string concatenation.
|
|
1238
|
+
*/
|
|
1239
|
+
useTemplate?: UseTemplateConfiguration | null;
|
|
1240
|
+
/**
|
|
1241
|
+
* Require new when throwing an error.
|
|
1242
|
+
*/
|
|
1243
|
+
useThrowNewError?: UseThrowNewErrorConfiguration | null;
|
|
1244
|
+
/**
|
|
1245
|
+
* Disallow throwing non-Error values.
|
|
1246
|
+
*/
|
|
1247
|
+
useThrowOnlyError?: UseThrowOnlyErrorConfiguration | null;
|
|
1248
|
+
/**
|
|
1249
|
+
* Enforce the use of String.trimStart() and String.trimEnd() over String.trimLeft() and String.trimRight().
|
|
1250
|
+
*/
|
|
1251
|
+
useTrimStartEnd?: UseTrimStartEndConfiguration | null;
|
|
1252
|
+
/**
|
|
1253
|
+
* Disallow overload signatures that can be unified into a single signature.
|
|
1254
|
+
*/
|
|
1255
|
+
useUnifiedTypeSignatures?: UseUnifiedTypeSignaturesConfiguration | null;
|
|
1256
|
+
}
|
|
1257
|
+
export type RuleAssistConfigurationFor_OrganizeImportsOptions = RuleAssistPlainConfiguration | RuleAssistWithOptionsFor_OrganizeImportsOptions;
|
|
1258
|
+
export type SeverityOrGroupFor_Style = GroupPlainConfiguration | Style;
|
|
1259
|
+
/**
|
|
1260
|
+
* A list of rules that belong to this group
|
|
1261
|
+
*/
|
|
1262
|
+
export interface Source {
|
|
1263
|
+
/**
|
|
1264
|
+
* Provides a code action to sort the imports and exports in the file using a built-in or custom order.
|
|
1265
|
+
*/
|
|
1266
|
+
organizeImports?: RuleAssistConfigurationFor_OrganizeImportsOptions | null;
|
|
1267
|
+
/**
|
|
1268
|
+
* Enables the recommended rules for this group
|
|
1269
|
+
*/
|
|
1270
|
+
recommended?: boolean | null;
|
|
1271
|
+
/**
|
|
1272
|
+
* Enforce attribute sorting in JSX elements.
|
|
1273
|
+
*/
|
|
1274
|
+
useSortedAttributes?: RuleAssistConfigurationFor_UseSortedAttributesOptions | null;
|
|
1275
|
+
/**
|
|
1276
|
+
* Sort the keys of a JSON object in natural order.
|
|
1277
|
+
*/
|
|
1278
|
+
useSortedKeys?: RuleAssistConfigurationFor_UseSortedKeysOptions | null;
|
|
1279
|
+
/**
|
|
1280
|
+
* Enforce ordering of CSS properties and nested rules.
|
|
1281
|
+
*/
|
|
1282
|
+
useSortedProperties?: RuleAssistConfigurationFor_UseSortedPropertiesOptions | null;
|
|
1283
|
+
}
|
|
1284
|
+
export interface Rules {
|
|
1285
|
+
a11y?: SeverityOrGroupFor_A11Y | null;
|
|
1286
|
+
complexity?: SeverityOrGroupFor_Complexity | null;
|
|
1287
|
+
correctness?: SeverityOrGroupFor_Correctness | null;
|
|
1288
|
+
nursery?: SeverityOrGroupFor_Nursery | null;
|
|
1289
|
+
performance?: SeverityOrGroupFor_Performance | null;
|
|
1290
|
+
/**
|
|
1291
|
+
* It enables the lint rules recommended by Biome. `true` by default.
|
|
1292
|
+
*/
|
|
1293
|
+
recommended?: boolean | null;
|
|
1294
|
+
security?: SeverityOrGroupFor_Security | null;
|
|
1295
|
+
style?: SeverityOrGroupFor_Style | null;
|
|
1296
|
+
suspicious?: SeverityOrGroupFor_Suspicious | null;
|
|
1297
|
+
}
|
|
1298
|
+
export interface Actions {
|
|
1299
|
+
/**
|
|
1300
|
+
* It enables the assist actions recommended by Biome. `true` by default.
|
|
1301
|
+
*/
|
|
1302
|
+
recommended?: boolean | null;
|
|
1303
|
+
source?: Source | null;
|
|
1304
|
+
}
|