From e07ca90509c43fbe835a2a41f4f444329daab5aa Mon Sep 17 00:00:00 2001 From: olehan Date: Wed, 11 Aug 2021 17:38:47 +0600 Subject: [PATCH] fix(eslint-config-core): set capIsNew option to false for new-cap to allow decorators (#11) --- packages/eslint-config-core/src/config.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-core/src/config.ts b/packages/eslint-config-core/src/config.ts index e48f7e6..703d60d 100644 --- a/packages/eslint-config-core/src/config.ts +++ b/packages/eslint-config-core/src/config.ts @@ -302,7 +302,12 @@ export const eslintConfigCore: Linter.BaseConfig = { // Enforce or disallow newlines between operands of ternary expressions. 'multiline-ternary': ['warn', 'always-multiline'], // Require constructor names to begin with a capital letter. - 'new-cap': 'warn', + 'new-cap': [ + 'warn', + { + capIsNew: false, + }, + ], // Require parentheses when invoking a constructor with no arguments. 'new-parens': 'warn', // Require a newline after each call in a method chain.