[eslint config] [base] [patch] new-cap: add immutable.js exceptions

This commit is contained in:
Jonas Enlund
2016-09-25 11:56:54 +03:00
committed by Jordan Harband
parent a1c84eee15
commit 59db4aab15

View File

@@ -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