From 11243f7c3bd13fffb430dd54679e87901a7c4599 Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Thu, 21 Jan 2021 21:18:32 +0100 Subject: [PATCH] allow private class members to be marked with underscore --- index.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 44765c9..a225bf5 100644 --- a/index.js +++ b/index.js @@ -129,7 +129,7 @@ module.exports = { 'block-spacing': ['error', 'always'], 'brace-style': ['error', 'stroustrup', { allowSingleLine: true }], camelcase: 'off', - 'id-match': ['error', '^([a-z][a-z0-9_]*|[A-Z][a-zA-Z]+)$', { onlyDeclarations: true }], + 'id-match': ['error', '^([_a-z][a-z0-9_]*|[A-Z][a-zA-Z]+)$', { onlyDeclarations: true }], 'comma-dangle': ['error', 'never'], 'comma-spacing': 'error', 'comma-style': 'error', @@ -222,7 +222,7 @@ module.exports = { 'no-underscore-dangle': ['error', { allowAfterThis: true, allowAfterSuper: true, - enforceInMethodNames: true + enforceInMethodNames: false }], 'no-unneeded-ternary': 'error', 'no-whitespace-before-property': 'error', diff --git a/package.json b/package.json index cf685ba..fabcae4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sapphirecode/eslint-config", - "version": "2.1.21", + "version": "2.1.22", "description": "scode eslint standard configuration", "main": "index.js", "scripts": {