From 478c9ca77037ef60b98ff7ca61a8b8b7849835bf Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Mon, 27 Apr 2020 10:07:08 +0200 Subject: [PATCH] make private properties use leading underscore --- index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 9d8b220..2353e6b 100644 --- a/index.js +++ b/index.js @@ -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 }] }