bloktor-config-strict
v0.1.0
Published
Official strict preset config for Bloktor.
Maintainers
Readme
bloktor-config-strict
Official strict rule preset for Bloktor. Elevates all 39 built-in rules to error severity and uses tighter thresholds for size and complexity limits.
Usage
import { defineConfig } from "bloktor";
import strict from "bloktor-config-strict";
export default defineConfig({
space: 12345,
region: "eu",
extends: [strict]
});Rules
| Rule | Severity | Non-default options |
|---|---|---|
| schema/no-orphan-bloks | error | |
| schema/no-untyped-bloks | error | |
| schema/no-deprecated-fields | error | |
| schema/require-field-description | error | |
| schema/max-fields | error | max: 20 |
| schema/no-redundant-fields | error | |
| hierarchy/no-circular-refs | error | |
| hierarchy/max-nesting-depth | error | max: 3 |
| hierarchy/require-root | error | |
| hierarchy/no-isolated-nestables | error | |
| naming/component-convention | error | convention: "snake_case" |
| naming/field-convention | error | convention: "snake_case" |
| naming/no-generic-names | error | |
| naming/require-display-name | error | |
| config/require-preview-url | error | |
| config/require-workflow | error | |
| config/no-open-permissions | error | |
| config/require-languages | error | |
| config/no-empty-datasources | error | |
| config/require-datasource-dimension | error | |
| config/no-unconstrained-assets | error | |
| config/require-richtext-toolbar | error | |
| config/no-unrestricted-richtext | error | |
| best-practice/require-blok-group | error | |
| best-practice/no-empty-groups | error | |
| best-practice/no-duplicate-display-names | error | |
| best-practice/require-tab-structure | error | minFields: 8 |
| best-practice/require-blok-min-max | error | defaultMin: 0, defaultMax: 6 |
| best-practice/no-single-field-bloks | error | |
| best-practice/prefer-nestable-for-reuse | error | minReferences: 2 |
| best-practice/no-text-for-richtext | error | |
| best-practice/group-related-fields | error | minPrefixFields: 2 |
| drift/cross-space-components | error | |
| drift/cross-space-datasources | error | |
| drift/cross-space-roles | error | |
| drift/cross-space-workflows | error | |
| drift/schema-git-sync | error | |
| drift/types-schema-sync | error | |
| drift/require-migration-for-breaking | error | |
Differences from recommended
The strict preset makes four key changes beyond elevating all severities to error:
| Rule | Recommended | Strict |
|---|---|---|
| schema/max-fields | max: 25 | max: 20 |
| hierarchy/max-nesting-depth | max: 4 | max: 3 |
| best-practice/require-tab-structure | minFields: 12 | minFields: 8 |
| best-practice/require-blok-min-max | defaultMax: 10 | defaultMax: 6 |
Overriding rules
export default defineConfig({
extends: [strict],
rules: {
"schema/max-fields": ["error", { max: 15 }],
"best-practice/require-tab-structure": "off"
}
});See the Rule Reference for full option descriptions.
