@webority/biome-config
v0.64.0
Published
Shared Biome lint + format policy for Webority frontend products. Extend it from a product biome.json so every repo inherits one fleet-decided ruleset, bumped by version — no per-repo drift.
Readme
@webority/biome-config
The single source of truth for Biome lint + format policy across Webority frontend
products. Extend it from a product's biome.json so every repo inherits the same
shared ruleset — and a policy change is one version bump, not an N-way copy that
drifts. Same model as the shared @webority/theme + @webority/ui-react.
Use
npm install -D --save-exact @webority/biome-config
npm install -D @biomejs/biome--save-exact is deliberate — pin @webority/* to an exact version, never ^, so a
policy change arrives when you bump it rather than on someone's next npm install.
Then a product's biome.json extends this base and adds only its own repo-specific
bits — vcs.root and files.includes:
{
"$schema": "https://biomejs.dev/schemas/2.5.5/schema.json",
"extends": ["@webority/biome-config/biome.jsonc"],
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true, "root": ".." },
"files": {
"ignoreUnknown": true,
"includes": ["**", "!!**/dist", "!!**/build", "!!**/node_modules", "!**/src/appsettings.Compiled.json", "!**/public/version.json"]
}
}Never set formatter.lineEnding in a product. It is lf here, for every consuming
repo, matching their .gitattributes (* text=auto eol=lf) and .editorconfig
(end_of_line = lf). This config sets useEditorconfig: false, so the value above is the
only place the line ending is stated — a local override is the deviation, and a stale one
fails every file in the repo at once, drowning any real violation (one repo's leftover
"lineEnding": "crlf" failed 198 of its 203 files; removing it left 1).
What's decided here (once, for every repo)
- Format: 4-space, width 140, double quotes, semicolons, trailing commas, LF line
endings (
useEditorconfig: false, so this file is the sole authority — see above). useExhaustiveDependencies: error: a missing hook dependency is a stale-closure bug that builds clean. A deliberate trigger-only or run-once effect carries// biome-ignore lint/correctness/useExhaustiveDependencies: <reason>on that hook. A repo adopting this version records its existing violations once withbiome lint --only=correctness/useExhaustiveDependencies --suppress --reason="<why>", so every new violation still fails.a11ygroup:warn, so an accessibility finding fails only underbiome check --error-on-warnings(the standardcheckscript). A product never raises or lowers it in its ownbiome.json; a lint script without that flag lets the findings through.noArrayIndexKey: warn— kept on (catches real dynamic-list bugs); genuine static-list exceptions get a documented per-linebiome-ignore.noConsoleoff forscripts/**+logger.js; CSS/SCSS not linted; the icon module's mixed export allowed.StyleSheet.absoluteFillObjectis an error, through theno-absolute-fill-objectplugin (below).
Plugins (GritQL)
The config ships lint plugins in plugins/ and turns them on for every product that extends it:
| Plugin | Fails on | Why |
|---|---|---|
| no-absolute-fill-object | StyleSheet.absoluteFillObject | React Native 0.86 removed it. It is undefined, and spreading it silently leaves the view in the layout flow. Use StyleSheet.absoluteFill (spread it or use it directly). |
A plugin finding is an error, so biome check and biome lint fail on it.
Your biome.json must sit beside the node_modules that holds @webority/biome-config. Biome
resolves a plugin path against the folder of your own biome.json, not against this package, so the
config names its plugins as ./node_modules/@webority/biome-config/plugins/…. That is the normal layout
for an app folder (biome.json, package.json and node_modules together). In any other layout Biome
stops with Cannot read file for the plugin on every run, so a wrong layout is never silent; a
workspace root that runs Biome adds @webority/biome-config to its own devDependencies. Needs
@biomejs/biome 2.5 or newer (checked on 2.5.5 and 2.5.15).
Product-specific one-offs (a bespoke file that co-exports, etc.) still use a local
overrides entry or a documented inline biome-ignore in that product.
Versioning
Published from the webority-ui monorepo on each release, in lockstep with the other
@webority/* packages. Pin a version; bump to adopt policy changes deliberately.
