key-style
A key that does not match a naming rule (options: case, pattern).
A key that does not match a naming rule (options: case, pattern).
The check is off by default.
The check takes options. Set them with the array form:
x18n.config.ts
import { defineConfig } from '@x18n/core'
export default defineConfig({
checks: {
'key-style': ['warning', { case: 'camel' }],
},
})case:camel,snake,kebaborpascal. Each segment of the key path must match.pattern: a regular expression that the whole key must match.
Configure
Turn the check on in checks:
x18n.config.ts
import { defineConfig } from '@x18n/core'
export default defineConfig({
checks: {
'key-style': 'warning',
},
})x18n check --only key-style runs this check alone. x18n check --skip key-style skips it for one run.