javascript.biome.biome_config
Submodule
Protocols
IA11y
- Implemented By: projen.javascript.biome.biome_config.IA11y
A list of rules that belong to this group.
Properties
Name | Type | Description |
---|---|---|
| boolean | It enables ALL rules for this group. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce that the accessKey attribute is not used on any HTML element. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce that aria-hidden="true" is not set on focusable elements. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce that autoFocus prop is not used on elements. |
| string | projen.javascript.biome.biome_config.IRuleWithAllowDomainOptions | Disallow target="_blank" attribute without rel="noreferrer". |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforces that no distracting elements are used. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | The scope prop should be used only on <th> elements. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements. |
| string | projen.javascript.biome.biome_config.IRuleWithNoLabelWithoutControlOptions | Enforce that a label element or component has a text label and an associated input. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce that tabIndex is not assigned to non-interactive HTML elements. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Prevent the usage of positive integers on tabIndex property. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforce img alt prop does not contain the word "image", "picture", or "photo". |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce explicit role property is not the same as implicit/default role property on an element. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforces the usage of the title element for the svg element. |
| boolean | It enables the recommended rules for this group. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforce that all elements that require alternative text have meaningful information to relay back to the end user. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce that anchors have content and that the content is accessible to screen readers. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforce that elements with ARIA roles must have all required ARIA attributes for that role. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforces the usage of the attribute type for the element button. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Elements with an interactive role and interaction handlers must be focusable. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow a missing generic family keyword within font families. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforce that heading elements (h1, h2, etc.) have content and that the content is accessible to screen readers. Accessible means that it is not hidden using the aria-hidden prop. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforce that html element has lang attribute. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforces the usage of the attribute title for the element iframe. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforce onMouseOver / onMouseOut are accompanied by onFocus / onBlur. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforces that audio and video elements must have a track for captions. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | It detects the use of role attributes in JSX elements and suggests using semantic elements instead. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforce that all anchors are valid, and they are navigable elements. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Ensures that ARIA properties aria-* are all valid. |
| string | projen.javascript.biome.biome_config.IRuleWithValidAriaRoleOptions | Elements with ARIA roles must use a valid, non-abstract ARIA role. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforce that ARIA state and property values are valid. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country. |
all
Optional
public readonly all: boolean;
- Type: boolean
It enables ALL rules for this group.
noAccessKey
Optional
public readonly noAccessKey: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce that the accessKey attribute is not used on any HTML element.
noAriaHiddenOnFocusable
Optional
public readonly noAriaHiddenOnFocusable: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce that aria-hidden="true" is not set on focusable elements.
noAriaUnsupportedElements
Optional
public readonly noAriaUnsupportedElements: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
noAutofocus
Optional
public readonly noAutofocus: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce that autoFocus prop is not used on elements.
noBlankTarget
Optional
public readonly noBlankTarget: string | IRuleWithAllowDomainOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithAllowDomainOptions
Disallow target="_blank" attribute without rel="noreferrer".
noDistractingElements
Optional
public readonly noDistractingElements: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforces that no distracting elements are used.
noHeaderScope
Optional
public readonly noHeaderScope: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
The scope prop should be used only on <th> elements.
noInteractiveElementToNoninteractiveRole
Optional
public readonly noInteractiveElementToNoninteractiveRole: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements.
noLabelWithoutControl
Optional
public readonly noLabelWithoutControl: string | IRuleWithNoLabelWithoutControlOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoLabelWithoutControlOptions
Enforce that a label element or component has a text label and an associated input.
noNoninteractiveElementToInteractiveRole
Optional
public readonly noNoninteractiveElementToInteractiveRole: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.
noNoninteractiveTabindex
Optional
public readonly noNoninteractiveTabindex: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce that tabIndex is not assigned to non-interactive HTML elements.
noPositiveTabindex
Optional
public readonly noPositiveTabindex: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Prevent the usage of positive integers on tabIndex property.
noRedundantAlt
Optional
public readonly noRedundantAlt: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforce img alt prop does not contain the word "image", "picture", or "photo".
noRedundantRoles
Optional
public readonly noRedundantRoles: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce explicit role property is not the same as implicit/default role property on an element.
noSvgWithoutTitle
Optional
public readonly noSvgWithoutTitle: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforces the usage of the title element for the svg element.
recommended
Optional
public readonly recommended: boolean;
- Type: boolean
It enables the recommended rules for this group.
useAltText
Optional
public readonly useAltText: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforce that all elements that require alternative text have meaningful information to relay back to the end user.
useAnchorContent
Optional
public readonly useAnchorContent: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce that anchors have content and that the content is accessible to screen readers.
useAriaActivedescendantWithTabindex
Optional
public readonly useAriaActivedescendantWithTabindex: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce that tabIndex is assigned to non-interactive HTML elements with aria-activedescendant.
useAriaPropsForRole
Optional
public readonly useAriaPropsForRole: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforce that elements with ARIA roles must have all required ARIA attributes for that role.
useButtonType
Optional
public readonly useButtonType: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforces the usage of the attribute type for the element button.
useFocusableInteractive
Optional
public readonly useFocusableInteractive: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Elements with an interactive role and interaction handlers must be focusable.
useGenericFontNames
Optional
public readonly useGenericFontNames: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow a missing generic family keyword within font families.
useHeadingContent
Optional
public readonly useHeadingContent: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforce that heading elements (h1, h2, etc.) have content and that the content is accessible to screen readers. Accessible means that it is not hidden using the aria-hidden prop.
useHtmlLang
Optional
public readonly useHtmlLang: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforce that html element has lang attribute.
useIframeTitle
Optional
public readonly useIframeTitle: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforces the usage of the attribute title for the element iframe.
useKeyWithClickEvents
Optional
public readonly useKeyWithClickEvents: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforce onClick is accompanied by at least one of the following: onKeyUp, onKeyDown, onKeyPress.
useKeyWithMouseEvents
Optional
public readonly useKeyWithMouseEvents: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforce onMouseOver / onMouseOut are accompanied by onFocus / onBlur.
useMediaCaption
Optional
public readonly useMediaCaption: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforces that audio and video elements must have a track for captions.
useSemanticElements
Optional
public readonly useSemanticElements: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
It detects the use of role attributes in JSX elements and suggests using semantic elements instead.
useValidAnchor
Optional
public readonly useValidAnchor: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforce that all anchors are valid, and they are navigable elements.
useValidAriaProps
Optional
public readonly useValidAriaProps: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Ensures that ARIA properties aria-* are all valid.
useValidAriaRole
Optional
public readonly useValidAriaRole: string | IRuleWithValidAriaRoleOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithValidAriaRoleOptions
Elements with ARIA roles must use a valid, non-abstract ARIA role.
useValidAriaValues
Optional
public readonly useValidAriaValues: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforce that ARIA state and property values are valid.
useValidLang
Optional
public readonly useValidLang: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Ensure that the attribute passed to the lang attribute is a correct ISO language and/or country.
IActions
- Implemented By: projen.javascript.biome.biome_config.IActions
Properties
Name | Type | Description |
---|---|---|
| projen.javascript.biome.biome_config.ISource | No description. |
source
Optional
public readonly source: ISource;
- Type: projen.javascript.biome.biome_config.ISource
IAllowDomainOptions
- Implemented By: projen.javascript.biome.biome_config.IAllowDomainOptions
Properties
Name | Type | Description |
---|---|---|
| string[] | List of domains to allow target="_blank" without rel="noreferrer" . |
allowDomains
Optional
public readonly allowDomains: string[];
- Type: string[]
List of domains to allow target="_blank"
without rel="noreferrer"
.
IAssistsConfiguration
- Implemented By: projen.javascript.biome.biome_config.IAssistsConfiguration
Properties
Name | Type | Description |
---|---|---|
| projen.javascript.biome.biome_config.IActions | Whether Biome should fail in CLI if the assists were not applied to the code. |
| boolean | Whether Biome should enable assists via LSP. |
| string[] | A list of Unix shell style patterns. |
| string[] | A list of Unix shell style patterns. |
actions
Optional
public readonly actions: IActions;
- Type: projen.javascript.biome.biome_config.IActions
Whether Biome should fail in CLI if the assists were not applied to the code.
enabled
Optional
public readonly enabled: boolean;
- Type: boolean
Whether Biome should enable assists via LSP.
ignore
Optional
public readonly ignore: string[];
- Type: string[]
A list of Unix shell style patterns.
The formatter will ignore files/folders that will match these patterns.
include
Optional
public readonly include: string[];
- Type: string[]
A list of Unix shell style patterns.
The formatter will include files/folders that will match these patterns.
IComplexity
- Implemented By: projen.javascript.biome.biome_config.IComplexity
A list of rules that belong to this group.
Properties
Name | Type | Description |
---|---|---|
| boolean | It enables ALL rules for this group. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow primitive type aliases and misleading types. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow empty type parameters in type aliases and interfaces. |
| string | projen.javascript.biome.biome_config.IRuleWithComplexityOptions | Disallow functions that exceed a given Cognitive Complexity score. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | This rule enforces a maximum depth to nested describe() in test files. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unnecessary boolean casts. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Prefer for...of statement instead of Array.forEach. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unclear usage of consecutive space characters in regular expression literals. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow this and super in static contexts. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unnecessary catch clauses. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unnecessary constructors. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow empty exports that don't change anything in a module file. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unnecessary fragments. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unnecessary labels. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unnecessary nested block statements. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow renaming import, export, and destructured assignments to the same name. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unnecessary concatenation of string or template literals. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow useless case in switch statements. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow ternary operators when simpler alternatives exist. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow useless this aliasing. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow using any or unknown as type constraint. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow initializing variables to undefined. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow the use of void operators, which is not a familiar operator. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow with statements in non-strict contexts. |
| boolean | It enables the recommended rules for this group. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Use arrow functions over function expressions. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Use Date.now() to get the number of milliseconds since the Unix Epoch. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Promotes the use of .flatMap() when map().flat() are used together. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce the usage of a literal access to properties over computed property access. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce using concise optional chain instead of chained logical expressions. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Enforce the use of the regular expression literals instead of the RegExp constructor if possible. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow number literal object member names which are not base10 or uses underscore as separator. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Discard redundant terms from logical expressions. |
all
Optional
public readonly all: boolean;
- Type: boolean
It enables ALL rules for this group.
noBannedTypes
Optional
public readonly noBannedTypes: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow primitive type aliases and misleading types.
noEmptyTypeParameters
Optional
public readonly noEmptyTypeParameters: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow empty type parameters in type aliases and interfaces.
noExcessiveCognitiveComplexity
Optional
public readonly noExcessiveCognitiveComplexity: string | IRuleWithComplexityOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithComplexityOptions
Disallow functions that exceed a given Cognitive Complexity score.
noExcessiveNestedTestSuites
Optional
public readonly noExcessiveNestedTestSuites: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
This rule enforces a maximum depth to nested describe() in test files.
noExtraBooleanCast
Optional
public readonly noExtraBooleanCast: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unnecessary boolean casts.
noForEach
Optional
public readonly noForEach: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Prefer for...of statement instead of Array.forEach.
noMultipleSpacesInRegularExpressionLiterals
Optional
public readonly noMultipleSpacesInRegularExpressionLiterals: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unclear usage of consecutive space characters in regular expression literals.
noStaticOnlyClass
Optional
public readonly noStaticOnlyClass: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.
noThisInStatic
Optional
public readonly noThisInStatic: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow this and super in static contexts.
noUselessCatch
Optional
public readonly noUselessCatch: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unnecessary catch clauses.
noUselessConstructor
Optional
public readonly noUselessConstructor: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unnecessary constructors.
noUselessEmptyExport
Optional
public readonly noUselessEmptyExport: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow empty exports that don't change anything in a module file.
noUselessFragments
Optional
public readonly noUselessFragments: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unnecessary fragments.
noUselessLabel
Optional
public readonly noUselessLabel: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unnecessary labels.
noUselessLoneBlockStatements
Optional
public readonly noUselessLoneBlockStatements: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unnecessary nested block statements.
noUselessRename
Optional
public readonly noUselessRename: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow renaming import, export, and destructured assignments to the same name.
noUselessStringConcat
Optional
public readonly noUselessStringConcat: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unnecessary concatenation of string or template literals.
noUselessSwitchCase
Optional
public readonly noUselessSwitchCase: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow useless case in switch statements.
noUselessTernary
Optional
public readonly noUselessTernary: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow ternary operators when simpler alternatives exist.
noUselessThisAlias
Optional
public readonly noUselessThisAlias: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow useless this aliasing.
noUselessTypeConstraint
Optional
public readonly noUselessTypeConstraint: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow using any or unknown as type constraint.
noUselessUndefinedInitialization
Optional
public readonly noUselessUndefinedInitialization: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow initializing variables to undefined.
noVoid
Optional
public readonly noVoid: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow the use of void operators, which is not a familiar operator.
noWith
Optional
public readonly noWith: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow with statements in non-strict contexts.
recommended
Optional
public readonly recommended: boolean;
- Type: boolean
It enables the recommended rules for this group.
useArrowFunction
Optional
public readonly useArrowFunction: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Use arrow functions over function expressions.
useDateNow
Optional
public readonly useDateNow: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Use Date.now() to get the number of milliseconds since the Unix Epoch.
useFlatMap
Optional
public readonly useFlatMap: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Promotes the use of .flatMap() when map().flat() are used together.
useLiteralKeys
Optional
public readonly useLiteralKeys: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce the usage of a literal access to properties over computed property access.
useOptionalChain
Optional
public readonly useOptionalChain: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce using concise optional chain instead of chained logical expressions.
useRegexLiterals
Optional
public readonly useRegexLiterals: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Enforce the use of the regular expression literals instead of the RegExp constructor if possible.
useSimpleNumberKeys
Optional
public readonly useSimpleNumberKeys: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow number literal object member names which are not base10 or uses underscore as separator.
useSimplifiedLogicExpression
Optional
public readonly useSimplifiedLogicExpression: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Discard redundant terms from logical expressions.
IComplexityOptions
- Implemented By: projen.javascript.biome.biome_config.IComplexityOptions
Options for the rule noExcessiveCognitiveComplexity
.
Properties
Name | Type | Description |
---|---|---|
| number | The maximum complexity score that we allow. |
maxAllowedComplexity
Optional
public readonly maxAllowedComplexity: number;
- Type: number
The maximum complexity score that we allow.
Anything higher is considered excessive.
IConfiguration
- Implemented By: projen.javascript.biome.biome_config.IConfiguration
The configuration that is contained inside the file biome.json
.
Properties
Name | Type | Description |
---|---|---|
| projen.javascript.biome.biome_config.IAssistsConfiguration | Specific configuration for assists. |
| projen.javascript.biome.biome_config.ICssConfiguration | Specific configuration for the Css language. |
| string[] | A list of paths to other JSON files, used to extends the current configuration. |
| projen.javascript.biome.biome_config.IFilesConfiguration | The configuration of the filesystem. |
| projen.javascript.biome.biome_config.IFormatterConfiguration | The configuration of the formatter. |
| projen.javascript.biome.biome_config.IGraphqlConfiguration | Specific configuration for the GraphQL language. |
| projen.javascript.biome.biome_config.IJavascriptConfiguration | Specific configuration for the JavaScript language. |
| projen.javascript.biome.biome_config.IJsonConfiguration | Specific configuration for the Json language. |
| projen.javascript.biome.biome_config.ILinterConfiguration | The configuration for the linter. |
| projen.javascript.biome.biome_config.IOrganizeImports | The configuration of the import sorting. |
| projen.javascript.biome.biome_config.IOverridePattern[] | A list of granular patterns that should be applied only to a sub set of files. |
| projen.javascript.biome.biome_config.IVcsConfiguration | The configuration of the VCS integration. |
assists
Optional
public readonly assists: IAssistsConfiguration;
- Type: projen.javascript.biome.biome_config.IAssistsConfiguration
Specific configuration for assists.
css
Optional
public readonly css: ICssConfiguration;
- Type: projen.javascript.biome.biome_config.ICssConfiguration
Specific configuration for the Css language.
extends
Optional
public readonly extends: string[];
- Type: string[]
A list of paths to other JSON files, used to extends the current configuration.
files
Optional
public readonly files: IFilesConfiguration;
- Type: projen.javascript.biome.biome_config.IFilesConfiguration
The configuration of the filesystem.
formatter
Optional
public readonly formatter: IFormatterConfiguration;
- Type: projen.javascript.biome.biome_config.IFormatterConfiguration
The configuration of the formatter.
graphql
Optional
public readonly graphql: IGraphqlConfiguration;
- Type: projen.javascript.biome.biome_config.IGraphqlConfiguration
Specific configuration for the GraphQL language.
javascript
Optional
public readonly javascript: IJavascriptConfiguration;
- Type: projen.javascript.biome.biome_config.IJavascriptConfiguration
Specific configuration for the JavaScript language.
json
Optional
public readonly json: IJsonConfiguration;
- Type: projen.javascript.biome.biome_config.IJsonConfiguration
Specific configuration for the Json language.
linter
Optional
public readonly linter: ILinterConfiguration;
- Type: projen.javascript.biome.biome_config.ILinterConfiguration
The configuration for the linter.
organizeImports
Optional
public readonly organizeImports: IOrganizeImports;
- Type: projen.javascript.biome.biome_config.IOrganizeImports
The configuration of the import sorting.
overrides
Optional
public readonly overrides: IOverridePattern[];
- Type: projen.javascript.biome.biome_config.IOverridePattern[]
A list of granular patterns that should be applied only to a sub set of files.
vcs
Optional
public readonly vcs: IVcsConfiguration;
- Type: projen.javascript.biome.biome_config.IVcsConfiguration
The configuration of the VCS integration.
IConsistentArrayTypeOptions
- Implemented By: projen.javascript.biome.biome_config.IConsistentArrayTypeOptions
Properties
Name | Type | Description |
---|---|---|
| string | No description. |
syntax
Optional
public readonly syntax: string;
- Type: string
IConsistentMemberAccessibilityOptions
- Implemented By: projen.javascript.biome.biome_config.IConsistentMemberAccessibilityOptions
Properties
Name | Type | Description |
---|---|---|
| string | No description. |
accessibility
Optional
public readonly accessibility: string;
- Type: string
IConvention
- Implemented By: projen.javascript.biome.biome_config.IConvention
Properties
Name | Type | Description |
---|---|---|
| string[] | String cases to enforce. |
| string | Regular expression to enforce. |
| projen.javascript.biome.biome_config.ISelector | Declarations concerned by this convention. |
formats
Optional
public readonly formats: string[];
- Type: string[]
String cases to enforce.
match
Optional
public readonly match: string;
- Type: string
Regular expression to enforce.
selector
Optional
public readonly selector: ISelector;
- Type: projen.javascript.biome.biome_config.ISelector
Declarations concerned by this convention.
ICorrectness
- Implemented By: projen.javascript.biome.biome_config.ICorrectness
A list of rules that belong to this group.
Properties
Name | Type | Description |
---|---|---|
| boolean | It enables ALL rules for this group. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Prevent passing of children as props. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow constant expressions in conditions. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Prevents from having const variables being re-assigned. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow returning a value from a constructor. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow empty character classes in regular expression literals. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallows empty destructuring patterns. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow to use unnecessary callback on flatMap. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow calling global object properties as functions. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow function and var declarations that are accessible outside their block. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Ensure that builtins are correctly instantiated. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Prevents the incorrect use of super() inside classes. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow non-standard direction values for linear gradient functions. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallows invalid named grid areas in CSS Grid Layouts. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow new operators with global non-constructor functions. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow the use of. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow the use of variables and function parameters before their declaration. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow new operators with the Symbol object. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Forbid the use of Node.js builtin modules. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow \8 and \9 escape sequences in string literals. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow literal numbers that lose precision. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Prevent the usage of the return value of React.render. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow assignments where both sides are exactly the same. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow returning a value from a setter. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow comparison of expressions modifying the string case with non-compliant value. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow lexical declarations in switch clauses. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow the use of dependencies that aren't specified in the package.json. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Prevents the usage of variables that haven't been declared inside the document. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow unknown CSS value functions. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow unknown media feature names. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow unknown properties. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow unknown CSS units. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow unmatchable An+B selectors. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Avoid using unnecessary continue. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow unreachable code. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | 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. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow control flow statements in finally blocks. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow the use of optional chaining in contexts where the undefined value is not allowed. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unused function parameters. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unused imports. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unused labels. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unused private class members. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow unused variables. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | This rules prevents void elements (AKA self-closing elements) from having children. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow returning a value from a function with the return type 'void'. |
| boolean | It enables the recommended rules for this group. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Disallow Array constructors. |
| string | projen.javascript.biome.biome_config.IRuleWithUseExhaustiveDependenciesOptions | Enforce all dependencies are correctly specified in a React hook. |
| string | projen.javascript.biome.biome_config.IRuleWithDeprecatedHooksOptions | Enforce that all React hooks are being called from the Top Level component functions. |
| string | projen.javascript.biome.biome_config.IRuleWithUseImportExtensionsOptions | Enforce file extensions for relative imports. |
| string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions | Require calls to isNaN() when checking for NaN. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Disallow missing key props in iterators/collection literals. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Enforce "for" loop update clause moving the counter in the right direction. |
| string | projen.javascript.biome.biome_config.IRuleWithNoOptions | Require generator functions to contain yield. |
all
Optional
public readonly all: boolean;
- Type: boolean
It enables ALL rules for this group.
noChildrenProp
Optional
public readonly noChildrenProp: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Prevent passing of children as props.
noConstantCondition
Optional
public readonly noConstantCondition: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow constant expressions in conditions.
noConstantMathMinMaxClamp
Optional
public readonly noConstantMathMinMaxClamp: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant.
noConstAssign
Optional
public readonly noConstAssign: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Prevents from having const variables being re-assigned.
noConstructorReturn
Optional
public readonly noConstructorReturn: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow returning a value from a constructor.
noEmptyCharacterClassInRegex
Optional
public readonly noEmptyCharacterClassInRegex: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow empty character classes in regular expression literals.
noEmptyPattern
Optional
public readonly noEmptyPattern: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallows empty destructuring patterns.
noFlatMapIdentity
Optional
public readonly noFlatMapIdentity: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow to use unnecessary callback on flatMap.
noGlobalObjectCalls
Optional
public readonly noGlobalObjectCalls: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow calling global object properties as functions.
noInnerDeclarations
Optional
public readonly noInnerDeclarations: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow function and var declarations that are accessible outside their block.
noInvalidBuiltinInstantiation
Optional
public readonly noInvalidBuiltinInstantiation: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Ensure that builtins are correctly instantiated.
noInvalidConstructorSuper
Optional
public readonly noInvalidConstructorSuper: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Prevents the incorrect use of super() inside classes.
It also checks whether a call super() is missing from classes that extends other constructors.
noInvalidDirectionInLinearGradient
Optional
public readonly noInvalidDirectionInLinearGradient: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow non-standard direction values for linear gradient functions.
noInvalidGridAreas
Optional
public readonly noInvalidGridAreas: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallows invalid named grid areas in CSS Grid Layouts.
noInvalidNewBuiltin
Optional
public readonly noInvalidNewBuiltin: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow new operators with global non-constructor functions.
noInvalidPositionAtImportRule
Optional
public readonly noInvalidPositionAtImportRule: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow the use of.
noInvalidUseBeforeDeclaration
Optional
public readonly noInvalidUseBeforeDeclaration: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow the use of variables and function parameters before their declaration.
noNewSymbol
Optional
public readonly noNewSymbol: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow new operators with the Symbol object.
noNodejsModules
Optional
public readonly noNodejsModules: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Forbid the use of Node.js builtin modules.
noNonoctalDecimalEscape
Optional
public readonly noNonoctalDecimalEscape: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow \8 and \9 escape sequences in string literals.
noPrecisionLoss
Optional
public readonly noPrecisionLoss: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow literal numbers that lose precision.
noRenderReturnValue
Optional
public readonly noRenderReturnValue: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Prevent the usage of the return value of React.render.
noSelfAssign
Optional
public readonly noSelfAssign: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow assignments where both sides are exactly the same.
noSetterReturn
Optional
public readonly noSetterReturn: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow returning a value from a setter.
noStringCaseMismatch
Optional
public readonly noStringCaseMismatch: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow comparison of expressions modifying the string case with non-compliant value.
noSwitchDeclarations
Optional
public readonly noSwitchDeclarations: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow lexical declarations in switch clauses.
noUndeclaredDependencies
Optional
public readonly noUndeclaredDependencies: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow the use of dependencies that aren't specified in the package.json.
noUndeclaredVariables
Optional
public readonly noUndeclaredVariables: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Prevents the usage of variables that haven't been declared inside the document.
noUnknownFunction
Optional
public readonly noUnknownFunction: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow unknown CSS value functions.
noUnknownMediaFeatureName
Optional
public readonly noUnknownMediaFeatureName: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow unknown media feature names.
noUnknownProperty
Optional
public readonly noUnknownProperty: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow unknown properties.
noUnknownUnit
Optional
public readonly noUnknownUnit: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow unknown CSS units.
noUnmatchableAnbSelector
Optional
public readonly noUnmatchableAnbSelector: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow unmatchable An+B selectors.
noUnnecessaryContinue
Optional
public readonly noUnnecessaryContinue: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Avoid using unnecessary continue.
noUnreachable
Optional
public readonly noUnreachable: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow unreachable code.
noUnreachableSuper
Optional
public readonly noUnreachableSuper: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
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.
noUnsafeFinally
Optional
public readonly noUnsafeFinally: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow control flow statements in finally blocks.
noUnsafeOptionalChaining
Optional
public readonly noUnsafeOptionalChaining: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow the use of optional chaining in contexts where the undefined value is not allowed.
noUnusedFunctionParameters
Optional
public readonly noUnusedFunctionParameters: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unused function parameters.
noUnusedImports
Optional
public readonly noUnusedImports: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unused imports.
noUnusedLabels
Optional
public readonly noUnusedLabels: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unused labels.
noUnusedPrivateClassMembers
Optional
public readonly noUnusedPrivateClassMembers: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unused private class members.
noUnusedVariables
Optional
public readonly noUnusedVariables: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow unused variables.
noVoidElementsWithChildren
Optional
public readonly noVoidElementsWithChildren: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
This rules prevents void elements (AKA self-closing elements) from having children.
noVoidTypeReturn
Optional
public readonly noVoidTypeReturn: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow returning a value from a function with the return type 'void'.
recommended
Optional
public readonly recommended: boolean;
- Type: boolean
It enables the recommended rules for this group.
useArrayLiterals
Optional
public readonly useArrayLiterals: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Disallow Array constructors.
useExhaustiveDependencies
Optional
public readonly useExhaustiveDependencies: string | IRuleWithUseExhaustiveDependenciesOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithUseExhaustiveDependenciesOptions
Enforce all dependencies are correctly specified in a React hook.
useHookAtTopLevel
Optional
public readonly useHookAtTopLevel: string | IRuleWithDeprecatedHooksOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithDeprecatedHooksOptions
Enforce that all React hooks are being called from the Top Level component functions.
useImportExtensions
Optional
public readonly useImportExtensions: string | IRuleWithUseImportExtensionsOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithUseImportExtensionsOptions
Enforce file extensions for relative imports.
useIsNan
Optional
public readonly useIsNan: string | IRuleWithFixNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithFixNoOptions
Require calls to isNaN() when checking for NaN.
useJsxKeyInIterable
Optional
public readonly useJsxKeyInIterable: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Disallow missing key props in iterators/collection literals.
useValidForDirection
Optional
public readonly useValidForDirection: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Enforce "for" loop update clause moving the counter in the right direction.
useYield
Optional
public readonly useYield: string | IRuleWithNoOptions;
- Type: string | projen.javascript.biome.biome_config.IRuleWithNoOptions
Require generator functions to contain yield.
ICssAssists
- Implemented By: projen.javascript.biome.biome_config.ICssAssists
Options that changes how the CSS assists behaves.
Properties
Name | Type | Description |
---|---|---|
| boolean | Control the assists for CSS files. |
enabled
Optional
public readonly enabled: boolean;
- Type: boolean
Control the assists for CSS files.
ICssConfiguration
- Implemented By: projen.javascript.biome.biome_config.ICssConfiguration
Options applied to CSS files.
Properties
Name | Type | Description |
---|---|---|
| projen.javascript.biome.biome_config.ICssAssists | CSS assists options. |
| projen.javascript.biome.biome_config.ICssFormatter | CSS formatter options. |
| projen.javascript.biome.biome_config.ICssLinter | CSS linter options. |
| projen.javascript.biome.biome_config.ICssParser | CSS parsing options. |
assists
Optional
public readonly assists: ICssAssists;
- Type: projen.javascript.biome.biome_config.ICssAssists
CSS assists options.
formatter
Optional
public readonly formatter: ICssFormatter;
- Type: projen.javascript.biome.biome_config.ICssFormatter
CSS formatter options.
linter
Optional
public readonly linter: ICssLinter;
- Type: projen.javascript.biome.biome_config.ICssLinter
CSS linter options.
parser
Optional
public readonly parser: ICssParser;
- Type: projen.javascript.biome.biome_config.ICssParser
CSS parsing options.
ICssFormatter
- Implemented By: projen.javascript.biome.biome_config.ICssFormatter
Options that changes how the CSS formatter behaves.
Properties
Name | Type | Description |
---|---|---|
| boolean | Control the formatter for CSS (and its super languages) files. |
| string | The indent style applied to CSS (and its super languages) files. |
| number | The size of the indentation applied to CSS (and its super languages) files. |
| string | The type of line ending applied to CSS (and its super languages) files. |
| number | What's the max width of a line applied to CSS (and its super languages) files. |
| string | The type of quotes used in CSS code. |
enabled
Optional
public readonly enabled: boolean;
- Type: boolean
Control the formatter for CSS (and its super languages) files.
indentStyle
Optional
public readonly indentStyle: string;
- Type: string
The indent style applied to CSS (and its super languages) files.
indentWidth
Optional
public readonly indentWidth: number;
- Type: number
The size of the indentation applied to CSS (and its super languages) files.
Default to 2.
lineEnding
Optional
public readonly lineEnding: string;
- Type: string
The type of line ending applied to CSS (and its super languages) files.
lineWidth
Optional
public readonly lineWidth: number;
- Type: number
What's the max width of a line applied to CSS (and its super languages) files.
Defaults to 80.
quoteStyle
Optional
public readonly quoteStyle: string;
- Type: string
The type of quotes used in CSS code.
Defaults to double.
ICssLinter
- Implemented By: projen.javascript.biome.biome_config.ICssLinter
Options that changes how the CSS linter behaves.
Properties
Name | Type | Description |
---|---|---|
| boolean | Control the linter for CSS files. |
enabled
Optional
public readonly enabled: boolean;
- Type: boolean
Control the linter for CSS files.
ICssParser
- Implemented By: projen.javascript.biome.biome_config.ICssParser
Options that changes how the CSS parser behaves.
Properties
Name | Type | Description |
---|---|---|
| boolean | Allow comments to appear on incorrect lines in .css files. |
| boolean | Enables parsing of CSS Modules specific features. |
allowWrongLineComments
Optional
public readonly allowWrongLineComments: boolean;
- Type: boolean
Allow comments to appear on incorrect lines in .css
files.
cssModules
Optional
public readonly cssModules: boolean;
- Type: boolean
Enables parsing of CSS Modules specific features.
ICustomRestrictedTypeOptions
- Implemented By: projen.javascript.biome.biome_config.ICustomRestrictedTypeOptions
Properties
Name | Type | Description |
---|---|---|
| string | No description. |
| string | No description. |
message
Optional
public readonly message: string;
- Type: string
use
Optional
public readonly use: string;
- Type: string
IDeprecatedHooksOptions
- Implemented By: projen.javascript.biome.biome_config.IDeprecatedHooksOptions
Options for the useHookAtTopLevel
rule have been deprecated, since we now use the React hook naming convention to determine whether a function is a hook.
IFilenamingConventionOptions
- Implemented By: projen.javascript.biome.biome_config.IFilenamingConventionOptions
Rule's options.
Properties
Name | Type | Description |
---|---|---|
| string[] | Allowed cases for file names. |
| boolean | If false , then non-ASCII characters are allowed. |
| boolean | If false , then consecutive uppercase are allowed in camel and pascal cases. |
filenameCases
Optional
public readonly filenameCases: string[];
- Type: string[]
Allowed cases for file names.
requireAscii
Optional
public readonly requireAscii: boolean;
- Type: boolean
If false
, then non-ASCII characters are allowed.
strictCase
Optional
public readonly strictCase: boolean;
- Type: boolean
If false
, then consecutive uppercase are allowed in camel and pascal cases.
This does not affect other [Case].
IFilesConfiguration
- Implemented By: projen.javascript.biome.biome_config.IFilesConfiguration
The configuration of the filesystem.
Properties
Name | Type | Description |
---|---|---|
| string[] | A list of Unix shell style patterns. |
| boolean | Tells Biome to not emit diagnostics when handling files that doesn't know. |
| string[] | A list of Unix shell style patterns. |
| number | The maximum allowed size for source code files in bytes. |
ignore
Optional
public readonly ignore: string[];
- Type: string[]
A list of Unix shell style patterns.
Biome will ignore files/folders that will match these patterns.
ignoreUnknown
Optional
public readonly ignoreUnknown: boolean;
- Type: boolean
Tells Biome to not emit diagnostics when handling files that doesn't know.
include
Optional
public readonly include: string[];
- Type: string[]
A list of Unix shell style patterns.
Biome will handle only those files/folders that will match these patterns.
maxSize
Optional
public readonly maxSize: number;
- Type: number
The maximum allowed size for source code files in bytes.
Files above this limit will be ignored for performance reasons. Defaults to 1 MiB
IFormatterConfiguration
- Implemented By: projen.javascript.biome.biome_config.IFormatterConfiguration
Generic options applied to all files.
Properties
Name | Type | Description |
---|---|---|
| string | The attribute position style in HTMLish languages. |
| boolean | Whether to insert spaces around brackets in object literals. |
| boolean | No description. |
| boolean | Stores whether formatting should be allowed to proceed if a given file has syntax errors. |
| string[] | A list of Unix shell style patterns. |
| string[] | A list of Unix shell style patterns. |
| number | The size of the indentation, 2 by default (deprecated, use indent-width ). |
| string | The indent style. |
| number | The size of the indentation, 2 by default. |
| string | The type of line ending. |
| number | What's the max width of a line. |
| boolean | Use any .editorconfig files to configure the formatter. Configuration in biome.json will override .editorconfig configuration. Default: false. |
attributePosition
Optional
public readonly attributePosition: string;
- Type: string
The attribute position style in HTMLish languages.
By default auto.
bracketSpacing
Optional
public readonly bracketSpacing: boolean;
- Type: boolean
Whether to insert spaces around brackets in object literals.
Defaults to true.
enabled
Optional
public readonly enabled: boolean;
- Type: boolean
formatWithErrors
Optional
public readonly formatWithErrors: boolean;
- Type: boolean
Stores whether formatting should be allowed to proceed if a given file has syntax errors.
ignore
Optional
public readonly ignore: string[];
- Type: string[]
A list of Unix shell style patterns.
The formatter will ignore files/folders that will match these patterns.
include
Optional
public readonly include: string[];
- Type: string[]
A list of Unix shell style patterns.
The formatter will include files/folders that will match these patterns.
indentSize
Optional
public readonly indentSize: number;
- Type: number
The size of the indentation, 2 by default (deprecated, use indent-width
).
indentStyle
Optional
public readonly indentStyle: string;
- Type: string
The indent style.
indentWidth
Optional
public readonly indentWidth: number;
- Type: number
The size of the indentation, 2 by default.
lineEnding
Optional
public readonly lineEnding: string;
- Type: string
The type of line ending.
lineWidth
Optional
public readonly lineWidth: number;
- Type: number
What's the max width of a line.
Defaults to 80.
useEditorconfig
Optional
public readonly useEditorconfig: boolean;
- Type: boolean
Use any .editorconfig
files to configure the formatter. Configuration in biome.json
will override .editorconfig
configuration. Default: false.
IGraphqlConfiguration
- Implemented By: projen.javascript.biome.biome_config.IGraphqlConfiguration
Options applied to GraphQL files.
Properties
Name | Type | Description |
---|---|---|
| projen.javascript.biome.biome_config.IGraphqlFormatter | GraphQL formatter options. |
| projen.javascript.biome.biome_config.IGraphqlLinter | No description. |
formatter
Optional
public readonly formatter: IGraphqlFormatter;
- Type: projen.javascript.biome.biome_config.IGraphqlFormatter
GraphQL formatter options.
linter
Optional
public readonly linter: IGraphqlLinter;
- Type: projen.javascript.biome.biome_config.IGraphqlLinter
IGraphqlFormatter
- Implemented By: projen.javascript.biome.biome_config.IGraphqlFormatter
Options that changes how the GraphQL formatter behaves.
Properties
Name | Type | Description |
---|---|---|
| boolean | Whether to insert spaces around brackets in object literals. |
| boolean | Control the formatter for GraphQL files. |
| string | The indent style applied to GraphQL files. |
| number | The size of the indentation applied to GraphQL files. |
| string | The type of line ending applied to GraphQL files. |
| number | What's the max width of a line applied to GraphQL files. |
| string | The type of quotes used in GraphQL code. |
bracketSpacing
Optional
public readonly bracketSpacing: boolean;
- Type: boolean
Whether to insert spaces around brackets in object literals.
Defaults to true.
enabled
Optional
public readonly enabled: boolean;
- Type: boolean
Control the formatter for GraphQL files.
indentStyle
Optional
public readonly indentStyle: string;
- Type: string
The indent style applied to GraphQL files.
indentWidth
Optional
public readonly indentWidth: number;
- Type: number
The size of the indentation applied to GraphQL files.
Default to 2.
lineEnding
Optional
public readonly lineEnding: string;
- Type: string
The type of line ending applied to GraphQL files.
lineWidth
Optional
public readonly lineWidth: number;
- Type: number
What's the max width of a line applied to GraphQL files.
Defaults to 80.
quoteStyle
Optional
public readonly quoteStyle: string;
- Type: string
The type of quotes used in GraphQL code.
Defaults to double.
IGraphqlLinter
- Implemented By: projen.javascript.biome.biome_config.IGraphqlLinter
Options that changes how the GraphQL linter behaves.
Properties
Name | Type | Description |
---|---|---|
| boolean | Control the formatter for GraphQL files. |
enabled
Optional
public readonly enabled: boolean;
- Type: boolean
Control the formatter for GraphQL files.
IHook
- Implemented By: projen.javascript.biome.biome_config.IHook
Properties
Name | Type | Description |
---|---|---|
| number | The "position" of the closure function, starting from zero. |
| number | The "position" of the array of dependencies, starting from zero. |
| string | The name of the hook. |
| boolean | number[] | Whether the result of the hook is stable. |
closureIndex
Optional
public readonly closureIndex: number;
- Type: number
The "position" of the closure function, starting from zero.
For example, for React's useEffect()
hook, the closure index is 0.
dependenciesIndex
Optional
public readonly dependenciesIndex: number;
- Type: number
The "position" of the array of dependencies, starting from zero.
For example, for React's useEffect()
hook, the dependencies index is 1.
name
Optional
public readonly name: string;
- Type: string
The name of the hook.
stableResult
Optional
public readonly stableResult: boolean | number[];
- Type: boolean | number[]
Whether the result of the hook is stable.
Set to true
to mark the identity of the hook's return value as stable, or use a number/an array of numbers to mark the "positions" in the return array as stable.
For example, for React's useRef()
hook the value would be true
, while for useState()
it would be [1]
.
IJavascriptAssists
- Implemented By: projen.javascript.biome.biome_config.IJavascriptAssists
Linter options specific to the JavaScript linter.
Properties
Name | Type | Description |
---|---|---|
| boolean | Control the linter for JavaScript (and its super languages) files. |
enabled
Optional
public readonly enabled: boolean;
- Type: boolean
Control the linter for JavaScript (and its super languages) files.
IJavascriptConfiguration
- Implemented By: projen.javascript.biome.biome_config.IJavascriptConfiguration
A set of options applied to the JavaScript files.
Properties
Name | Type | Description |
---|---|---|
| projen.javascript.biome.biome_config.IJavascriptAssists | Assists options. |
| projen.javascript.biome.biome_config.IJavascriptFormatter | Formatting options. |
| string[] | A list of global bindings that should be ignored by the analyzers. |
| string | Indicates the type of runtime or transformation used for interpreting JSX. |
| projen.javascript.biome.biome_config.IJavascriptLinter | Linter options. |
| projen.javascript.biome.biome_config.IJavascriptOrganizeImports | No description. |
| projen.javascript.biome.biome_config.IJavascriptParser | Parsing options. |
assists
Optional
public readonly assists: IJavascriptAssists;
- Type: projen.javascript.biome.biome_config.IJavascriptAssists
Assists options.
formatter
Optional
public readonly formatter: IJavascriptFormatter;
- Type: projen.javascript.biome.biome_config.IJavascriptFormatter
Formatting options.
globals
Optional
public readonly globals: string[];
- Type: string[]
A list of global bindings that should be ignored by the analyzers.
If defined here, they should not emit diagnostics.
jsxRuntime
Optional
public readonly jsxRuntime: string;
- Type: string
Indicates the type of runtime or transformation used for interpreting JSX.
linter
Optional
public readonly linter: IJavascriptLinter;
- Type: projen.javascript.biome.biome_config.IJavascriptLinter
Linter options.
organizeImports
Optional
public readonly organizeImports: IJavascriptOrganizeImports;
- Type: projen.javascript.biome.biome_config.IJavascriptOrganizeImports
parser
Optional
public readonly parser: IJavascriptParser;
- Type: projen.javascript.biome.biome_config.IJavascriptParser
Parsing options.
IJavascriptFormatter
- Implemented By: projen.javascript.biome.biome_config.IJavascriptFormatter
Formatting options specific to the JavaScript files.
Properties
Name | Type | Description |
---|---|---|
| string | Whether to add non-necessary parentheses to arrow functions. |
| string | The attribute position style in jsx elements. |
| boolean | Whether to hug the closing bracket of multiline HTML/JSX tags to the end of the last line, rather than being alone on the following line. |
| boolean | Whether to insert spaces around brackets in object literals. |
| boolean | Control the formatter for JavaScript (and its super languages) files. |
| number | The size of the indentation applied to JavaScript (and its super languages) files. |
| string | The indent style applied to JavaScript (and its super languages) files. |
| number | The size of the indentation applied to JavaScript (and its super languages) files. |
| string | The type of quotes used in JSX. |
| string | The type of line ending applied to JavaScript (and its super languages) files. |
| number | What's the max width of a line applied to JavaScript (and its super languages) files. |
| string | When properties in objects are quoted. |
| string | The type of quotes used in JavaScript code. |
| string | Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI. |
| string | Print trailing commas wherever possible in multi-line comma-separated syntactic structures. |
| string | Print trailing commas wherever possible in multi-line comma-separated syntactic structures. |
arrowParentheses
Optional
public readonly arrowParentheses: string;
- Type: string
Whether to add non-necessary parentheses to arrow functions.
Defaults to "always".
attributePosition
Optional
public readonly attributePosition: string;
- Type: string
The attribute position style in jsx elements.
Defaults to auto.
bracketSameLine
Optional
public readonly bracketSameLine: boolean;
- Type: boolean
Whether to hug the closing bracket of multiline HTML/JSX tags to the end of the last line, rather than being alone on the following line.
Defaults to false.
bracketSpacing
Optional
public readonly bracketSpacing: boolean;
- Type: boolean
Whether to insert spaces around brackets in object literals.
Defaults to true.
enabled
Optional
public readonly enabled: boolean;
- Type: boolean
Control the formatter for JavaScript (and its super languages) files.
indentSize
Optional
public readonly indentSize: number;
- Type: number
The size of the indentation applied to JavaScript (and its super languages) files.
Default to 2.
indentStyle
Optional
public readonly indentStyle: string;
- Type: string
The indent style applied to JavaScript (and its super languages) files.
indentWidth
Optional
public readonly indentWidth: number;
- Type: number
The size of the indentation applied to JavaScript (and its super languages) files.
Default to 2.
jsxQuoteStyle
Optional
public readonly jsxQuoteStyle: string;
- Type: string
The type of quotes used in JSX.
Defaults to double.
lineEnding
Optional
public readonly lineEnding: string;
- Type: string
The type of line ending applied to JavaScript (and its super languages) files.
lineWidth
Optional
public readonly lineWidth: number;
- Type: number
What's the max width of a line applied to JavaScript (and its super languages) files.
Defaults to 80.
quoteProperties
Optional
public readonly quoteProperties: string;
- Type: string
When properties in objects are quoted.
Defaults to asNeeded.
quoteStyle
Optional
public readonly quoteStyle: string;
- Type: string
The type of quotes used in JavaScript code.
Defaults to double.
semicolons
Optional
public readonly semicolons: string;
- Type: string
Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.
trailingComma
Optional
public readonly trailingComma: string;
- Type: string
Print trailing commas wherever possible in multi-line comma-separated syntactic structures.
Defaults to "all".
trailingCommas
Optional
public readonly trailingCommas: string;
- Type: string
Print trailing commas wherever possible in multi-line comma-separated syntactic structures.
Defaults to "all".
IJavascriptLinter
- Implemented By: projen.javascript.biome.biome_config.IJavascriptLinter
Linter options specific to the JavaScript linter.
Properties
Name | Type | Description |
---|---|---|
| boolean | Control the linter for JavaScript (and its super languages) files. |
enabled
Optional
public readonly enabled: boolean;
- Type: boolean
Control the linter for JavaScript (and its super languages) files.
IJavascriptOrganizeImports
- Implemented By: projen.javascript.biome.biome_config.IJavascriptOrganizeImports
IJavascriptParser
- Implemented By: projen.javascript.biome.biome_config.IJavascriptParser
Options that changes how the JavaScript parser behaves.
Properties
Name | Type | Description |
---|---|---|
| boolean | It enables the experimental and unsafe parsing of parameter decorators. |
unsafeParameterDecoratorsEnabled
Optional
public readonly unsafeParameterDecoratorsEnabled: boolean;
- Type: boolean
It enables the experimental and unsafe parsing of parameter decorators.
These decorators belong to an old proposal, and they are subject to change.
IJsonAssists
- Implemented By: projen.javascript.biome.biome_config.IJsonAssists
Linter options specific to the JSON linter.
Properties
Name | Type | Description |
---|---|---|
| boolean | Control the linter for JSON (and its super languages) files. |
enabled
Optional
public readonly enabled: boolean;
- Type: boolean
Control the linter for JSON (and its super languages) files.
IJsonConfiguration
- Implemented By: projen.javascript.biome.biome_config.IJsonConfiguration
Options applied to JSON files.
Properties
Name | Type | Description |
---|---|---|
| projen.javascript.biome.biome_config.IJsonAssists | Assists options. |
| projen.javascript.biome.biome_config.IJsonFormatter | Formatting options. |
| projen.javascript.biome.biome_config.IJsonLinter | Linting options. |
| projen.javascript.biome.biome_config.IJsonParser | Parsing options. |
assists
Optional
public readonly assists: IJsonAssists;
- Type: projen.javascript.biome.biome_config.IJsonAssists
Assists options.
formatter
Optional
public readonly formatter: IJsonFormatter;
- Type: projen.javascript.biome.biome_config.IJsonFormatter
Formatting options.
linter
Optional
public readonly linter: IJsonLinter;
- Type: projen.javascript.biome.biome_config.IJsonLinter
Linting options.
parser
Optional
public readonly parser: IJsonParser;
- Type: projen.javascript.biome.biome_config.IJsonParser
Parsing options.
IJsonFormatter
- Implemented By: projen.javascript.biome.biome_config.IJsonFormatter