ReferenceIndividual lint rules
Identifier conventions
Check physical identifier format, affixes, length, quoting, and qualification.
Checks selected physical identifiers. Use kinds to limit a pattern to objects with the same naming convention.
Enable this opt-in rule under lint.rules.
Configuration
import { defineConfig } from '@mwillbanks/zenstack-zenlev'
export default defineConfig({
lint: {
rules: {
'zenlev/naming/identifier': [
'error',
{ kinds: ['index'], format: 'snake_case', prefix: 'idx_', maxLength: 48 },
],
},
},
})Parameters
formatselectsPascalCase,camelCase,snake_case,kebab-case, orUPPER_SNAKE_CASE.prefixandsuffixrequire literal affixes.patternapplies a JavaScript regular expression.denylists wildcard name patterns.reservedlists exact names matched without case sensitivity.maxLengthsets a positive limit. The defaults are 63 UTF-8 bytes in PostgreSQL and 64 characters in MySQL.quoted: falserequires unquoted spelling.qualified: truerequires a schema on applicable source objects. Catalog evidence cannot establish authored quoting or qualification.
All built-in rules accept the shared selectors.
Example
idx_orders_created_at passes. Rename orders_created_at_idx or change the configured prefix.