From 59db4aab157d98bf98c216c119e9ff848eea9505 Mon Sep 17 00:00:00 2001 From: Jonas Enlund Date: Sun, 25 Sep 2016 11:56:54 +0300 Subject: [PATCH] [eslint config] [base] [patch] `new-cap`: add immutable.js exceptions --- packages/eslint-config-airbnb-base/rules/style.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-airbnb-base/rules/style.js b/packages/eslint-config-airbnb-base/rules/style.js index a6617129..5da9f34f 100644 --- a/packages/eslint-config-airbnb-base/rules/style.js +++ b/packages/eslint-config-airbnb-base/rules/style.js @@ -135,7 +135,12 @@ module.exports = { 'multiline-ternary': ['off', 'never'], // require a capital letter for constructors - 'new-cap': ['error', { newIsCap: true }], + 'new-cap': ['error', { + newIsCap: true, + newIsCapExceptions: [], + capIsNew: false, + capIsNewExceptions: ['Immutable.Map', 'Immutable.Set', 'Immutable.List'], + }], // disallow the omission of parentheses when invoking a constructor with no arguments // http://eslint.org/docs/rules/new-parens