Skip to content

Consistent Compound Words

Suggestion
small-rules/consistent-compound-words

Enforce consistent spelling of compound words in identifiers.

Diagnostic Messages

error
Prefer `{{replacement}}` over `{{name}}`.
rename
Rename to `{{replacement}}`.

Configuration

This rule accepts one options object after the severity.

allowListOptional

No description available.

checkPropertiesOptional

No description available.

checkShorthandPropertiesOptional

No description available.

checkVariablesOptional

No description available.

extendDefaultReplacementsOptional

No description available.

replacementsOptional

No description available.

{
"jsPlugins": [
"@pobammer-ts/small-rules"
],
"rules": {
"small-rules/consistent-compound-words": [
"error",
{
"allowList": {},
"checkProperties": false,
"checkShorthandProperties": false,
"checkVariables": false,
"extendDefaultReplacements": false,
"replacements": {}
}
]
}
}

Examples

Split compound word
const passWord = 'secret';
Consistent compound spelling
const password = 'secret';