make private properties use leading underscore

This commit is contained in:
Timo Hocker 2020-04-27 10:07:08 +02:00
parent d2b7e73483
commit 478c9ca770

View File

@ -36,7 +36,13 @@ module.exports = {
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/naming-convention': ['error',
{ selector: 'default', format: ['snake_case'] },
{ selector: 'typeLike', format: ['PascalCase'] }
{ selector: 'typeLike', format: ['PascalCase'] },
{
selector: 'property',
modifiers: ['private'],
format: ['snake_case'],
leadingUnderscore: 'require'
}
],
'id-match': ['error', '^([a-z][a-z0-9_]*|[A-Z][a-zA-Z]*)$', { onlyDeclarations: true }]
}