Back to Biomejs

Domains

src/content/docs/linter/domains.mdx

latest17.6 KB
Original Source

Next

Use this domain inside Next.js projects.

Next activation

Enable the recommended, non-nursery rules of the domain:

json
{
	"linter": {
		"domains": {
			"next": "recommended"
		}
	}
}

Enabled the all rules of the domain:

json
{
	"linter": {
		"domains": {
			"next": "all"
		}
	}
}

Disable all rules of the domain:

json
{
	"linter": {
		"domains": {
			"next": "none"
		}
	}
}

Next dependencies

Enabled when the following dependencies are declared:

  • next: >=14.0.0

Next rules

Rules that belong to the domain:

Playwright

Use this domain inside Playwright test projects. This domain enables rules that help enforce best practices and catch common mistakes when writing Playwright tests.

Playwright activation

Enable the recommended, non-nursery rules of the domain:

json
{
	"linter": {
		"domains": {
			"playwright": "recommended"
		}
	}
}

:::note[No recommended rules] Since all rules in this domain are nursery rules, no rules will be activated when enabling the domain. You need to enable the single rules. ::: Enabled the all rules of the domain:

json
{
	"linter": {
		"domains": {
			"playwright": "all"
		}
	}
}

Disable all rules of the domain:

json
{
	"linter": {
		"domains": {
			"playwright": "none"
		}
	}
}

Playwright dependencies

Enabled when the following dependencies are declared:

  • @playwright/test: >=1.0.0

Playwright globals

When enabled, the following global bindings are recognised by Biome:

  • test
  • expect

Playwright rules

Rules that belong to the domain:

Project

This domain contains rules that perform project-level analysis. This includes our module graph for dependency resolution. When enabling rules that belong to this domain, Biome will scan the entire project. The scanning phase will have a performance impact on the linting process. See the documentation on our scanner to learn more about the scanner.

Project activation

Enable the recommended, non-nursery rules of the domain:

json
{
	"linter": {
		"domains": {
			"project": "recommended"
		}
	}
}

Enabled the all rules of the domain:

json
{
	"linter": {
		"domains": {
			"project": "all"
		}
	}
}

Disable all rules of the domain:

json
{
	"linter": {
		"domains": {
			"project": "none"
		}
	}
}

Project rules

Rules that belong to the domain:

Qwik

Use this domain inside Qwik projects. This domain enables rules that are specific to Qwik projects.

Qwik activation

Enable the recommended, non-nursery rules of the domain:

json
{
	"linter": {
		"domains": {
			"qwik": "recommended"
		}
	}
}

Enabled the all rules of the domain:

json
{
	"linter": {
		"domains": {
			"qwik": "all"
		}
	}
}

Disable all rules of the domain:

json
{
	"linter": {
		"domains": {
			"qwik": "none"
		}
	}
}

Qwik dependencies

Enabled when the following dependencies are declared:

  • @builder.io/qwik: >=1.0.0
  • @qwik.dev/core: >=2.0.0

Qwik rules

Rules that belong to the domain:

React

Use this domain inside React projects. It enables a set of rules that can help catching bugs and enforce correct practices. This domain enable rules that might conflict with the Solid domain.

React activation

Enable the recommended, non-nursery rules of the domain:

json
{
	"linter": {
		"domains": {
			"react": "recommended"
		}
	}
}

Enabled the all rules of the domain:

json
{
	"linter": {
		"domains": {
			"react": "all"
		}
	}
}

Disable all rules of the domain:

json
{
	"linter": {
		"domains": {
			"react": "none"
		}
	}
}

React dependencies

Enabled when the following dependencies are declared:

  • react: >=16.0.0

React rules

Rules that belong to the domain:

Solid

Use this domain inside Solid projects. This domain enables rules that might conflict with the React domain.

Solid activation

Enable the recommended, non-nursery rules of the domain:

json
{
	"linter": {
		"domains": {
			"solid": "recommended"
		}
	}
}

Enabled the all rules of the domain:

json
{
	"linter": {
		"domains": {
			"solid": "all"
		}
	}
}

Disable all rules of the domain:

json
{
	"linter": {
		"domains": {
			"solid": "none"
		}
	}
}

Solid dependencies

Enabled when the following dependencies are declared:

  • solid: >=1.0.0

Solid rules

Rules that belong to the domain:

Test

Use this domain when linting test files. It enables a set of rules that are library agnostic, and can help to catch possible misuse of the test APIs.

Test activation

Enable the recommended, non-nursery rules of the domain:

json
{
	"linter": {
		"domains": {
			"test": "recommended"
		}
	}
}

Enabled the all rules of the domain:

json
{
	"linter": {
		"domains": {
			"test": "all"
		}
	}
}

Disable all rules of the domain:

json
{
	"linter": {
		"domains": {
			"test": "none"
		}
	}
}

Test dependencies

Enabled when the following dependencies are declared:

  • jest: >=26.0.0
  • mocha: >=8.0.0
  • ava: >=2.0.0
  • vitest: >=1.0.0

Test globals

When enabled, the following global bindings are recognised by Biome:

  • after
  • afterAll
  • afterEach
  • before
  • beforeEach
  • beforeAll
  • context
  • describe
  • it
  • expect
  • run
  • setup
  • specify
  • suite
  • suiteSetup
  • suiteTeardown
  • teardown
  • test
  • xcontext
  • xdescribe
  • xit
  • xspecify

Test rules

Rules that belong to the domain:

Turborepo

Use this domain inside Turborepo projects. This domain enables rules that are specific to Turborepo projects.

Turborepo activation

Enable the recommended, non-nursery rules of the domain:

json
{
	"linter": {
		"domains": {
			"turborepo": "recommended"
		}
	}
}

:::note[No recommended rules] Since all rules in this domain are nursery rules, no rules will be activated when enabling the domain. You need to enable the single rules. ::: Enabled the all rules of the domain:

json
{
	"linter": {
		"domains": {
			"turborepo": "all"
		}
	}
}

Disable all rules of the domain:

json
{
	"linter": {
		"domains": {
			"turborepo": "none"
		}
	}
}

Turborepo dependencies

Enabled when the following dependencies are declared:

  • turbo: >=1.0.0

Turborepo rules

Rules that belong to the domain:

Types

This domain contains rules that perform project-level analysis. This includes our module graph for dependency resolution. When enabling rules that belong to this domain, Biome will scan the entire project, and it will enable the inference engine to resolve and flat types. The scanning phase will have a performance impact on the linting process. See the documentation on our scanner to learn more about the scanner.

Types activation

Enable the recommended, non-nursery rules of the domain:

json
{
	"linter": {
		"domains": {
			"types": "recommended"
		}
	}
}

:::note[No recommended rules] Since all rules in this domain are nursery rules, no rules will be activated when enabling the domain. You need to enable the single rules. ::: Enabled the all rules of the domain:

json
{
	"linter": {
		"domains": {
			"types": "all"
		}
	}
}

Disable all rules of the domain:

json
{
	"linter": {
		"domains": {
			"types": "none"
		}
	}
}

Types rules

Rules that belong to the domain:

Vue

Use this domain inside Vue projects. This domain enables rules that are specific to Vue projects.

Vue activation

Enable the recommended, non-nursery rules of the domain:

json
{
	"linter": {
		"domains": {
			"vue": "recommended"
		}
	}
}

Enabled the all rules of the domain:

json
{
	"linter": {
		"domains": {
			"vue": "all"
		}
	}
}

Disable all rules of the domain:

json
{
	"linter": {
		"domains": {
			"vue": "none"
		}
	}
}

Vue dependencies

Enabled when the following dependencies are declared:

  • vue: >=3.0.0

Vue rules

Rules that belong to the domain: