Skip to main content

javascript.biome_config Submodule

Structs

Actions

Initializer

import { javascript } from 'projen'

const actions: javascript.biome_config.Actions = { ... }

Properties

NameTypeDescription
recommended
booleanIt enables the assist actions recommended by Biome.
source
projen.javascript.biome_config.SourceNo description.

recommendedOptional
public readonly recommended: boolean;
  • Type: boolean

It enables the assist actions recommended by Biome.

true by default.


sourceOptional
public readonly source: Source;
  • Type: projen.javascript.biome_config.Source

AssistConfiguration

Initializer

import { javascript } from 'projen'

const assistConfiguration: javascript.biome_config.AssistConfiguration = { ... }

Properties

NameTypeDescription
actions
projen.javascript.biome_config.ActionsWhether Biome should fail in CLI if the assist were not applied to the code.
enabled
booleanWhether Biome should enable assist via LSP and CLI.
includes
string[]A list of glob patterns.

actionsOptional
public readonly actions: Actions;
  • Type: projen.javascript.biome_config.Actions

Whether Biome should fail in CLI if the assist were not applied to the code.


enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Whether Biome should enable assist via LSP and CLI.


includesOptional
public readonly includes: string[];
  • Type: string[]

A list of glob patterns.

Biome will include files/folders that will match these patterns.


BiomeConfiguration

The configuration that is contained inside the file biome.json.

Initializer

import { javascript } from 'projen'

const biomeConfiguration: javascript.biome_config.BiomeConfiguration = { ... }

Properties

NameTypeDescription
assist
projen.javascript.biome_config.AssistConfigurationSpecific configuration for assists.
css
projen.javascript.biome_config.CssConfigurationSpecific configuration for the Css language.
extends
string[]A list of paths to other JSON files, used to extends the current configuration.
files
projen.javascript.biome_config.FilesConfigurationThe configuration of the filesystem.
formatter
projen.javascript.biome_config.FormatterConfigurationThe configuration of the formatter.
graphql
projen.javascript.biome_config.GraphqlConfigurationSpecific configuration for the GraphQL language.
grit
projen.javascript.biome_config.GritConfigurationSpecific configuration for the GraphQL language.
html
projen.javascript.biome_config.HtmlConfigurationSpecific configuration for the HTML language.
javascript
projen.javascript.biome_config.JsConfigurationSpecific configuration for the JavaScript language.
json
projen.javascript.biome_config.JsonConfigurationSpecific configuration for the Json language.
linter
projen.javascript.biome_config.LinterConfigurationThe configuration for the linter.
overrides
projen.javascript.biome_config.OverridePattern[]A list of granular patterns that should be applied only to a sub set of files.
plugins
string[]List of plugins to load.
root
booleanIndicates whether this configuration file is at the root of a Biome project.
schema
stringA field for the JSON schema specification.
vcs
projen.javascript.biome_config.VcsConfigurationThe configuration of the VCS integration.

assistOptional
public readonly assist: AssistConfiguration;
  • Type: projen.javascript.biome_config.AssistConfiguration

Specific configuration for assists.


cssOptional
public readonly css: CssConfiguration;
  • Type: projen.javascript.biome_config.CssConfiguration

Specific configuration for the Css language.


extendsOptional
public readonly extends: string[];
  • Type: string[]

A list of paths to other JSON files, used to extends the current configuration.


filesOptional
public readonly files: FilesConfiguration;
  • Type: projen.javascript.biome_config.FilesConfiguration

The configuration of the filesystem.


formatterOptional
public readonly formatter: FormatterConfiguration;
  • Type: projen.javascript.biome_config.FormatterConfiguration

The configuration of the formatter.


graphqlOptional
public readonly graphql: GraphqlConfiguration;
  • Type: projen.javascript.biome_config.GraphqlConfiguration

Specific configuration for the GraphQL language.


gritOptional
public readonly grit: GritConfiguration;
  • Type: projen.javascript.biome_config.GritConfiguration

Specific configuration for the GraphQL language.


htmlOptional
public readonly html: HtmlConfiguration;
  • Type: projen.javascript.biome_config.HtmlConfiguration

Specific configuration for the HTML language.


javascriptOptional
public readonly javascript: JsConfiguration;
  • Type: projen.javascript.biome_config.JsConfiguration

Specific configuration for the JavaScript language.


jsonOptional
public readonly json: JsonConfiguration;
  • Type: projen.javascript.biome_config.JsonConfiguration

Specific configuration for the Json language.


linterOptional
public readonly linter: LinterConfiguration;
  • Type: projen.javascript.biome_config.LinterConfiguration

The configuration for the linter.


overridesOptional
public readonly overrides: OverridePattern[];
  • Type: projen.javascript.biome_config.OverridePattern[]

A list of granular patterns that should be applied only to a sub set of files.


pluginsOptional
public readonly plugins: string[];
  • Type: string[]

List of plugins to load.


rootOptional
public readonly root: boolean;
  • Type: boolean

Indicates whether this configuration file is at the root of a Biome project.

By default, this is true.


schemaOptional
public readonly schema: string;
  • Type: string

A field for the JSON schema specification.


vcsOptional
public readonly vcs: VcsConfiguration;
  • Type: projen.javascript.biome_config.VcsConfiguration

The configuration of the VCS integration.


CssAssistConfiguration

Options that changes how the CSS assist behaves.

Initializer

import { javascript } from 'projen'

const cssAssistConfiguration: javascript.biome_config.CssAssistConfiguration = { ... }

Properties

NameTypeDescription
enabled
booleanControl the assist for CSS files.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the assist for CSS files.


CssConfiguration

Options applied to CSS files.

Initializer

import { javascript } from 'projen'

const cssConfiguration: javascript.biome_config.CssConfiguration = { ... }

Properties

NameTypeDescription
assist
projen.javascript.biome_config.CssAssistConfigurationCSS assist options.
formatter
projen.javascript.biome_config.CssFormatterConfigurationCSS formatter options.
globals
string[]CSS globals.
linter
projen.javascript.biome_config.CssLinterConfigurationCSS linter options.
parser
projen.javascript.biome_config.CssParserConfigurationCSS parsing options.

assistOptional
public readonly assist: CssAssistConfiguration;
  • Type: projen.javascript.biome_config.CssAssistConfiguration

CSS assist options.


formatterOptional
public readonly formatter: CssFormatterConfiguration;
  • Type: projen.javascript.biome_config.CssFormatterConfiguration

CSS formatter options.


globalsOptional
public readonly globals: string[];
  • Type: string[]

CSS globals.


linterOptional
public readonly linter: CssLinterConfiguration;
  • Type: projen.javascript.biome_config.CssLinterConfiguration

CSS linter options.


parserOptional
public readonly parser: CssParserConfiguration;
  • Type: projen.javascript.biome_config.CssParserConfiguration

CSS parsing options.


CssFormatterConfiguration

Options that changes how the CSS formatter behaves.

Initializer

import { javascript } from 'projen'

const cssFormatterConfiguration: javascript.biome_config.CssFormatterConfiguration = { ... }

Properties

NameTypeDescription
enabled
booleanControl the formatter for CSS (and its super languages) files.
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style applied to CSS (and its super languages) files.
indentWidth
numberThe size of the indentation applied to CSS (and its super languages) files.
lineEnding
projen.javascript.biome_config.LineEndingThe type of line ending applied to CSS (and its super languages) files.
lineWidth
numberWhat's the max width of a line applied to CSS (and its super languages) files.
quoteStyle
projen.javascript.biome_config.QuoteStyleThe type of quotes used in CSS code.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the formatter for CSS (and its super languages) files.


indentStyleOptional
public readonly indentStyle: IndentStyle;
  • Type: projen.javascript.biome_config.IndentStyle

The indent style applied to CSS (and its super languages) files.


indentWidthOptional
public readonly indentWidth: number;
  • Type: number
  • Default: 2.

The size of the indentation applied to CSS (and its super languages) files.

Default to 2.


lineEndingOptional
public readonly lineEnding: LineEnding;
  • Type: projen.javascript.biome_config.LineEnding

The type of line ending applied to CSS (and its super languages) files.


lineWidthOptional
public readonly lineWidth: number;
  • Type: number
  • Default: 80.

What's the max width of a line applied to CSS (and its super languages) files.

Defaults to 80.


quoteStyleOptional
public readonly quoteStyle: QuoteStyle;
  • Type: projen.javascript.biome_config.QuoteStyle
  • Default: double.

The type of quotes used in CSS code.

Defaults to double.


CssLinterConfiguration

Options that changes how the CSS linter behaves.

Initializer

import { javascript } from 'projen'

const cssLinterConfiguration: javascript.biome_config.CssLinterConfiguration = { ... }

Properties

NameTypeDescription
enabled
booleanControl the linter for CSS files.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the linter for CSS files.


CssParserConfiguration

Options that changes how the CSS parser behaves.

Initializer

import { javascript } from 'projen'

const cssParserConfiguration: javascript.biome_config.CssParserConfiguration = { ... }

Properties

NameTypeDescription
allowWrongLineComments
booleanAllow comments to appear on incorrect lines in .css files.
cssModules
booleanEnables parsing of CSS Modules specific features.

allowWrongLineCommentsOptional
public readonly allowWrongLineComments: boolean;
  • Type: boolean

Allow comments to appear on incorrect lines in .css files.


cssModulesOptional
public readonly cssModules: boolean;
  • Type: boolean

Enables parsing of CSS Modules specific features.


FilesConfiguration

The configuration of the filesystem.

Initializer

import { javascript } from 'projen'

const filesConfiguration: javascript.biome_config.FilesConfiguration = { ... }

Properties

NameTypeDescription
experimentalScannerIgnores
string[]Set of file and folder names that should be unconditionally ignored by Biome's scanner.
ignoreUnknown
booleanTells Biome to not emit diagnostics when handling files that doesn't know.
includes
string[]A list of glob patterns.
maxSize
numberThe maximum allowed size for source code files in bytes.

experimentalScannerIgnoresOptional
public readonly experimentalScannerIgnores: string[];
  • Type: string[]

Set of file and folder names that should be unconditionally ignored by Biome's scanner.

Biome maintains an internal list of default ignore entries, which is based on user feedback and which may change in any release. This setting allows overriding this internal list completely.

This is considered an advanced feature that users should not need to tweak themselves, but they can as a last resort. This setting can only be configured in root configurations, and is ignored in nested configs.

Entries must be file or folder names. Specific paths and globs are not supported.

Examples where this may be useful:

```jsonc { "files": { "experimentalScannerIgnores": [ // You almost certainly don't want to scan your .git // folder, which is why it's already ignored by default: ".git",

// But the scanner does scan node_modules by default. If // you really don't want this, you can ignore it like // this: "node_modules",

// But it's probably better to ignore a specific dependency. // For instance, one that happens to be particularly slow to // scan: "RedisCommander.d.ts", ], } } ```

Please be aware that rules relying on the module graph or type inference information may be negatively affected if dependencies of your project aren't (fully) scanned.


ignoreUnknownOptional
public readonly ignoreUnknown: boolean;
  • Type: boolean

Tells Biome to not emit diagnostics when handling files that doesn't know.


includesOptional
public readonly includes: string[];
  • Type: string[]

A list of glob patterns.

Biome will handle only those files/folders that will match these patterns.


maxSizeOptional
public readonly maxSize: number;
  • Type: number
  • Default: 1 MiB

The maximum allowed size for source code files in bytes.

Files above this limit will be ignored for performance reasons. Defaults to 1 MiB


FormatterConfiguration

Generic options applied to all files.

Initializer

import { javascript } from 'projen'

const formatterConfiguration: javascript.biome_config.FormatterConfiguration = { ... }

Properties

NameTypeDescription
attributePosition
projen.javascript.biome_config.AttributePositionThe attribute position style in HTML-ish languages.
bracketSameLine
booleanPut the > of a multi-line HTML or JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).
bracketSpacing
booleanWhether to insert spaces around brackets in object literals.
enabled
booleanNo description.
expand
projen.javascript.biome_config.ExpandWhether to expand arrays and objects on multiple lines.
formatWithErrors
booleanStores whether formatting should be allowed to proceed if a given file has syntax errors.
includes
string[]A list of glob patterns.
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style.
indentWidth
numberThe size of the indentation, 2 by default.
lineEnding
projen.javascript.biome_config.LineEndingThe type of line ending.
lineWidth
numberWhat's the max width of a line.
useEditorconfig
booleanUse any .editorconfig files to configure the formatter. Configuration in biome.json will override .editorconfig configuration.

attributePositionOptional
public readonly attributePosition: AttributePosition;
  • Type: projen.javascript.biome_config.AttributePosition
  • Default: auto.

The attribute position style in HTML-ish languages.

Defaults to auto.


bracketSameLineOptional
public readonly bracketSameLine: boolean;
  • Type: boolean

Put the > of a multi-line HTML or JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).


bracketSpacingOptional
public readonly bracketSpacing: boolean;
  • Type: boolean
  • Default: true.

Whether to insert spaces around brackets in object literals.

Defaults to true.


enabledOptional
public readonly enabled: boolean;
  • Type: boolean

expandOptional
public readonly expand: Expand;
  • Type: projen.javascript.biome_config.Expand
  • Default: auto".

Whether to expand arrays and objects on multiple lines.

When set to auto, object literals are formatted on multiple lines if the first property has a newline, and array literals are formatted on a single line if it fits in the line. When set to always, these literals are formatted on multiple lines, regardless of length of the list. When set to never, these literals are formatted on a single line if it fits in the line. When formatting package.json, Biome will use always unless configured otherwise. Defaults to "auto".


formatWithErrorsOptional
public readonly formatWithErrors: boolean;
  • Type: boolean

Stores whether formatting should be allowed to proceed if a given file has syntax errors.


includesOptional
public readonly includes: string[];
  • Type: string[]

A list of glob patterns.

The formatter will include files/folders that will match these patterns.


indentStyleOptional
public readonly indentStyle: IndentStyle;
  • Type: projen.javascript.biome_config.IndentStyle

The indent style.


indentWidthOptional
public readonly indentWidth: number;
  • Type: number

The size of the indentation, 2 by default.


lineEndingOptional
public readonly lineEnding: LineEnding;
  • Type: projen.javascript.biome_config.LineEnding

The type of line ending.


lineWidthOptional
public readonly lineWidth: number;
  • Type: number
  • Default: 80.

What's the max width of a line.

Defaults to 80.


useEditorconfigOptional
public readonly useEditorconfig: boolean;
  • Type: boolean

Use any .editorconfig files to configure the formatter. Configuration in biome.json will override .editorconfig configuration.

Default: true.


GraphqlAssistConfiguration

Options that changes how the GraphQL linter behaves.

Initializer

import { javascript } from 'projen'

const graphqlAssistConfiguration: javascript.biome_config.GraphqlAssistConfiguration = { ... }

Properties

NameTypeDescription
enabled
booleanControl the formatter for GraphQL files.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the formatter for GraphQL files.


GraphqlConfiguration

Options applied to GraphQL files.

Initializer

import { javascript } from 'projen'

const graphqlConfiguration: javascript.biome_config.GraphqlConfiguration = { ... }

Properties

NameTypeDescription
assist
projen.javascript.biome_config.GraphqlAssistConfigurationAssist options.
formatter
projen.javascript.biome_config.GraphqlFormatterConfigurationGraphQL formatter options.
linter
projen.javascript.biome_config.GraphqlLinterConfigurationNo description.

assistOptional
public readonly assist: GraphqlAssistConfiguration;
  • Type: projen.javascript.biome_config.GraphqlAssistConfiguration

Assist options.


formatterOptional
public readonly formatter: GraphqlFormatterConfiguration;
  • Type: projen.javascript.biome_config.GraphqlFormatterConfiguration

GraphQL formatter options.


linterOptional
public readonly linter: GraphqlLinterConfiguration;
  • Type: projen.javascript.biome_config.GraphqlLinterConfiguration

GraphqlFormatterConfiguration

Options that changes how the GraphQL formatter behaves.

Initializer

import { javascript } from 'projen'

const graphqlFormatterConfiguration: javascript.biome_config.GraphqlFormatterConfiguration = { ... }

Properties

NameTypeDescription
bracketSpacing
booleanWhether to insert spaces around brackets in object literals.
enabled
booleanControl the formatter for GraphQL files.
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style applied to GraphQL files.
indentWidth
numberThe size of the indentation applied to GraphQL files.
lineEnding
projen.javascript.biome_config.LineEndingThe type of line ending applied to GraphQL files.
lineWidth
numberWhat's the max width of a line applied to GraphQL files.
quoteStyle
projen.javascript.biome_config.QuoteStyleThe type of quotes used in GraphQL code.

bracketSpacingOptional
public readonly bracketSpacing: boolean;
  • Type: boolean
  • Default: true.

Whether to insert spaces around brackets in object literals.

Defaults to true.


enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the formatter for GraphQL files.


indentStyleOptional
public readonly indentStyle: IndentStyle;
  • Type: projen.javascript.biome_config.IndentStyle

The indent style applied to GraphQL files.


indentWidthOptional
public readonly indentWidth: number;
  • Type: number
  • Default: 2.

The size of the indentation applied to GraphQL files.

Default to 2.


lineEndingOptional
public readonly lineEnding: LineEnding;
  • Type: projen.javascript.biome_config.LineEnding

The type of line ending applied to GraphQL files.


lineWidthOptional
public readonly lineWidth: number;
  • Type: number
  • Default: 80.

What's the max width of a line applied to GraphQL files.

Defaults to 80.


quoteStyleOptional
public readonly quoteStyle: QuoteStyle;
  • Type: projen.javascript.biome_config.QuoteStyle
  • Default: double.

The type of quotes used in GraphQL code.

Defaults to double.


GraphqlLinterConfiguration

Options that change how the GraphQL linter behaves.

Initializer

import { javascript } from 'projen'

const graphqlLinterConfiguration: javascript.biome_config.GraphqlLinterConfiguration = { ... }

Properties

NameTypeDescription
enabled
booleanControl the formatter for GraphQL files.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the formatter for GraphQL files.


GritAssistConfiguration

Initializer

import { javascript } from 'projen'

const gritAssistConfiguration: javascript.biome_config.GritAssistConfiguration = { ... }

Properties

NameTypeDescription
enabled
booleanControl the assist functionality for Grit files.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the assist functionality for Grit files.


GritConfiguration

Options applied to GritQL files.

Initializer

import { javascript } from 'projen'

const gritConfiguration: javascript.biome_config.GritConfiguration = { ... }

Properties

NameTypeDescription
assist
projen.javascript.biome_config.GritAssistConfigurationAssist options.
formatter
projen.javascript.biome_config.GritFormatterConfigurationFormatting options.
linter
projen.javascript.biome_config.GritLinterConfigurationFormatting options.

assistOptional
public readonly assist: GritAssistConfiguration;
  • Type: projen.javascript.biome_config.GritAssistConfiguration

Assist options.


formatterOptional
public readonly formatter: GritFormatterConfiguration;
  • Type: projen.javascript.biome_config.GritFormatterConfiguration

Formatting options.


linterOptional
public readonly linter: GritLinterConfiguration;
  • Type: projen.javascript.biome_config.GritLinterConfiguration

Formatting options.


GritFormatterConfiguration

Initializer

import { javascript } from 'projen'

const gritFormatterConfiguration: javascript.biome_config.GritFormatterConfiguration = { ... }

Properties

NameTypeDescription
enabled
booleanControl the formatter for Grit files.
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style applied to Grit files.
indentWidth
numberThe size of the indentation applied to Grit files.
lineEnding
projen.javascript.biome_config.LineEndingThe type of line ending applied to Grit files.
lineWidth
numberWhat's the max width of a line applied to Grit files.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the formatter for Grit files.


indentStyleOptional
public readonly indentStyle: IndentStyle;
  • Type: projen.javascript.biome_config.IndentStyle

The indent style applied to Grit files.


indentWidthOptional
public readonly indentWidth: number;
  • Type: number
  • Default: 2.

The size of the indentation applied to Grit files.

Default to 2.


lineEndingOptional
public readonly lineEnding: LineEnding;
  • Type: projen.javascript.biome_config.LineEnding

The type of line ending applied to Grit files.


lineWidthOptional
public readonly lineWidth: number;
  • Type: number
  • Default: 80.

What's the max width of a line applied to Grit files.

Defaults to 80.


GritLinterConfiguration

Initializer

import { javascript } from 'projen'

const gritLinterConfiguration: javascript.biome_config.GritLinterConfiguration = { ... }

Properties

NameTypeDescription
enabled
booleanControl the linter for Grit files.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the linter for Grit files.


HtmlConfiguration

Options applied to HTML files.

Initializer

import { javascript } from 'projen'

const htmlConfiguration: javascript.biome_config.HtmlConfiguration = { ... }

Properties

NameTypeDescription
formatter
projen.javascript.biome_config.HtmlFormatterConfigurationHTML formatter options.
parser
anyHTML parsing options.

formatterOptional
public readonly formatter: HtmlFormatterConfiguration;
  • Type: projen.javascript.biome_config.HtmlFormatterConfiguration

HTML formatter options.


parserOptional
public readonly parser: any;
  • Type: any

HTML parsing options.


HtmlFormatterConfiguration

Options that changes how the HTML formatter behaves.

Initializer

import { javascript } from 'projen'

const htmlFormatterConfiguration: javascript.biome_config.HtmlFormatterConfiguration = { ... }

Properties

NameTypeDescription
attributePosition
projen.javascript.biome_config.AttributePositionThe attribute position style in HTML elements.
bracketSameLine
booleanWhether to hug the closing bracket of multiline HTML tags to the end of the last line, rather than being alone on the following line.
enabled
booleanControl the formatter for HTML (and its super languages) files.
indentScriptAndStyle
booleanWhether to indent the <script> and <style> tags for HTML (and its super languages).
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style applied to HTML (and its super languages) files.
indentWidth
numberThe size of the indentation applied to HTML (and its super languages) files.
lineEnding
projen.javascript.biome_config.LineEndingThe type of line ending applied to HTML (and its super languages) files.
lineWidth
numberWhat's the max width of a line applied to HTML (and its super languages) files.
selfCloseVoidElements
projen.javascript.biome_config.SelfCloseVoidElementsWhether void elements should be self-closed.
whitespaceSensitivity
projen.javascript.biome_config.WhitespaceSensitivityWhether to account for whitespace sensitivity when formatting HTML (and its super languages).

attributePositionOptional
public readonly attributePosition: AttributePosition;
  • Type: projen.javascript.biome_config.AttributePosition
  • Default: auto.

The attribute position style in HTML elements.

Defaults to auto.


bracketSameLineOptional
public readonly bracketSameLine: boolean;
  • Type: boolean
  • Default: false.

Whether to hug the closing bracket of multiline HTML tags to the end of the last line, rather than being alone on the following line.

Defaults to false.


enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the formatter for HTML (and its super languages) files.


indentScriptAndStyleOptional
public readonly indentScriptAndStyle: boolean;
  • Type: boolean
  • Default: false.

Whether to indent the <script> and <style> tags for HTML (and its super languages).

Defaults to false.


indentStyleOptional
public readonly indentStyle: IndentStyle;
  • Type: projen.javascript.biome_config.IndentStyle

The indent style applied to HTML (and its super languages) files.


indentWidthOptional
public readonly indentWidth: number;
  • Type: number
  • Default: 2.

The size of the indentation applied to HTML (and its super languages) files.

Default to 2.


lineEndingOptional
public readonly lineEnding: LineEnding;
  • Type: projen.javascript.biome_config.LineEnding

The type of line ending applied to HTML (and its super languages) files.


lineWidthOptional
public readonly lineWidth: number;
  • Type: number
  • Default: 80.

What's the max width of a line applied to HTML (and its super languages) files.

Defaults to 80.


selfCloseVoidElementsOptional
public readonly selfCloseVoidElements: SelfCloseVoidElements;
  • Type: projen.javascript.biome_config.SelfCloseVoidElements
  • Default: never.

Whether void elements should be self-closed.

Defaults to never.


whitespaceSensitivityOptional
public readonly whitespaceSensitivity: WhitespaceSensitivity;
  • Type: projen.javascript.biome_config.WhitespaceSensitivity
  • Default: css".

Whether to account for whitespace sensitivity when formatting HTML (and its super languages).

Defaults to "css".


JsAssistConfiguration

Assist options specific to the JavaScript assist.

Initializer

import { javascript } from 'projen'

const jsAssistConfiguration: javascript.biome_config.JsAssistConfiguration = { ... }

Properties

NameTypeDescription
enabled
booleanControl the assist for JavaScript (and its super languages) files.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the assist for JavaScript (and its super languages) files.


JsConfiguration

A set of options applied to the JavaScript files.

Initializer

import { javascript } from 'projen'

const jsConfiguration: javascript.biome_config.JsConfiguration = { ... }

Properties

NameTypeDescription
assist
projen.javascript.biome_config.JsAssistConfigurationAssist options.
formatter
projen.javascript.biome_config.JsFormatterConfigurationFormatting options.
globals
string[]A list of global bindings that should be ignored by the analyzers.
jsxRuntime
projen.javascript.biome_config.JsxRuntimeIndicates the type of runtime or transformation used for interpreting JSX.
linter
projen.javascript.biome_config.JsLinterConfigurationLinter options.
parser
projen.javascript.biome_config.JsParserConfigurationParsing options.

assistOptional
public readonly assist: JsAssistConfiguration;
  • Type: projen.javascript.biome_config.JsAssistConfiguration

Assist options.


formatterOptional
public readonly formatter: JsFormatterConfiguration;
  • Type: projen.javascript.biome_config.JsFormatterConfiguration

Formatting options.


globalsOptional
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.


jsxRuntimeOptional
public readonly jsxRuntime: JsxRuntime;
  • Type: projen.javascript.biome_config.JsxRuntime

Indicates the type of runtime or transformation used for interpreting JSX.


linterOptional
public readonly linter: JsLinterConfiguration;
  • Type: projen.javascript.biome_config.JsLinterConfiguration

Linter options.


parserOptional
public readonly parser: JsParserConfiguration;
  • Type: projen.javascript.biome_config.JsParserConfiguration

Parsing options.


JsFormatterConfiguration

Formatting options specific to the JavaScript files.

Initializer

import { javascript } from 'projen'

const jsFormatterConfiguration: javascript.biome_config.JsFormatterConfiguration = { ... }

Properties

NameTypeDescription
arrowParentheses
projen.javascript.biome_config.ArrowParenthesesWhether to add non-necessary parentheses to arrow functions.
attributePosition
projen.javascript.biome_config.AttributePositionThe attribute position style in JSX elements.
bracketSameLine
booleanWhether 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.
bracketSpacing
booleanWhether to insert spaces around brackets in object literals.
enabled
booleanControl the formatter for JavaScript (and its super languages) files.
expand
projen.javascript.biome_config.ExpandWhether to expand arrays and objects on multiple lines.
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style applied to JavaScript (and its super languages) files.
indentWidth
numberThe size of the indentation applied to JavaScript (and its super languages) files.
jsxQuoteStyle
projen.javascript.biome_config.QuoteStyleThe type of quotes used in JSX.
lineEnding
projen.javascript.biome_config.LineEndingThe type of line ending applied to JavaScript (and its super languages) files.
lineWidth
numberWhat's the max width of a line applied to JavaScript (and its super languages) files.
quoteProperties
projen.javascript.biome_config.QuotePropertiesWhen properties in objects are quoted.
quoteStyle
projen.javascript.biome_config.QuoteStyleThe type of quotes used in JavaScript code.
semicolons
projen.javascript.biome_config.SemicolonsWhether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.
trailingCommas
projen.javascript.biome_config.TrailingCommasPrint trailing commas wherever possible in multi-line comma-separated syntactic structures.

arrowParenthesesOptional
public readonly arrowParentheses: ArrowParentheses;
  • Type: projen.javascript.biome_config.ArrowParentheses
  • Default: always".

Whether to add non-necessary parentheses to arrow functions.

Defaults to "always".


attributePositionOptional
public readonly attributePosition: AttributePosition;
  • Type: projen.javascript.biome_config.AttributePosition
  • Default: auto.

The attribute position style in JSX elements.

Defaults to auto.


bracketSameLineOptional
public readonly bracketSameLine: boolean;
  • Type: boolean
  • Default: false.

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.


bracketSpacingOptional
public readonly bracketSpacing: boolean;
  • Type: boolean
  • Default: true.

Whether to insert spaces around brackets in object literals.

Defaults to true.


enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the formatter for JavaScript (and its super languages) files.


expandOptional
public readonly expand: Expand;
  • Type: projen.javascript.biome_config.Expand
  • Default: auto".

Whether to expand arrays and objects on multiple lines.

When set to auto, object literals are formatted on multiple lines if the first property has a newline, and array literals are formatted on a single line if it fits in the line. When set to always, these literals are formatted on multiple lines, regardless of length of the list. When set to never, these literals are formatted on a single line if it fits in the line. When formatting package.json, Biome will use always unless configured otherwise. Defaults to "auto".


indentStyleOptional
public readonly indentStyle: IndentStyle;
  • Type: projen.javascript.biome_config.IndentStyle

The indent style applied to JavaScript (and its super languages) files.


indentWidthOptional
public readonly indentWidth: number;
  • Type: number
  • Default: 2.

The size of the indentation applied to JavaScript (and its super languages) files.

Default to 2.


jsxQuoteStyleOptional
public readonly jsxQuoteStyle: QuoteStyle;
  • Type: projen.javascript.biome_config.QuoteStyle
  • Default: double.

The type of quotes used in JSX.

Defaults to double.


lineEndingOptional
public readonly lineEnding: LineEnding;
  • Type: projen.javascript.biome_config.LineEnding

The type of line ending applied to JavaScript (and its super languages) files.


lineWidthOptional
public readonly lineWidth: number;
  • Type: number
  • Default: 80.

What's the max width of a line applied to JavaScript (and its super languages) files.

Defaults to 80.


quotePropertiesOptional
public readonly quoteProperties: QuoteProperties;
  • Type: projen.javascript.biome_config.QuoteProperties
  • Default: asNeeded.

When properties in objects are quoted.

Defaults to asNeeded.


quoteStyleOptional
public readonly quoteStyle: QuoteStyle;
  • Type: projen.javascript.biome_config.QuoteStyle
  • Default: double.

The type of quotes used in JavaScript code.

Defaults to double.


semicolonsOptional
public readonly semicolons: Semicolons;
  • Type: projen.javascript.biome_config.Semicolons

Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.


trailingCommasOptional
public readonly trailingCommas: TrailingCommas;
  • Type: projen.javascript.biome_config.TrailingCommas
  • Default: all".

Print trailing commas wherever possible in multi-line comma-separated syntactic structures.

Defaults to "all".


JsLinterConfiguration

Linter options specific to the JavaScript linter.

Initializer

import { javascript } from 'projen'

const jsLinterConfiguration: javascript.biome_config.JsLinterConfiguration = { ... }

Properties

NameTypeDescription
enabled
booleanControl the linter for JavaScript (and its super languages) files.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the linter for JavaScript (and its super languages) files.


JsonAssistConfiguration

Linter options specific to the JSON linter.

Initializer

import { javascript } from 'projen'

const jsonAssistConfiguration: javascript.biome_config.JsonAssistConfiguration = { ... }

Properties

NameTypeDescription
enabled
booleanControl the assist for JSON (and its super languages) files.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the assist for JSON (and its super languages) files.


JsonConfiguration

Options applied to JSON files.

Initializer

import { javascript } from 'projen'

const jsonConfiguration: javascript.biome_config.JsonConfiguration = { ... }

Properties

NameTypeDescription
assist
projen.javascript.biome_config.JsonAssistConfigurationAssist options.
formatter
projen.javascript.biome_config.JsonFormatterConfigurationFormatting options.
linter
projen.javascript.biome_config.JsonLinterConfigurationLinting options.
parser
projen.javascript.biome_config.JsonParserConfigurationParsing options.

assistOptional
public readonly assist: JsonAssistConfiguration;
  • Type: projen.javascript.biome_config.JsonAssistConfiguration

Assist options.


formatterOptional
public readonly formatter: JsonFormatterConfiguration;
  • Type: projen.javascript.biome_config.JsonFormatterConfiguration

Formatting options.


linterOptional
public readonly linter: JsonLinterConfiguration;
  • Type: projen.javascript.biome_config.JsonLinterConfiguration

Linting options.


parserOptional
public readonly parser: JsonParserConfiguration;
  • Type: projen.javascript.biome_config.JsonParserConfiguration

Parsing options.


JsonFormatterConfiguration

Initializer

import { javascript } from 'projen'

const jsonFormatterConfiguration: javascript.biome_config.JsonFormatterConfiguration = { ... }

Properties

NameTypeDescription
bracketSpacing
booleanWhether to insert spaces around brackets in object literals.
enabled
booleanControl the formatter for JSON (and its super languages) files.
expand
projen.javascript.biome_config.ExpandWhether to expand arrays and objects on multiple lines.
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style applied to JSON (and its super languages) files.
indentWidth
numberThe size of the indentation applied to JSON (and its super languages) files.
lineEnding
projen.javascript.biome_config.LineEndingThe type of line ending applied to JSON (and its super languages) files.
lineWidth
numberWhat's the max width of a line applied to JSON (and its super languages) files.
trailingCommas
projen.javascript.biome_config.TrailingCommas2Print trailing commas wherever possible in multi-line comma-separated syntactic structures.

bracketSpacingOptional
public readonly bracketSpacing: boolean;
  • Type: boolean
  • Default: true.

Whether to insert spaces around brackets in object literals.

Defaults to true.


enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the formatter for JSON (and its super languages) files.


expandOptional
public readonly expand: Expand;
  • Type: projen.javascript.biome_config.Expand
  • Default: auto".

Whether to expand arrays and objects on multiple lines.

When set to auto, object literals are formatted on multiple lines if the first property has a newline, and array literals are formatted on a single line if it fits in the line. When set to always, these literals are formatted on multiple lines, regardless of length of the list. When set to never, these literals are formatted on a single line if it fits in the line. When formatting package.json, Biome will use always unless configured otherwise. Defaults to "auto".


indentStyleOptional
public readonly indentStyle: IndentStyle;
  • Type: projen.javascript.biome_config.IndentStyle

The indent style applied to JSON (and its super languages) files.


indentWidthOptional
public readonly indentWidth: number;
  • Type: number
  • Default: 2.

The size of the indentation applied to JSON (and its super languages) files.

Default to 2.


lineEndingOptional
public readonly lineEnding: LineEnding;
  • Type: projen.javascript.biome_config.LineEnding

The type of line ending applied to JSON (and its super languages) files.


lineWidthOptional
public readonly lineWidth: number;
  • Type: number
  • Default: 80.

What's the max width of a line applied to JSON (and its super languages) files.

Defaults to 80.


trailingCommasOptional
public readonly trailingCommas: TrailingCommas2;
  • Type: projen.javascript.biome_config.TrailingCommas2
  • Default: none".

Print trailing commas wherever possible in multi-line comma-separated syntactic structures.

Defaults to "none".


JsonLinterConfiguration

Linter options specific to the JSON linter.

Initializer

import { javascript } from 'projen'

const jsonLinterConfiguration: javascript.biome_config.JsonLinterConfiguration = { ... }

Properties

NameTypeDescription
enabled
booleanControl the linter for JSON (and its super languages) files.

enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Control the linter for JSON (and its super languages) files.


JsonParserConfiguration

Options that changes how the JSON parser behaves.

Initializer

import { javascript } from 'projen'

const jsonParserConfiguration: javascript.biome_config.JsonParserConfiguration = { ... }

Properties

NameTypeDescription
allowComments
booleanAllow parsing comments in .json files.
allowTrailingCommas
booleanAllow parsing trailing commas in .json files.

allowCommentsOptional
public readonly allowComments: boolean;
  • Type: boolean

Allow parsing comments in .json files.


allowTrailingCommasOptional
public readonly allowTrailingCommas: boolean;
  • Type: boolean

Allow parsing trailing commas in .json files.


JsParserConfiguration

Options that changes how the JavaScript parser behaves.

Initializer

import { javascript } from 'projen'

const jsParserConfiguration: javascript.biome_config.JsParserConfiguration = { ... }

Properties

NameTypeDescription
gritMetavariables
booleanEnables parsing of Grit metavariables.
jsxEverywhere
booleanWhen enabled, files like .js/.mjs/.cjs may contain JSX syntax.
unsafeParameterDecoratorsEnabled
booleanIt enables the experimental and unsafe parsing of parameter decorators.

gritMetavariablesOptional
public readonly gritMetavariables: boolean;
  • Type: boolean
  • Default: false`.

Enables parsing of Grit metavariables.

Defaults to false.


jsxEverywhereOptional
public readonly jsxEverywhere: boolean;
  • Type: boolean
  • Default: true`.

When enabled, files like .js/.mjs/.cjs may contain JSX syntax.

Defaults to true.


unsafeParameterDecoratorsEnabledOptional
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.


LinterConfiguration

Initializer

import { javascript } from 'projen'

const linterConfiguration: javascript.biome_config.LinterConfiguration = { ... }

Properties

NameTypeDescription
domains
{[ key: string ]: projen.javascript.biome_config.RuleDomainValue}An object where the keys are the names of the domains, and the values are all, recommended, or none.
enabled
booleanif false, it disables the feature and the linter won't be executed.
includes
string[]A list of glob patterns.
rules
projen.javascript.biome_config.RulesList of rules.

domainsOptional
public readonly domains: {[ key: string ]: RuleDomainValue};
  • Type: {[ key: string ]: projen.javascript.biome_config.RuleDomainValue}

An object where the keys are the names of the domains, and the values are all, recommended, or none.


enabledOptional
public readonly enabled: boolean;
  • Type: boolean

if false, it disables the feature and the linter won't be executed.

true by default


includesOptional
public readonly includes: string[];
  • Type: string[]

A list of glob patterns.

The analyzer will handle only those files/folders that will match these patterns.


rulesOptional
public readonly rules: Rules;
  • Type: projen.javascript.biome_config.Rules

List of rules.


OverrideAssistConfiguration

Initializer

import { javascript } from 'projen'

const overrideAssistConfiguration: javascript.biome_config.OverrideAssistConfiguration = { ... }

Properties

NameTypeDescription
actions
projen.javascript.biome_config.ActionsList of actions.
enabled
booleanif false, it disables the feature and the assist won't be executed.

actionsOptional
public readonly actions: Actions;
  • Type: projen.javascript.biome_config.Actions

List of actions.


enabledOptional
public readonly enabled: boolean;
  • Type: boolean

if false, it disables the feature and the assist won't be executed.

true by default


OverrideFilesConfiguration

Initializer

import { javascript } from 'projen'

const overrideFilesConfiguration: javascript.biome_config.OverrideFilesConfiguration = { ... }

Properties

NameTypeDescription
maxSize
numberFile size limit in bytes.

maxSizeOptional
public readonly maxSize: number;
  • Type: number

File size limit in bytes.


OverrideFormatterConfiguration

Initializer

import { javascript } from 'projen'

const overrideFormatterConfiguration: javascript.biome_config.OverrideFormatterConfiguration = { ... }

Properties

NameTypeDescription
attributePosition
projen.javascript.biome_config.AttributePositionThe attribute position style.
bracketSameLine
booleanPut the > of a multi-line HTML or JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).
bracketSpacing
booleanWhether to insert spaces around brackets in object literals.
enabled
booleanNo description.
expand
projen.javascript.biome_config.ExpandWhether to expand arrays and objects on multiple lines.
formatWithErrors
booleanStores whether formatting should be allowed to proceed if a given file has syntax errors.
indentSize
numberThe size of the indentation, 2 by default (deprecated, use indent-width).
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style.
indentWidth
numberThe size of the indentation, 2 by default.
lineEnding
projen.javascript.biome_config.LineEndingThe type of line ending.
lineWidth
numberWhat's the max width of a line.

attributePositionOptional
public readonly attributePosition: AttributePosition;
  • Type: projen.javascript.biome_config.AttributePosition

The attribute position style.


bracketSameLineOptional
public readonly bracketSameLine: boolean;
  • Type: boolean

Put the > of a multi-line HTML or JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).


bracketSpacingOptional
public readonly bracketSpacing: boolean;
  • Type: boolean
  • Default: true.

Whether to insert spaces around brackets in object literals.

Defaults to true.


enabledOptional
public readonly enabled: boolean;
  • Type: boolean

expandOptional
public readonly expand: Expand;
  • Type: projen.javascript.biome_config.Expand
  • Default: auto".

Whether to expand arrays and objects on multiple lines.

When set to auto, object literals are formatted on multiple lines if the first property has a newline, and array literals are formatted on a single line if it fits in the line. When set to always, these literals are formatted on multiple lines, regardless of length of the list. When set to never, these literals are formatted on a single line if it fits in the line. When formatting package.json, Biome will use always unless configured otherwise. Defaults to "auto".


formatWithErrorsOptional
public readonly formatWithErrors: boolean;
  • Type: boolean

Stores whether formatting should be allowed to proceed if a given file has syntax errors.


indentSizeOptional
public readonly indentSize: number;
  • Type: number

The size of the indentation, 2 by default (deprecated, use indent-width).


indentStyleOptional
public readonly indentStyle: IndentStyle;
  • Type: projen.javascript.biome_config.IndentStyle

The indent style.


indentWidthOptional
public readonly indentWidth: number;
  • Type: number

The size of the indentation, 2 by default.


lineEndingOptional
public readonly lineEnding: LineEnding;
  • Type: projen.javascript.biome_config.LineEnding

The type of line ending.


lineWidthOptional
public readonly lineWidth: number;
  • Type: number
  • Default: 80.

What's the max width of a line.

Defaults to 80.


OverrideLinterConfiguration

Initializer

import { javascript } from 'projen'

const overrideLinterConfiguration: javascript.biome_config.OverrideLinterConfiguration = { ... }

Properties

NameTypeDescription
domains
{[ key: string ]: projen.javascript.biome_config.RuleDomainValue}List of rules.
enabled
booleanif false, it disables the feature and the linter won't be executed.
rules
projen.javascript.biome_config.RulesList of rules.

domainsOptional
public readonly domains: {[ key: string ]: RuleDomainValue};
  • Type: {[ key: string ]: projen.javascript.biome_config.RuleDomainValue}

List of rules.


enabledOptional
public readonly enabled: boolean;
  • Type: boolean

if false, it disables the feature and the linter won't be executed.

true by default


rulesOptional
public readonly rules: Rules;
  • Type: projen.javascript.biome_config.Rules

List of rules.


OverridePattern

Initializer

import { javascript } from 'projen'

const overridePattern: javascript.biome_config.OverridePattern = { ... }

Properties

NameTypeDescription
assist
projen.javascript.biome_config.OverrideAssistConfigurationSpecific configuration for the Json language.
css
projen.javascript.biome_config.CssConfigurationSpecific configuration for the CSS language.
files
projen.javascript.biome_config.OverrideFilesConfigurationSpecific configuration for the filesystem.
formatter
projen.javascript.biome_config.OverrideFormatterConfigurationSpecific configuration for the Json language.
graphql
projen.javascript.biome_config.GraphqlConfigurationSpecific configuration for the Graphql language.
grit
projen.javascript.biome_config.GritConfigurationSpecific configuration for the GritQL language.
html
projen.javascript.biome_config.HtmlConfigurationSpecific configuration for the GritQL language.
includes
string[]A list of glob patterns.
javascript
projen.javascript.biome_config.JsConfigurationSpecific configuration for the JavaScript language.
json
projen.javascript.biome_config.JsonConfigurationSpecific configuration for the Json language.
linter
projen.javascript.biome_config.OverrideLinterConfigurationSpecific configuration for the Json language.
plugins
string[]Specific configuration for additional plugins.

assistOptional
public readonly assist: OverrideAssistConfiguration;
  • Type: projen.javascript.biome_config.OverrideAssistConfiguration

Specific configuration for the Json language.


cssOptional
public readonly css: CssConfiguration;
  • Type: projen.javascript.biome_config.CssConfiguration

Specific configuration for the CSS language.


filesOptional
public readonly files: OverrideFilesConfiguration;
  • Type: projen.javascript.biome_config.OverrideFilesConfiguration

Specific configuration for the filesystem.


formatterOptional
public readonly formatter: OverrideFormatterConfiguration;
  • Type: projen.javascript.biome_config.OverrideFormatterConfiguration

Specific configuration for the Json language.


graphqlOptional
public readonly graphql: GraphqlConfiguration;
  • Type: projen.javascript.biome_config.GraphqlConfiguration

Specific configuration for the Graphql language.


gritOptional
public readonly grit: GritConfiguration;
  • Type: projen.javascript.biome_config.GritConfiguration

Specific configuration for the GritQL language.


htmlOptional
public readonly html: HtmlConfiguration;
  • Type: projen.javascript.biome_config.HtmlConfiguration

Specific configuration for the GritQL language.


includesOptional
public readonly includes: string[];
  • Type: string[]

A list of glob patterns.

Biome will include files/folders that will match these patterns.


javascriptOptional
public readonly javascript: JsConfiguration;
  • Type: projen.javascript.biome_config.JsConfiguration

Specific configuration for the JavaScript language.


jsonOptional
public readonly json: JsonConfiguration;
  • Type: projen.javascript.biome_config.JsonConfiguration

Specific configuration for the Json language.


linterOptional
public readonly linter: OverrideLinterConfiguration;
  • Type: projen.javascript.biome_config.OverrideLinterConfiguration

Specific configuration for the Json language.


pluginsOptional
public readonly plugins: string[];
  • Type: string[]

Specific configuration for additional plugins.


Rules

Initializer

import { javascript } from 'projen'

const rules: javascript.biome_config.Rules = { ... }

Properties

NameTypeDescription
a11Y
anyNo description.
complexity
anyNo description.
correctness
anyNo description.
nursery
anyNo description.
performance
anyNo description.
recommended
booleanIt enables the lint rules recommended by Biome.
security
anyNo description.
style
anyNo description.
suspicious
anyNo description.

a11YOptional
public readonly a11Y: any;
  • Type: any

complexityOptional
public readonly complexity: any;
  • Type: any

correctnessOptional
public readonly correctness: any;
  • Type: any

nurseryOptional
public readonly nursery: any;
  • Type: any

performanceOptional
public readonly performance: any;
  • Type: any

recommendedOptional
public readonly recommended: boolean;
  • Type: boolean

It enables the lint rules recommended by Biome.

true by default.


securityOptional
public readonly security: any;
  • Type: any

styleOptional
public readonly style: any;
  • Type: any

suspiciousOptional
public readonly suspicious: any;
  • Type: any

Source

A list of rules that belong to this group.

Initializer

import { javascript } from 'projen'

const source: javascript.biome_config.Source = { ... }

Properties

NameTypeDescription
organizeImports
anyProvides a code action to sort the imports and exports in the file using a built-in or custom order.
recommended
booleanIt enables the recommended rules for this group.
useSortedAttributes
anyEnforce attribute sorting in JSX elements.
useSortedKeys
anySorts the keys of a JSON object in natural order.
useSortedProperties
anyEnforce ordering of CSS properties and nested rules.

organizeImportsOptional
public readonly organizeImports: any;
  • Type: any

Provides a code action to sort the imports and exports in the file using a built-in or custom order.


recommendedOptional
public readonly recommended: boolean;
  • Type: boolean

It enables the recommended rules for this group.


useSortedAttributesOptional
public readonly useSortedAttributes: any;
  • Type: any

Enforce attribute sorting in JSX elements.


useSortedKeysOptional
public readonly useSortedKeys: any;
  • Type: any

Sorts the keys of a JSON object in natural order.


useSortedPropertiesOptional
public readonly useSortedProperties: any;
  • Type: any

Enforce ordering of CSS properties and nested rules.


VcsConfiguration

Set of properties to integrate Biome with a VCS software.

Initializer

import { javascript } from 'projen'

const vcsConfiguration: javascript.biome_config.VcsConfiguration = { ... }

Properties

NameTypeDescription
clientKind
projen.javascript.biome_config.VcsClientKindThe kind of client.
defaultBranch
stringThe main branch of the project.
enabled
booleanWhether Biome should integrate itself with the VCS client.
root
stringThe folder where Biome should check for VCS files.
useIgnoreFile
booleanWhether Biome should use the VCS ignore file.

clientKindOptional
public readonly clientKind: VcsClientKind;
  • Type: projen.javascript.biome_config.VcsClientKind

The kind of client.


defaultBranchOptional
public readonly defaultBranch: string;
  • Type: string

The main branch of the project.


enabledOptional
public readonly enabled: boolean;
  • Type: boolean

Whether Biome should integrate itself with the VCS client.


rootOptional
public readonly root: string;
  • Type: string

The folder where Biome should check for VCS files.

By default, Biome will use the same folder where biome.json was found.

If Biome can't find the configuration, it will attempt to use the current working directory. If no current working directory can't be found, Biome won't use the VCS integration, and a diagnostic will be emitted


useIgnoreFileOptional
public readonly useIgnoreFile: boolean;
  • Type: boolean

Whether Biome should use the VCS ignore file.

When [true], Biome will ignore the files specified in the ignore file.


Enums

ArrowParentheses

Members

NameDescription
ALWAYS
always.
AS_NEEDED
asNeeded.

ALWAYS

always.


AS_NEEDED

asNeeded.


AttributePosition

Members

NameDescription
AUTO
auto.
MULTILINE
multiline.

AUTO

auto.


MULTILINE

multiline.


Expand

Members

NameDescription
AUTO
auto.
ALWAYS
always.
NEVER
never.

AUTO

auto.


ALWAYS

always.


NEVER

never.


IndentStyle

Members

NameDescription
TAB
tab.
SPACE
space.

TAB

tab.


SPACE

space.


JsxRuntime

Indicates the type of runtime or transformation used for interpreting JSX.

Members

NameDescription
TRANSPARENT
transparent.
REACT_CLASSIC
reactClassic.

TRANSPARENT

transparent.


REACT_CLASSIC

reactClassic.


LineEnding

Members

NameDescription
LF
lf.
CRLF
crlf.
CR
cr.

LF

lf.


CRLF

crlf.


CR

cr.


QuoteProperties

Members

NameDescription
AS_NEEDED
asNeeded.
PRESERVE
preserve.

AS_NEEDED

asNeeded.


PRESERVE

preserve.


QuoteStyle

Members

NameDescription
DOUBLE
double.
SINGLE
single.

DOUBLE

double.


SINGLE

single.


RuleDomainValue

Members

NameDescription
ALL
all.
NONE
none.
RECOMMENDED
recommended.

ALL

all.


NONE

none.


recommended.


SelfCloseVoidElements

Controls whether void-elements should be self closed.

Members

NameDescription
NEVER
never.
ALWAYS
always.

NEVER

never.


ALWAYS

always.


Semicolons

Members

NameDescription
ALWAYS
always.
AS_NEEDED
asNeeded.

ALWAYS

always.


AS_NEEDED

asNeeded.


TrailingCommas

Print trailing commas wherever possible in multi-line comma-separated syntactic structures.

Members

NameDescription
ALL
all.
ES5
es5.
NONE
none.

ALL

all.


ES5

es5.


NONE

none.


TrailingCommas2

Members

NameDescription
NONE
none.
ALL
all.

NONE

none.


ALL

all.


VcsClientKind

Integration with the git client as VCS.

Members

NameDescription
GIT
git.

GIT

git.


WhitespaceSensitivity

Whitespace sensitivity for HTML formatting.

The following two cases won't produce the same output:

| | html | output | | -------------- | :------------: | :----------: | | with spaces | 1<b> 2 </b>3 | 1 2 3 | | without spaces | 1<b>2</b>3 | 123 |

This happens because whitespace is significant in inline elements.

As a consequence of this, the formatter must format blocks that look like this (assume a small line width, <20): html <span>really long content</span> as this, where the content hugs the tags: html <span >really long content</span >

Note that this is only necessary for inline elements. Block elements do not have this restriction.

Members

NameDescription
CSS
css.
STRICT
strict.
IGNORE
ignore.

CSS

css.


STRICT

strict.


IGNORE

ignore.