javascript.biome_config Submodule
Structs
Actions
Initializer
import { javascript } from 'projen'
const actions: javascript.biome_config.Actions = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.PresetConfig | The actions preset to use. |
| boolean | It enables the assist actions recommended by Biome. |
| projen.javascript.biome_config.Source | No 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.Actions | Whether Biome should fail in CLI if the assist were not applied to the code. |
| boolean | Whether Biome should enable assist via LSP and CLI. |
| 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.AssistConfiguration | The assist configuration. |
| projen.javascript.biome_config.CssConfiguration | Configuration specific to CSS. |
| string[] | A list of paths to other JSON files, used to extend the current configuration. |
| projen.javascript.biome_config.FilesConfiguration | The file handling configuration. |
| projen.javascript.biome_config.FormatterConfiguration | The formatter configuration. |
| projen.javascript.biome_config.GraphqlConfiguration | Configuration specific to GraphQL. |
| projen.javascript.biome_config.GritConfiguration | Configuration specific to GritQL. |
| projen.javascript.biome_config.HtmlConfiguration | Configuration specific to HTML. |
| projen.javascript.biome_config.JsConfiguration | Configuration specific to JavaScript. |
| projen.javascript.biome_config.JsonConfiguration | Configuration specific to JSON. |
| projen.javascript.biome_config.LinterConfiguration | The linter configuration. |
| projen.javascript.biome_config.OverridePattern[] | A list of granular patterns applied only to a subset of files. |
| any[] | List of plugins to load. |
| boolean | Indicates whether this configuration file is at the root of a Biome project. |
| string | A field for the JSON schema specification: https://json-schema.org/. |
| projen.javascript.biome_config.VcsConfiguration | The 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.CssAssistConfiguration | CSS assist options. |
| projen.javascript.biome_config.CssFormatterConfiguration | CSS formatter options. |
| string[] | CSS globals. |
| projen.javascript.biome_config.CssLinterConfiguration | CSS linter options. |
| projen.javascript.biome_config.CssParserConfiguration | CSS 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls spaces inside CSS parentheses and square brackets when their content fits on one line. |
| boolean | Controls the formatter for CSS and languages that extend it. |
| projen.javascript.biome_config.IndentStyle | The indent style applied to CSS and languages that extend it. |
| number | The indentation width applied to CSS and languages that extend it. |
| projen.javascript.biome_config.LineEnding | The line ending applied to CSS and languages that extend it. |
| number | The maximum line width for CSS and languages that extend it. |
| projen.javascript.biome_config.QuoteStyle | The type of quotes used in CSS code. |
| boolean | Whether 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls 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
| Name | Type | Description |
|---|---|---|
| boolean | Allows comments to appear on incorrect lines in .css files. |
| boolean | Enables parsing of CSS Modules-specific features. |
| boolean | Enables 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
| Name | Type | Description |
|---|---|---|
| string[] | Deprecated: Please use force-ignore syntax in files.includes instead: https://biomejs.dev/reference/configuration/#filesincludes. |
| boolean | Prevents Biome from emitting diagnostics for unrecognized file types. |
| string[] | A list of glob patterns. |
| number | The 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.AttributePosition | The attribute position style in HTML-like languages. |
| boolean | Places the > of a multiline HTML or JSX element at the end of the last line instead of on the next line. |
| boolean | Whether to insert spaces inside braces in object literals. |
| boolean | Controls spaces immediately inside supported delimiters when their content fits on one line. |
| boolean | No description. |
| projen.javascript.biome_config.Expand | Controls whether arrays and objects are formatted on one line or multiple lines. |
| boolean | Allows formatting files that contain syntax errors when set to true. |
| string[] | A list of glob patterns. |
| projen.javascript.biome_config.IndentStyle | Uses tabs or spaces for indentation. |
| number | The indentation width. |
| projen.javascript.biome_config.LineEnding | Selects the line ending. |
| number | The maximum line width. |
| boolean | Whether to add a trailing newline at the end of the file. |
| boolean | Uses .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
| Name | Type | Description |
|---|---|---|
| boolean | Controls 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.GraphqlAssistConfiguration | GraphQL assist options. |
| projen.javascript.biome_config.GraphqlFormatterConfiguration | GraphQL formatter options. |
| projen.javascript.biome_config.GraphqlLinterConfiguration | GraphQL 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
| Name | Type | Description |
|---|---|---|
| boolean | Whether to insert spaces inside braces in object literals. |
| boolean | Controls the formatter for GraphQL files. |
| projen.javascript.biome_config.IndentStyle | The indent style applied to GraphQL files. |
| number | The indentation width applied to GraphQL files. |
| projen.javascript.biome_config.LineEnding | The line ending applied to GraphQL files. |
| number | The maximum line width for GraphQL files. |
| projen.javascript.biome_config.QuoteStyle | The type of quotes used in GraphQL code. |
| boolean | Whether 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.GritAssistConfiguration | GritQL assist options. |
| projen.javascript.biome_config.GritFormatterConfiguration | GritQL formatter options. |
| projen.javascript.biome_config.GritLinterConfiguration | GritQL 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls the formatter for GritQL files. |
| projen.javascript.biome_config.IndentStyle | The indent style applied to GritQL files. |
| number | The indentation width applied to GritQL files. |
| projen.javascript.biome_config.LineEnding | The line ending applied to GritQL files. |
| number | The maximum line width for GritQL files. |
| boolean | Whether 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.HtmlAssistConfiguration | HTML assist options. |
| boolean | Enables full support for HTML, Vue, Svelte, and Astro files. |
| projen.javascript.biome_config.HtmlFormatterConfiguration | HTML formatter options. |
| projen.javascript.biome_config.HtmlLinterConfiguration | HTML linter options. |
| projen.javascript.biome_config.HtmlParserConfiguration | HTML 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.AttributePosition | The attribute position style in HTML elements. |
| 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. |
| boolean | Controls the formatter for HTML and languages that extend it. |
| boolean | Whether to indent <script> and <style> tags in HTML and languages that extend it. |
| projen.javascript.biome_config.IndentStyle | The indent style applied to HTML and languages that extend it. |
| number | The indentation width applied to HTML and languages that extend it. |
| projen.javascript.biome_config.LineEnding | The line ending applied to HTML and languages that extend it. |
| number | The maximum line width for HTML and languages that extend it. |
| projen.javascript.biome_config.SelfCloseVoidElements | Controls whether void elements are self-closed. |
| boolean | Whether to add a trailing newline at the end of the file. |
| projen.javascript.biome_config.WhitespaceSensitivity | Whether 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls 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
| Name | Type | Description |
|---|---|---|
| boolean | Enables parsing double text expressions such as {{ expression }} inside .html files. |
| boolean | Enables 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.JsAssistConfiguration | Assist options. |
| boolean | Enables support for embedding snippets. |
| projen.javascript.biome_config.JsFormatterConfiguration | Formatting options. |
| string[] | A list of global bindings that should be ignored by the analyzers. |
| projen.javascript.biome_config.JsxRuntime | Indicates the type of runtime or transformation used for interpreting JSX. |
| projen.javascript.biome_config.JsLinterConfiguration | Linter options. |
| projen.javascript.biome_config.JsParserConfiguration | Parsing options. |
| projen.javascript.biome_config.JsResolverConfiguration | Module/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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.ArrowParentheses | Whether to add parentheses around arrow function parameters. |
| projen.javascript.biome_config.AttributePosition | The attribute position style in JSX elements. |
| boolean | Whether to hug the closing bracket of multiline HTML/JSX tags to the end of the last line, rather than being alone on the following line. |
| boolean | Whether to insert spaces inside braces in object literals. |
| boolean | Controls spaces immediately inside supported JavaScript and TypeScript delimiters when their content fits on one line. |
| boolean | Controls the formatter for JavaScript and languages that extend it. |
| projen.javascript.biome_config.Expand | Uses the same auto, always, and never behavior as the global expansion setting. |
| projen.javascript.biome_config.IndentStyle | The indent style applied to JavaScript and languages that extend it. |
| number | The indentation width applied to JavaScript and languages that extend it. |
| projen.javascript.biome_config.QuoteStyle | The type of quotes used in JSX. |
| projen.javascript.biome_config.LineEnding | The line ending applied to JavaScript and languages that extend it. |
| number | The maximum line width applied to JavaScript and languages that extend it. |
| projen.javascript.biome_config.OperatorLinebreak | When breaking binary expressions into multiple lines, whether to break them before or after the binary operator. |
| projen.javascript.biome_config.QuoteProperties | Controls when object properties are quoted. |
| projen.javascript.biome_config.QuoteStyle | The type of quotes used in JavaScript code. |
| projen.javascript.biome_config.Semicolons | Prints semicolons after every statement or only where needed to avoid automatic semicolon insertion hazards. |
| projen.javascript.biome_config.JsTrailingCommas | Prints trailing commas wherever possible in multiline comma-separated structures. |
| boolean | Whether 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.JsonAssistConfiguration | Assist options. |
| projen.javascript.biome_config.JsonFormatterConfiguration | Formatting options. |
| projen.javascript.biome_config.JsonLinterConfiguration | Linting options. |
| projen.javascript.biome_config.JsonParserConfiguration | Parsing 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
| Name | Type | Description |
|---|---|---|
| boolean | Whether to insert spaces inside braces in object literals. |
| boolean | Controls spaces inside JSON square brackets when their content fits on one line. |
| boolean | Controls the formatter for JSON and languages that extend it. |
| projen.javascript.biome_config.Expand | Uses the same auto, always, and never behavior as the global expansion setting. |
| projen.javascript.biome_config.IndentStyle | The indent style applied to JSON and languages that extend it. |
| number | The indentation width applied to JSON and languages that extend it. |
| projen.javascript.biome_config.LineEnding | The line ending applied to JSON and languages that extend it. |
| number | The maximum line width applied to JSON and languages that extend it. |
| projen.javascript.biome_config.JsonTrailingCommas | Prints trailing commas wherever possible in multiline comma-separated structures. |
| boolean | Whether 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
| Name | Type | Description |
|---|---|---|
| boolean | Controls 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
| Name | Type | Description |
|---|---|---|
| boolean | Allows parsing comments in .json files. |
| boolean | Allows 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
| Name | Type | Description |
|---|---|---|
| boolean | Enables parsing of Grit metavariables. |
| boolean | When enabled, files such as .js, .mjs, and .cjs may contain JSX syntax. Defaults to true. |
| boolean | It 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
| Name | Type | Description |
|---|---|---|
| boolean | Enables 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.experimentalPnpmCatalogstotrue.
Scope:
- Resolves
catalog:andcatalog:<name>dependency versions frompackage.json. - Applies to
dependencies,devDependencies, andpeerDependencies.
Fail-safe behavior:
- If
pnpm-workspace.yamlis 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.yamlare ignored.
Limitations:
- Only
pnpm-workspace.yamlis read. - Biome only reads top-level
catalog/catalogsmappings and scalar string entries.
Defaults to false.
LinterConfiguration
Initializer
import { javascript } from 'projen'
const linterConfiguration: javascript.biome_config.LinterConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| {[ 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. |
| boolean | if false, it disables the feature and the linter won't be executed. |
| string[] | A list of glob patterns. |
| projen.javascript.biome_config.Rules | List 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.Actions | List of actions. |
| boolean | if 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
| Name | Type | Description |
|---|---|---|
| number | File 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.AttributePosition | The attribute position style. |
| 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). |
| boolean | Whether to insert spaces around brackets in object literals. |
| boolean | Controls spaces immediately inside supported delimiters when their content fits on one line. |
| boolean | No description. |
| projen.javascript.biome_config.Expand | Controls whether arrays and objects are formatted on one line or multiple lines. |
| boolean | Stores whether formatting should be allowed to proceed if a given file has syntax errors. |
| number | The size of the indentation, 2 by default (deprecated, use indent-width). |
| projen.javascript.biome_config.IndentStyle | The indent style. |
| number | The size of the indentation, 2 by default. |
| projen.javascript.biome_config.LineEnding | The type of line ending. |
| number | What's the max width of a line. |
| projen.javascript.biome_config.JsTrailingCommas | Print trailing commas wherever possible in multi-line comma-separated syntactic structures. |
| boolean | Whether 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:
- https://thoughtbot.com/blog/no-newline-at-end-of-file
- https://callmeryan.medium.com/no-newline-at-end-of-file-navigating-gits-warning-for-android-developers-af14e73dd804
- https://unix.stackexchange.com/questions/345548/how-to-cat-files-together-adding-missing-newlines-at-end-of-some-files
Disable the option at your own risk.
Defaults to true.
OverrideLinterConfiguration
Initializer
import { javascript } from 'projen'
const overrideLinterConfiguration: javascript.biome_config.OverrideLinterConfiguration = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| {[ key: string ]: projen.javascript.biome_config.RuleDomainValue} | List of rules. |
| boolean | if false, it disables the feature and the linter won't be executed. |
| projen.javascript.biome_config.Rules | List 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.OverrideAssistConfiguration | Specific configuration for the Json language. |
| projen.javascript.biome_config.CssConfiguration | Specific configuration for the CSS language. |
| projen.javascript.biome_config.OverrideFilesConfiguration | Specific configuration for the filesystem. |
| projen.javascript.biome_config.OverrideFormatterConfiguration | Specific configuration for the Json language. |
| projen.javascript.biome_config.GraphqlConfiguration | Specific configuration for the Graphql language. |
| projen.javascript.biome_config.GritConfiguration | Specific configuration for the GritQL language. |
| projen.javascript.biome_config.HtmlConfiguration | Specific configuration for the GritQL language. |
| string[] | A list of glob patterns. |
| projen.javascript.biome_config.JsConfiguration | Specific configuration for the JavaScript language. |
| projen.javascript.biome_config.JsonConfiguration | Specific configuration for the Json language. |
| projen.javascript.biome_config.OverrideLinterConfiguration | Specific configuration for the Json language. |
| 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.
Rules
Initializer
import { javascript } from 'projen'
const rules: javascript.biome_config.Rules = { ... }
Properties
| Name | Type | Description |
|---|---|---|
| any | No description. |
| any | No description. |
| any | No description. |
| any | No description. |
| any | No description. |
| projen.javascript.biome_config.PresetConfig | The rule presets to use. |
| boolean | It enables the lint rules recommended by Biome. |
| any | No description. |
| any | No description. |
| any | No 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
| Name | Type | Description |
|---|---|---|
| any | Remove duplicate CSS classes. |
| any | Sorts imports and exports in your JavaScript and TypeScript files. |
| projen.javascript.biome_config.PresetConfig | Enables a particular rule preset. |
| boolean | Enables the recommended rules for this group. |
| any | Enforce attribute sorting in HTML elements. |
| any | Sort the members of an enum in natural order. |
| any | Sort interface members by key. |
| any | Sort the keys of a JSON object in natural order. |
| any | Organize package.json fields according to established conventions. See https://biomejs.dev/assist/actions/use-sorted-package-json. |
| any | Enforce ordering of CSS properties and nested rules. |
| any | Sort GraphQL selection sets. |
| any | Sort 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
| Name | Type | Description |
|---|---|---|
| projen.javascript.biome_config.VcsClientKind | The version control client. |
| string | The project's default branch. |
| boolean | Whether Biome should integrate with the version control client. |
| string | Sets the directory where Biome checks for version control files. |
| boolean | When 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.jsonorbiome.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
| Name | Description |
|---|---|
| always. |
| asNeeded. |
ALWAYS
always.
AS_NEEDED
asNeeded.
AttributePosition
Members
| Name | Description |
|---|---|
| auto. |
| multiline. |
AUTO
auto.
MULTILINE
multiline.
Expand
Members
| Name | Description |
|---|---|
| Objects are expanded when the first property has a leading newline. |
| Objects and arrays are always expanded. |
| 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
| Name | Description |
|---|---|
| Indent with Tab (tab). |
| 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
| Name | Description |
|---|---|
| none. |
| all. |
NONE
none.
ALL
all.
JsTrailingCommas
Print trailing commas wherever possible in multi-line comma-separated syntactic structures for JavaScript/TypeScript files.
Members
| Name | Description |
|---|---|
| all. |
| es5. |
| none. |
ALL
all.
ES5
es5.
NONE
none.
JsxRuntime
Indicates the type of runtime or transformation used for interpreting JSX.
Members
| Name | Description |
|---|---|
| Indicates a modern or native JSX environment, that doesn't require special handling by Biome. |
| 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
| Name | Description |
|---|---|
| Line Feed only (\n), common on Linux and macOS as well as inside git repos (lf). |
| Carriage Return + Line Feed characters (\r\n), common on Windows (crlf). |
| Carriage Return character only (\r), used very rarely (cr). |
| 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
| Name | Description |
|---|---|
| The operator is placed after the expression (after). |
| 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
| Name | Description |
|---|---|
| recommended. |
| all. |
| none. |
RECOMMENDED
recommended.
ALL
all.
NONE
none.
QuoteProperties
Members
| Name | Description |
|---|---|
| asNeeded. |
| preserve. |
AS_NEEDED
asNeeded.
PRESERVE
preserve.
QuoteStyle
Members
| Name | Description |
|---|---|
| double. |
| single. |
DOUBLE
double.
SINGLE
single.
RuleDomainValue
Members
| Name | Description |
|---|---|
| Enables all the rules that belong to this domain (all). |
| Disables all the rules that belong to this domain (none). |
| 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).
RECOMMENDED
Enables only the recommended rules for this domain (recommended).
SelfCloseVoidElements
Controls whether void-elements should be self closed.
Members
| Name | Description |
|---|---|
| The / inside void elements is removed by the formatter (never). |
| 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
| Name | Description |
|---|---|
| always. |
| asNeeded. |
ALWAYS
always.
AS_NEEDED
asNeeded.
VcsClientKind
Integration with Git as the version control client.
Members
| Name | Description |
|---|---|
| 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):
<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
| Name | Description |
|---|---|
| The formatter considers whitespace significant for elements that have an "inline" display style by default in browser's user agent style sheets. |
| Leading and trailing whitespace in content is considered significant for all elements. |
| 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)
---