Skip to main content

javascript.biome_config Submodule

Structs ​

Actions ​

Initializer ​

import { javascript } from 'projen'

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

Properties ​

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

presetOptional ​
public readonly preset: PresetConfig;
  • Type: projen.javascript.biome_config.PresetConfig

The actions preset to use.


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 contained in biome.json.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
assist
projen.javascript.biome_config.AssistConfigurationThe assist configuration.
css
projen.javascript.biome_config.CssConfigurationConfiguration specific to CSS.
extends
string[]A list of paths to other JSON files, used to extend the current configuration.
files
projen.javascript.biome_config.FilesConfigurationThe file handling configuration.
formatter
projen.javascript.biome_config.FormatterConfigurationThe formatter configuration.
graphql
projen.javascript.biome_config.GraphqlConfigurationConfiguration specific to GraphQL.
grit
projen.javascript.biome_config.GritConfigurationConfiguration specific to GritQL.
html
projen.javascript.biome_config.HtmlConfigurationConfiguration specific to HTML.
javascript
projen.javascript.biome_config.JsConfigurationConfiguration specific to JavaScript.
json
projen.javascript.biome_config.JsonConfigurationConfiguration specific to JSON.
linter
projen.javascript.biome_config.LinterConfigurationThe linter configuration.
overrides
projen.javascript.biome_config.OverridePattern[]A list of granular patterns applied only to a subset of files.
plugins
any[]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: https://json-schema.org/.
vcs
projen.javascript.biome_config.VcsConfigurationThe version control integration configuration.

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

The assist configuration.


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

Configuration specific to CSS.


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

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


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

The file handling configuration.


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

The formatter configuration.


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

Configuration specific to GraphQL.


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

Configuration specific to GritQL.


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

Configuration specific to HTML.


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

Configuration specific to JavaScript.


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

Configuration specific to JSON.


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

The linter configuration.


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

A list of granular patterns applied only to a subset of files.


pluginsOptional ​
public readonly plugins: any[];
  • Type: any[]

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: https://json-schema.org/.


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

The version control integration configuration.


CssAssistConfiguration ​

Options that change how CSS assist behaves.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
enabled
booleanControls assist actions for CSS files.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls assist actions 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 change how the CSS formatter behaves.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
delimiterSpacing
booleanControls spaces inside CSS parentheses and square brackets when their content fits on one line.
enabled
booleanControls the formatter for CSS and languages that extend it.
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style applied to CSS and languages that extend it.
indentWidth
numberThe indentation width applied to CSS and languages that extend it.
lineEnding
projen.javascript.biome_config.LineEndingThe line ending applied to CSS and languages that extend it.
lineWidth
numberThe maximum line width for CSS and languages that extend it.
quoteStyle
projen.javascript.biome_config.QuoteStyleThe type of quotes used in CSS code.
trailingNewline
booleanWhether to add a trailing newline at the end of the file.

delimiterSpacingOptional ​
public readonly delimiterSpacing: boolean;
  • Type: boolean

Controls spaces inside CSS parentheses and square brackets when their content fits on one line.

When enabled, rgb(0, 0, 0) becomes rgb( 0, 0, 0 ) and [data-attr] becomes [ data-attr ]. Empty delimiters are unchanged.

If unset, inherits the global delimiter spacing setting.


enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls the formatter for CSS and languages that extend it.


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

The indent style applied to CSS and languages that extend it.

If unset, inherits the global indentation style.


indentWidthOptional ​
public readonly indentWidth: number;
  • Type: number

The indentation width applied to CSS and languages that extend it.

If unset, inherits the global indentation width.


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

The line ending applied to CSS and languages that extend it.

If unset, inherits the global line ending.


lineWidthOptional ​
public readonly lineWidth: number;
  • Type: number

The maximum line width for CSS and languages that extend it.

If unset, inherits the global line width.


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

The type of quotes used in CSS code.

Defaults to double.


trailingNewlineOptional ​
public readonly trailingNewline: boolean;
  • Type: boolean

Whether to add a trailing newline at the end of the file.

If unset, inherits the global trailing newline setting.


CssLinterConfiguration ​

Options that change how the CSS linter behaves.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
enabled
booleanControls the linter for CSS files.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls the linter for CSS files.


CssParserConfiguration ​

Options that change how the CSS parser behaves.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
allowWrongLineComments
booleanAllows comments to appear on incorrect lines in .css files.
cssModules
booleanEnables parsing of CSS Modules-specific features.
tailwindDirectives
booleanEnables parsing of Tailwind CSS 4.0 directives and functions.

allowWrongLineCommentsOptional ​
public readonly allowWrongLineComments: boolean;
  • Type: boolean

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


cssModulesOptional ​
public readonly cssModules: boolean;
  • Type: boolean

Enables parsing of CSS Modules-specific features.

Enable this feature only when your files don't end in .module.css.


tailwindDirectivesOptional ​
public readonly tailwindDirectives: boolean;
  • Type: boolean

Enables parsing of Tailwind CSS 4.0 directives and functions.


FilesConfiguration ​

The file handling configuration.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
experimentalScannerIgnores
string[]Deprecated: Please use force-ignore syntax in files.includes instead: https://biomejs.dev/reference/configuration/#filesincludes.
ignoreUnknown
booleanPrevents Biome from emitting diagnostics for unrecognized file types.
includes
string[]A list of glob patterns.
maxSize
numberThe maximum source file size in bytes.

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

Deprecated: Please use force-ignore syntax in files.includes instead: https://biomejs.dev/reference/configuration/#filesincludes.

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


ignoreUnknownOptional ​
public readonly ignoreUnknown: boolean;
  • Type: boolean

Prevents Biome from emitting diagnostics for unrecognized file types.


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

A list of glob patterns.

Biome handles only files and directories that match these patterns.


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

The maximum source file size in bytes.

Biome ignores larger files. 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-like languages.
bracketSameLine
booleanPlaces the > of a multiline HTML or JSX element at the end of the last line instead of on the next line.
bracketSpacing
booleanWhether to insert spaces inside braces in object literals.
delimiterSpacing
booleanControls spaces immediately inside supported delimiters when their content fits on one line.
enabled
booleanNo description.
expand
projen.javascript.biome_config.ExpandControls whether arrays and objects are formatted on one line or multiple lines.
formatWithErrors
booleanAllows formatting files that contain syntax errors when set to true.
includes
string[]A list of glob patterns.
indentStyle
projen.javascript.biome_config.IndentStyleUses tabs or spaces for indentation.
indentWidth
numberThe indentation width.
lineEnding
projen.javascript.biome_config.LineEndingSelects the line ending.
lineWidth
numberThe maximum line width.
trailingNewline
booleanWhether to add a trailing newline at the end of the file.
useEditorconfig
booleanUses .editorconfig files to configure the formatter. Settings in biome.json or biome.jsonc override .editorconfig settings. Defaults to false.

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

The attribute position style in HTML-like languages.

Defaults to auto.


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

Places the > of a multiline HTML or JSX element at the end of the last line instead of on the next line.

Self-closing elements are unaffected. Defaults to false.


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

Whether to insert spaces inside braces in object literals.

Defaults to true.


delimiterSpacingOptional ​
public readonly delimiterSpacing: boolean;
  • Type: boolean
  • Default: false`.

Controls spaces immediately inside supported delimiters when their content fits on one line.

It doesn't add spaces before opening delimiters or inside empty delimiters.

The affected delimiters vary by language. Defaults to false.


enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

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

Controls whether arrays and objects are formatted on one line or multiple lines.

auto formats objects on multiple lines if the first property has a newline, and arrays on one line if they fit.

always formats arrays and objects on multiple lines.

never formats arrays and objects on one line if they fit.

Defaults to auto.

When formatting package.json, Biome uses always unless configured otherwise.


formatWithErrorsOptional ​
public readonly formatWithErrors: boolean;
  • Type: boolean
  • Default: false`.

Allows formatting files that contain syntax errors when set to true.

Defaults to false.


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
  • Default: tab`.

Uses tabs or spaces for indentation.

Defaults to tab.


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

The indentation width.

Defaults to 2.


lineEndingOptional ​
public readonly lineEnding: LineEnding;
  • Type: projen.javascript.biome_config.LineEnding
  • Default: lf`.

Selects the line ending.

auto uses the platform convention. Defaults to lf.


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

The maximum line width.

Defaults to 80.


trailingNewlineOptional ​
public readonly trailingNewline: boolean;
  • Type: boolean
  • Default: true`; disabling

Whether to add a trailing newline at the end of the file.

Defaults to true; disabling this option can cause compatibility problems with other tools.


useEditorconfigOptional ​
public readonly useEditorconfig: boolean;
  • Type: boolean
  • Default: false`.

Uses .editorconfig files to configure the formatter. Settings in biome.json or biome.jsonc override .editorconfig settings. Defaults to false.


GraphqlAssistConfiguration ​

Options that change how GraphQL assist behaves.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
enabled
booleanControls assist actions for GraphQL files.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls assist actions 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.GraphqlAssistConfigurationGraphQL assist options.
formatter
projen.javascript.biome_config.GraphqlFormatterConfigurationGraphQL formatter options.
linter
projen.javascript.biome_config.GraphqlLinterConfigurationGraphQL linter options.

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

GraphQL 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

GraphQL linter options.


GraphqlFormatterConfiguration ​

Options that change how the GraphQL formatter behaves.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
bracketSpacing
booleanWhether to insert spaces inside braces in object literals.
enabled
booleanControls the formatter for GraphQL files.
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style applied to GraphQL files.
indentWidth
numberThe indentation width applied to GraphQL files.
lineEnding
projen.javascript.biome_config.LineEndingThe line ending applied to GraphQL files.
lineWidth
numberThe maximum line width for GraphQL files.
quoteStyle
projen.javascript.biome_config.QuoteStyleThe type of quotes used in GraphQL code.
trailingNewline
booleanWhether to add a trailing newline at the end of the file.

bracketSpacingOptional ​
public readonly bracketSpacing: boolean;
  • Type: boolean

Whether to insert spaces inside braces in object literals.

If unset, inherits the global bracket spacing setting.


enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls the formatter for GraphQL files.


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

The indent style applied to GraphQL files.

If unset, inherits the global indentation style.


indentWidthOptional ​
public readonly indentWidth: number;
  • Type: number

The indentation width applied to GraphQL files.

If unset, inherits the global indentation width.


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

The line ending applied to GraphQL files.

If unset, inherits the global line ending.


lineWidthOptional ​
public readonly lineWidth: number;
  • Type: number

The maximum line width for GraphQL files.

If unset, inherits the global line width.


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

The type of quotes used in GraphQL code.

Defaults to double.


trailingNewlineOptional ​
public readonly trailingNewline: boolean;
  • Type: boolean

Whether to add a trailing newline at the end of the file.

If unset, inherits the global trailing newline setting.


GraphqlLinterConfiguration ​

Options that change how the GraphQL linter behaves.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
enabled
booleanControls the linter for GraphQL files.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls the linter for GraphQL files.


GritAssistConfiguration ​

Options that change how GritQL assist behaves.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
enabled
booleanControls assist actions for GritQL files.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls assist actions for GritQL 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.GritAssistConfigurationGritQL assist options.
formatter
projen.javascript.biome_config.GritFormatterConfigurationGritQL formatter options.
linter
projen.javascript.biome_config.GritLinterConfigurationGritQL linter options.

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

GritQL assist options.


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

GritQL formatter options.


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

GritQL linter options.


GritFormatterConfiguration ​

Options that change how the GritQL formatter behaves.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
enabled
booleanControls the formatter for GritQL files.
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style applied to GritQL files.
indentWidth
numberThe indentation width applied to GritQL files.
lineEnding
projen.javascript.biome_config.LineEndingThe line ending applied to GritQL files.
lineWidth
numberThe maximum line width for GritQL files.
trailingNewline
booleanWhether to add a trailing newline at the end of the file.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls the formatter for GritQL files.


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

The indent style applied to GritQL files.

If unset, inherits the global indentation style.


indentWidthOptional ​
public readonly indentWidth: number;
  • Type: number

The indentation width applied to GritQL files.

If unset, inherits the global indentation width.


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

The line ending applied to GritQL files.

If unset, inherits the global line ending.


lineWidthOptional ​
public readonly lineWidth: number;
  • Type: number

The maximum line width for GritQL files.

If unset, inherits the global line width.


trailingNewlineOptional ​
public readonly trailingNewline: boolean;
  • Type: boolean

Whether to add a trailing newline at the end of the file.

If unset, inherits the global trailing newline setting.


GritLinterConfiguration ​

Options that change how the GritQL linter behaves.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
enabled
booleanControls the linter for GritQL files.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls the linter for GritQL files.


HtmlAssistConfiguration ​

Options that change how HTML assist behaves.

Initializer ​

import { javascript } from 'projen'

const htmlAssistConfiguration: javascript.biome_config.HtmlAssistConfiguration = { ... }

Properties ​

NameTypeDescription
enabled
booleanControls assist actions for HTML and languages that extend it.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls assist actions for HTML and languages that extend it.


HtmlConfiguration ​

Options applied to HTML files.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
assist
projen.javascript.biome_config.HtmlAssistConfigurationHTML assist options.
experimentalFullSupportEnabled
booleanEnables full support for HTML, Vue, Svelte, and Astro files.
formatter
projen.javascript.biome_config.HtmlFormatterConfigurationHTML formatter options.
linter
projen.javascript.biome_config.HtmlLinterConfigurationHTML linter options.
parser
projen.javascript.biome_config.HtmlParserConfigurationHTML parsing options.

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

HTML assist options.


experimentalFullSupportEnabledOptional ​
public readonly experimentalFullSupportEnabled: boolean;
  • Type: boolean

Enables full support for HTML, Vue, Svelte, and Astro files.


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

HTML formatter options.


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

HTML linter options.


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

HTML parsing options.


HtmlFormatterConfiguration ​

Options that change 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 place the closing bracket of a multiline HTML tag at the end of the last line instead of on its own line.
enabled
booleanControls the formatter for HTML and languages that extend it.
indentScriptAndStyle
booleanWhether to indent <script> and <style> tags in HTML and languages that extend it.
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style applied to HTML and languages that extend it.
indentWidth
numberThe indentation width applied to HTML and languages that extend it.
lineEnding
projen.javascript.biome_config.LineEndingThe line ending applied to HTML and languages that extend it.
lineWidth
numberThe maximum line width for HTML and languages that extend it.
selfCloseVoidElements
projen.javascript.biome_config.SelfCloseVoidElementsControls whether void elements are self-closed.
trailingNewline
booleanWhether to add a trailing newline at the end of the file.
whitespaceSensitivity
projen.javascript.biome_config.WhitespaceSensitivityWhether to account for whitespace sensitivity when formatting HTML and languages that extend it.

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

The attribute position style in HTML elements.

If unset, inherits the global attribute position setting.


bracketSameLineOptional ​
public readonly bracketSameLine: boolean;
  • Type: boolean

Whether to place the closing bracket of a multiline HTML tag at the end of the last line instead of on its own line.

If unset, inherits the global bracketSameLine setting.


enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls the formatter for HTML and languages that extend it.


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

Whether to indent <script> and <style> tags in HTML and languages that extend it.

Defaults to false.


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

The indent style applied to HTML and languages that extend it.

If unset, inherits the global indentation style.


indentWidthOptional ​
public readonly indentWidth: number;
  • Type: number

The indentation width applied to HTML and languages that extend it.

If unset, inherits the global indentation width.


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

The line ending applied to HTML and languages that extend it.

If unset, inherits the global line ending.


lineWidthOptional ​
public readonly lineWidth: number;
  • Type: number

The maximum line width for HTML and languages that extend it.

If unset, inherits the global line width.


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

Controls whether void elements are self-closed.

Defaults to never.


trailingNewlineOptional ​
public readonly trailingNewline: boolean;
  • Type: boolean

Whether to add a trailing newline at the end of the file.

Unlike other language-specific trailing newline settings, this option defaults to true instead of inheriting the global setting.


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

Whether to account for whitespace sensitivity when formatting HTML and languages that extend it.

Defaults to css.


HtmlLinterConfiguration ​

Options that change how the HTML linter behaves.

Initializer ​

import { javascript } from 'projen'

const htmlLinterConfiguration: javascript.biome_config.HtmlLinterConfiguration = { ... }

Properties ​

NameTypeDescription
enabled
booleanControls the linter for HTML and languages that extend it.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls the linter for HTML and languages that extend it.


HtmlParserConfiguration ​

Options that change how the HTML parser behaves.

Initializer ​

import { javascript } from 'projen'

const htmlParserConfiguration: javascript.biome_config.HtmlParserConfiguration = { ... }

Properties ​

NameTypeDescription
interpolation
booleanEnables parsing double text expressions such as {{ expression }} inside .html files.
vue
booleanEnables parsing Vue syntax (v-if, v-bind, etc.) in .html files. Enabling this option also enables interpolation implicitly.

interpolationOptional ​
public readonly interpolation: boolean;
  • Type: boolean

Enables parsing double text expressions such as {{ expression }} inside .html files.


vueOptional ​
public readonly vue: boolean;
  • Type: boolean

Enables parsing Vue syntax (v-if, v-bind, etc.) in .html files. Enabling this option also enables interpolation implicitly.

Biome will already automatically enable Vue parsing in .vue files, so you probably don't need to enable this option. This only affects .html files, and does not change how .vue, .svelte, or .astro files are parsed.


JsAssistConfiguration ​

Assist options specific to the JavaScript assist.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
enabled
booleanControls assist actions for JavaScript and languages that extend it.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls assist actions for JavaScript and languages that extend it.


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.
experimentalEmbeddedSnippetsEnabled
booleanEnables support for embedding snippets.
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.
resolver
projen.javascript.biome_config.JsResolverConfigurationModule/dependency resolver options.

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

Assist options.


experimentalEmbeddedSnippetsEnabledOptional ​
public readonly experimentalEmbeddedSnippetsEnabled: boolean;
  • Type: boolean

Enables support for embedding snippets.


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.


resolverOptional ​
public readonly resolver: JsResolverConfiguration;
  • Type: projen.javascript.biome_config.JsResolverConfiguration

Module/dependency resolver 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 parentheses around arrow function parameters.
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 inside braces in object literals.
delimiterSpacing
booleanControls spaces immediately inside supported JavaScript and TypeScript delimiters when their content fits on one line.
enabled
booleanControls the formatter for JavaScript and languages that extend it.
expand
projen.javascript.biome_config.ExpandUses the same auto, always, and never behavior as the global expansion setting.
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style applied to JavaScript and languages that extend it.
indentWidth
numberThe indentation width applied to JavaScript and languages that extend it.
jsxQuoteStyle
projen.javascript.biome_config.QuoteStyleThe type of quotes used in JSX.
lineEnding
projen.javascript.biome_config.LineEndingThe line ending applied to JavaScript and languages that extend it.
lineWidth
numberThe maximum line width applied to JavaScript and languages that extend it.
operatorLinebreak
projen.javascript.biome_config.OperatorLinebreakWhen breaking binary expressions into multiple lines, whether to break them before or after the binary operator.
quoteProperties
projen.javascript.biome_config.QuotePropertiesControls when object properties are quoted.
quoteStyle
projen.javascript.biome_config.QuoteStyleThe type of quotes used in JavaScript code.
semicolons
projen.javascript.biome_config.SemicolonsPrints semicolons after every statement or only where needed to avoid automatic semicolon insertion hazards.
trailingCommas
projen.javascript.biome_config.JsTrailingCommasPrints trailing commas wherever possible in multiline comma-separated structures.
trailingNewline
booleanWhether to add a trailing newline at the end of the file.

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

Whether to add parentheses around arrow function parameters.

Defaults to always.


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

The attribute position style in JSX elements.

If unset, inherits the global attribute position setting.


bracketSameLineOptional ​
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.

If unset, inherits the global bracket placement setting.


bracketSpacingOptional ​
public readonly bracketSpacing: boolean;
  • Type: boolean

Whether to insert spaces inside braces in object literals.

If unset, inherits the global bracket spacing setting.


delimiterSpacingOptional ​
public readonly delimiterSpacing: boolean;
  • Type: boolean

Controls spaces immediately inside supported JavaScript and TypeScript delimiters when their content fits on one line.

It doesn't add spaces before opening delimiters or inside empty delimiters.

It affects parentheses, square brackets, template interpolations, TypeScript angle brackets, JSX expression braces, and logical NOT. In operator chains, only the final operator receives a following space.

If unset, inherits the global delimiter spacing setting.


enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls the formatter for JavaScript and languages that extend it.


expandOptional ​
public readonly expand: Expand;
  • Type: projen.javascript.biome_config.Expand

Uses the same auto, always, and never behavior as the global expansion setting.

If unset, inherits the global expansion setting.


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

The indent style applied to JavaScript and languages that extend it.

If unset, inherits the global indentation style.


indentWidthOptional ​
public readonly indentWidth: number;
  • Type: number

The indentation width applied to JavaScript and languages that extend it.

If unset, inherits the global indentation width.


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 line ending applied to JavaScript and languages that extend it.

If unset, inherits the global line ending.


lineWidthOptional ​
public readonly lineWidth: number;
  • Type: number

The maximum line width applied to JavaScript and languages that extend it.

If unset, inherits the global line width.


operatorLinebreakOptional ​
public readonly operatorLinebreak: OperatorLinebreak;
  • Type: projen.javascript.biome_config.OperatorLinebreak
  • Default: after`.

When breaking binary expressions into multiple lines, whether to break them before or after the binary operator.

Defaults to after.


quotePropertiesOptional ​
public readonly quoteProperties: QuoteProperties;
  • Type: projen.javascript.biome_config.QuoteProperties
  • Default: asNeeded` in configuration

Controls when object properties are quoted.

Defaults to asNeeded in configuration (as-needed on the CLI).


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
  • Default: always`.

Prints semicolons after every statement or only where needed to avoid automatic semicolon insertion hazards.

Defaults to always.


trailingCommasOptional ​
public readonly trailingCommas: JsTrailingCommas;
  • Type: projen.javascript.biome_config.JsTrailingCommas
  • Default: all`.

Prints trailing commas wherever possible in multiline comma-separated structures.

Defaults to all.


trailingNewlineOptional ​
public readonly trailingNewline: boolean;
  • Type: boolean

Whether to add a trailing newline at the end of the file.

If unset, inherits the global trailing newline setting.


JsLinterConfiguration ​

Linter options specific to the JavaScript linter.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
enabled
booleanControls the linter for JavaScript and languages that extend it.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls the linter for JavaScript and languages that extend it.


JsonAssistConfiguration ​

Assist options specific to the JSON linter.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
enabled
booleanControls assist actions for JSON and languages that extend it.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls assist actions for JSON and languages that extend it.


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 inside braces in object literals.
delimiterSpacing
booleanControls spaces inside JSON square brackets when their content fits on one line.
enabled
booleanControls the formatter for JSON and languages that extend it.
expand
projen.javascript.biome_config.ExpandUses the same auto, always, and never behavior as the global expansion setting.
indentStyle
projen.javascript.biome_config.IndentStyleThe indent style applied to JSON and languages that extend it.
indentWidth
numberThe indentation width applied to JSON and languages that extend it.
lineEnding
projen.javascript.biome_config.LineEndingThe line ending applied to JSON and languages that extend it.
lineWidth
numberThe maximum line width applied to JSON and languages that extend it.
trailingCommas
projen.javascript.biome_config.JsonTrailingCommasPrints trailing commas wherever possible in multiline comma-separated structures.
trailingNewline
booleanWhether to add a trailing newline at the end of the file.

bracketSpacingOptional ​
public readonly bracketSpacing: boolean;
  • Type: boolean

Whether to insert spaces inside braces in object literals.

If unset, inherits the global bracket spacing setting.


delimiterSpacingOptional ​
public readonly delimiterSpacing: boolean;
  • Type: boolean

Controls spaces inside JSON square brackets when their content fits on one line.

When enabled, [1, 2, 3] becomes [ 1, 2, 3 ]. Empty brackets are unchanged.

If unset, inherits the global delimiter spacing setting.


enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls the formatter for JSON and languages that extend it.


expandOptional ​
public readonly expand: Expand;
  • Type: projen.javascript.biome_config.Expand

Uses the same auto, always, and never behavior as the global expansion setting.

If unset, inherits the global expansion setting.

When formatting package.json, Biome uses always unless configured otherwise.


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

The indent style applied to JSON and languages that extend it.

If unset, inherits the global indentation style.


indentWidthOptional ​
public readonly indentWidth: number;
  • Type: number

The indentation width applied to JSON and languages that extend it.

If unset, inherits the global indentation width.


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

The line ending applied to JSON and languages that extend it.

If unset, inherits the global line ending.


lineWidthOptional ​
public readonly lineWidth: number;
  • Type: number

The maximum line width applied to JSON and languages that extend it.

If unset, inherits the global line width.


trailingCommasOptional ​
public readonly trailingCommas: JsonTrailingCommas;
  • Type: projen.javascript.biome_config.JsonTrailingCommas
  • Default: none`.

Prints trailing commas wherever possible in multiline comma-separated structures.

Defaults to none.


trailingNewlineOptional ​
public readonly trailingNewline: boolean;
  • Type: boolean

Whether to add a trailing newline at the end of the file.

If unset, inherits the global trailing newline setting.


JsonLinterConfiguration ​

Linter options specific to the JSON linter.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
enabled
booleanControls the linter for JSON and languages that extend it.

enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Controls the linter for JSON and languages that extend it.


JsonParserConfiguration ​

Options that change how the JSON parser behaves.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

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

allowCommentsOptional ​
public readonly allowComments: boolean;
  • Type: boolean

Allows parsing comments in .json files.


allowTrailingCommasOptional ​
public readonly allowTrailingCommas: boolean;
  • Type: boolean

Allows parsing trailing commas in .json files.


JsParserConfiguration ​

Options that change 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 such as .js, .mjs, and .cjs may contain JSX syntax. Defaults to true.
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 such as .js, .mjs, and .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.


JsResolverConfiguration ​

Resolver options specific to JavaScript files.

Initializer ​

import { javascript } from 'projen'

const jsResolverConfiguration: javascript.biome_config.JsResolverConfiguration = { ... }

Properties ​

NameTypeDescription
experimentalPnpmCatalogs
booleanEnables pnpm workspace catalog resolution for JavaScript package manifests.

experimentalPnpmCatalogsOptional ​
public readonly experimentalPnpmCatalogs: boolean;
  • Type: boolean
  • Default: false`.

Enables pnpm workspace catalog resolution for JavaScript package manifests.

Opt-in:

  • Set javascript.resolver.experimentalPnpmCatalogs to true.

Scope:

  • Resolves catalog: and catalog:<name> dependency versions from package.json.
  • Applies to dependencies, devDependencies, and peerDependencies.

Fail-safe behavior:

  • If pnpm-workspace.yaml is missing, unreadable, or cannot be parsed, Biome silently falls back to the default behavior (as if this option were disabled).
  • Unknown keys and unsupported value shapes in pnpm-workspace.yaml are ignored.

Limitations:

  • Only pnpm-workspace.yaml is read.
  • Biome only reads top-level catalog / catalogs mappings and scalar string entries.

Defaults to false.


LinterConfiguration ​

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
domains
projen.javascript.biome_config.RuleDomainsAn 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: RuleDomains;
  • Type: projen.javascript.biome_config.RuleDomains

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.
delimiterSpacing
booleanControls spaces immediately inside supported delimiters when their content fits on one line.
enabled
booleanNo description.
expand
projen.javascript.biome_config.ExpandControls whether arrays and objects are formatted on one line or 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.
trailingCommas
projen.javascript.biome_config.JsTrailingCommasPrint trailing commas wherever possible in multi-line comma-separated syntactic structures.
trailingNewline
booleanWhether to add a trailing newline at the end of the file.

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.


delimiterSpacingOptional ​
public readonly delimiterSpacing: boolean;
  • Type: boolean

Controls spaces immediately inside supported delimiters when their content fits on one line.

It doesn't add spaces before opening delimiters or inside empty delimiters.

The affected delimiters vary by language. If unset, uses the configured formatter setting.


enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

expandOptional ​
public readonly expand: Expand;
  • Type: projen.javascript.biome_config.Expand

Controls whether arrays and objects are formatted on one line or multiple lines.

auto formats objects on multiple lines if the first property has a newline, and arrays on one line if they fit.

always formats arrays and objects on multiple lines.

never formats arrays and objects on one line if they fit.

If unset, uses the configured formatter setting.

When formatting package.json, Biome uses always unless configured otherwise.


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.


trailingCommasOptional ​
public readonly trailingCommas: JsTrailingCommas;
  • Type: projen.javascript.biome_config.JsTrailingCommas

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


trailingNewlineOptional ​
public readonly trailingNewline: boolean;
  • Type: boolean
  • Default: true.

Whether to add a trailing newline at the end of the file.

Setting this option to false is highly discouraged because it could cause many problems with other tools:

Disable the option at your own risk.

Defaults to true.


OverrideLinterConfiguration ​

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
domains
projen.javascript.biome_config.RuleDomainsList 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: RuleDomains;
  • Type: projen.javascript.biome_config.RuleDomains

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
any[]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: any[];
  • Type: any[]

Specific configuration for additional plugins.


RuleDomains ​

Initializer ​

import { javascript } from 'projen'

const ruleDomains: javascript.biome_config.RuleDomains = { ... }

Properties ​

NameTypeDescription
astro
projen.javascript.biome_config.RuleDomainValueNo description.
drizzle
projen.javascript.biome_config.RuleDomainValueNo description.
next
projen.javascript.biome_config.RuleDomainValueNo description.
playwright
projen.javascript.biome_config.RuleDomainValueNo description.
project
projen.javascript.biome_config.RuleDomainValueNo description.
qwik
projen.javascript.biome_config.RuleDomainValueNo description.
react
projen.javascript.biome_config.RuleDomainValueNo description.
reactNative
projen.javascript.biome_config.RuleDomainValueNo description.
solid
projen.javascript.biome_config.RuleDomainValueNo description.
svelte
projen.javascript.biome_config.RuleDomainValueNo description.
tailwind
projen.javascript.biome_config.RuleDomainValueNo description.
test
projen.javascript.biome_config.RuleDomainValueNo description.
turborepo
projen.javascript.biome_config.RuleDomainValueNo description.
types
projen.javascript.biome_config.RuleDomainValueNo description.
vue
projen.javascript.biome_config.RuleDomainValueNo description.

astroOptional ​
public readonly astro: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

drizzleOptional ​
public readonly drizzle: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

nextOptional ​
public readonly next: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

playwrightOptional ​
public readonly playwright: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

projectOptional ​
public readonly project: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

qwikOptional ​
public readonly qwik: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

reactOptional ​
public readonly react: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

reactNativeOptional ​
public readonly reactNative: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

solidOptional ​
public readonly solid: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

svelteOptional ​
public readonly svelte: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

tailwindOptional ​
public readonly tailwind: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

testOptional ​
public readonly test: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

turborepoOptional ​
public readonly turborepo: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

typesOptional ​
public readonly types: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

vueOptional ​
public readonly vue: RuleDomainValue;
  • Type: projen.javascript.biome_config.RuleDomainValue

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.
preset
projen.javascript.biome_config.PresetConfigThe rule presets to use.
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

presetOptional ​
public readonly preset: PresetConfig;
  • Type: projen.javascript.biome_config.PresetConfig

The rule presets to use.


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
noDuplicateClasses
anyRemove duplicate CSS classes.
organizeImports
anySorts imports and exports in your JavaScript and TypeScript files.
preset
projen.javascript.biome_config.PresetConfigEnables a particular rule preset.
recommended
booleanEnables the recommended rules for this group.
useSortedAttributes
anyEnforce attribute sorting in HTML elements.
useSortedEnumMembers
anySort the members of an enum in natural order.
useSortedInterfaceMembers
anySort interface members by key.
useSortedKeys
anySort the keys of a JSON object in natural order.
useSortedPackageJson
anyOrganize package.json fields according to established conventions. See https://biomejs.dev/assist/actions/use-sorted-package-json.
useSortedProperties
anyEnforce ordering of CSS properties and nested rules.
useSortedSelectionSet
anySort GraphQL selection sets.
useSortedTypeFields
anySort fields in GraphQL type definitions alphabetically.

noDuplicateClassesOptional ​
public readonly noDuplicateClasses: any;
  • Type: any

Remove duplicate CSS classes.

See https://biomejs.dev/assist/actions/no-duplicate-classes


organizeImportsOptional ​
public readonly organizeImports: any;
  • Type: any

Sorts imports and exports in your JavaScript and TypeScript files.

See https://biomejs.dev/assist/actions/organize-imports


presetOptional ​
public readonly preset: PresetConfig;
  • Type: projen.javascript.biome_config.PresetConfig

Enables a particular rule preset.


recommendedOptional ​
public readonly recommended: boolean;
  • Type: boolean

Enables the recommended rules for this group.


useSortedAttributesOptional ​
public readonly useSortedAttributes: any;
  • Type: any

Enforce attribute sorting in HTML elements.

See https://biomejs.dev/assist/actions/use-sorted-attributes


useSortedEnumMembersOptional ​
public readonly useSortedEnumMembers: any;
  • Type: any

Sort the members of an enum in natural order.

See https://biomejs.dev/assist/actions/use-sorted-enum-members


useSortedInterfaceMembersOptional ​
public readonly useSortedInterfaceMembers: any;
  • Type: any

Sort interface members by key.

See https://biomejs.dev/assist/actions/use-sorted-interface-members


useSortedKeysOptional ​
public readonly useSortedKeys: any;
  • Type: any

Sort the keys of a JSON object in natural order.

See https://biomejs.dev/assist/actions/use-sorted-keys


useSortedPackageJsonOptional ​
public readonly useSortedPackageJson: any;
  • Type: any

Organize package.json fields according to established conventions. See https://biomejs.dev/assist/actions/use-sorted-package-json.


useSortedPropertiesOptional ​
public readonly useSortedProperties: any;
  • Type: any

Enforce ordering of CSS properties and nested rules.

See https://biomejs.dev/assist/actions/use-sorted-properties


useSortedSelectionSetOptional ​
public readonly useSortedSelectionSet: any;
  • Type: any

Sort GraphQL selection sets.

See https://biomejs.dev/assist/actions/use-sorted-selection-set


useSortedTypeFieldsOptional ​
public readonly useSortedTypeFields: any;
  • Type: any

Sort fields in GraphQL type definitions alphabetically.

See https://biomejs.dev/assist/actions/use-sorted-type-fields


VcsConfiguration ​

Settings for integrating Biome with version control.

Initializer ​

import { javascript } from 'projen'

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

Properties ​

NameTypeDescription
clientKind
projen.javascript.biome_config.VcsClientKindThe version control client.
defaultBranch
stringThe project's default branch.
enabled
booleanWhether Biome should integrate with the version control client.
root
stringSets the directory where Biome checks for version control files.
useIgnoreFile
booleanWhen true, Biome ignores files listed in .gitignore, .ignore, and Git's local exclude file.

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

The version control client.


defaultBranchOptional ​
public readonly defaultBranch: string;
  • Type: string

The project's default branch.


enabledOptional ​
public readonly enabled: boolean;
  • Type: boolean

Whether Biome should integrate with the version control client.


rootOptional ​
public readonly root: string;
  • Type: string
  • Default: the directory containing biome.json or biome.jsonc. If no configuration is

Sets the directory where Biome checks for version control files.

Defaults to the directory containing biome.json or biome.jsonc. If no configuration is found, Biome uses the current working directory.

If neither directory is available, Biome disables version control integration and emits a diagnostic.


useIgnoreFileOptional ​
public readonly useIgnoreFile: boolean;
  • Type: boolean

When true, Biome ignores files listed in .gitignore, .ignore, and Git's local exclude 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
Objects are expanded when the first property has a leading newline.
ALWAYS
Objects and arrays are always expanded.
NEVER
Objects and arrays remain on one line if they fit.

AUTO ​

Objects are expanded when the first property has a leading newline.

Arrays remain on one line if they fit. (auto)


ALWAYS ​

Objects and arrays are always expanded.

(always)


NEVER ​

Objects and arrays remain on one line if they fit.

(never)


IndentStyle ​

Members ​

NameDescription
TAB
Indent with Tab (tab).
SPACE
Indent with Space (space).

TAB ​

Indent with Tab (tab).


SPACE ​

Indent with Space (space).


JsonTrailingCommas ​

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

Members ​

NameDescription
NONE
none.
ALL
all.

NONE ​

none.


ALL ​

all.


JsTrailingCommas ​

Print trailing commas wherever possible in multi-line comma-separated syntactic structures for JavaScript/TypeScript files.

Members ​

NameDescription
ALL
all.
ES5
es5.
NONE
none.

ALL ​

all.


ES5 ​

es5.


NONE ​

none.


JsxRuntime ​

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

Members ​

NameDescription
TRANSPARENT
Indicates a modern or native JSX environment, that doesn't require special handling by Biome.
REACT_CLASSIC
Indicates a classic React environment that requires the React import.

TRANSPARENT ​

Indicates a modern or native JSX environment, that doesn't require special handling by Biome.

(transparent)


REACT_CLASSIC ​

Indicates a classic React environment that requires the React import.

Corresponds to the react value for the jsx option in TypeScript's tsconfig.json.

This option should only be necessary if you cannot upgrade to a React version that supports the new JSX runtime. For more information about the old vs. new JSX runtime, please see: https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html (reactClassic)


LineEnding ​

Members ​

NameDescription
LF
Line Feed only (\n), common on Linux and macOS as well as inside git repos (lf).
CRLF
Carriage Return + Line Feed characters (\r\n), common on Windows (crlf).
CR
Carriage Return character only (\r), used very rarely (cr).
AUTO
Automatically use CRLF on Windows and LF on other platforms (auto).

LF ​

Line Feed only (\n), common on Linux and macOS as well as inside git repos (lf).


CRLF ​

Carriage Return + Line Feed characters (\r\n), common on Windows (crlf).


CR ​

Carriage Return character only (\r), used very rarely (cr).


AUTO ​

Automatically use CRLF on Windows and LF on other platforms (auto).


OperatorLinebreak ​

Members ​

NameDescription
AFTER
The operator is placed after the expression (after).
BEFORE
The operator is placed before the expression (before).

AFTER ​

The operator is placed after the expression (after).


BEFORE ​

The operator is placed before the expression (before).


PresetConfig ​

A preset configuration for enabling a set of rules.

Members ​

NameDescription
RECOMMENDED
recommended.
ALL
all.
NONE
none.

recommended.


ALL ​

all.


NONE ​

none.


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
Enables all the rules that belong to this domain (all).
NONE
Disables all the rules that belong to this domain (none).
RECOMMENDED
Enables only the recommended rules for this domain (recommended).

ALL ​

Enables all the rules that belong to this domain (all).


NONE ​

Disables all the rules that belong to this domain (none).


Enables only the recommended rules for this domain (recommended).


SelfCloseVoidElements ​

Controls whether void-elements should be self closed.

Members ​

NameDescription
NEVER
The / inside void elements is removed by the formatter (never).
ALWAYS
The / inside void elements is always added (always).

NEVER ​

The / inside void elements is removed by the formatter (never).


ALWAYS ​

The / inside void elements is always added (always).


Semicolons ​

Members ​

NameDescription
ALWAYS
always.
AS_NEEDED
asNeeded.

ALWAYS ​

always.


AS_NEEDED ​

asNeeded.


VcsClientKind ​

Integration with Git as the version control client.

Members ​

NameDescription
GIT
git.

GIT ​

git.


WhitespaceSensitivity ​

Whitespace sensitivity for HTML formatting.

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

htmloutput
with spaces1<b> 2 </b>31 2 3
without spaces1<b>2</b>3123

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):

<span>really long content</span>

as this, where the content hugs the tags:

<span
>really long content</span
>

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

Members ​

NameDescription
CSS
The formatter considers whitespace significant for elements that have an "inline" display style by default in browser's user agent style sheets.
STRICT
Leading and trailing whitespace in content is considered significant for all elements.
IGNORE
Whitespace is considered insignificant.

CSS ​

The formatter considers whitespace significant for elements that have an "inline" display style by default in browser's user agent style sheets.

(css)


STRICT ​

Leading and trailing whitespace in content is considered significant for all elements.

The formatter should leave at least one whitespace character if whitespace is present. Otherwise, if there is no whitespace, it should not add any after > or before <. In other words, if there's no whitespace, the text content should hug the tags.

Example of text hugging the tags:

<b
>content</b
>
``` (strict)

---


##### `IGNORE` <a name="IGNORE" id="projen.javascript.biome_config.WhitespaceSensitivity.IGNORE"></a>

Whitespace is considered insignificant.

The formatter is free to remove or add whitespace as it sees fit. (ignore)

---