ReferenceIndividual lint rules
Join table conventions
Require names and key shapes for explicitly selected relationship tables.
Configure each relationship table explicitly. This supports joins with payload fields, self-relations, and project-specific side order.
Enable this opt-in rule under lint.rules.
Configuration
import { defineConfig } from '@mwillbanks/zenstack-zenlev'
export default defineConfig({
lint: {
rules: {
'zenlev/naming/join-table': [
'error',
{
joins: [
{
table: 'app.order_*',
left: 'order',
right: 'tag',
template: '{left}_{right}',
order: 'declared',
key: 'composite',
},
],
},
],
},
},
})Parameters
joinsis a list. Each entry requirestable(qualified identity or wildcard),left, andright.templateaccepts{left}and{right}and defaults to{left}_{right}.orderacceptsdeclared(default) orlexical.keyoptionally requiressurrogate(one PK column) orcomposite(multiple PK columns).
All built-in rules accept the shared selectors.
Example
app.order_tag with PRIMARY KEY (order_id, tag_id) passes. The selector also finds an existing app.order_labels table to report its name.