diff options
Diffstat (limited to 'tools/node_modules/eslint/lib/rules/new-cap.js')
-rw-r--r-- | tools/node_modules/eslint/lib/rules/new-cap.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/node_modules/eslint/lib/rules/new-cap.js b/tools/node_modules/eslint/lib/rules/new-cap.js index 4a01dcfa7f..ab70fcfadd 100644 --- a/tools/node_modules/eslint/lib/rules/new-cap.js +++ b/tools/node_modules/eslint/lib/rules/new-cap.js @@ -88,10 +88,12 @@ module.exports = { type: "object", properties: { newIsCap: { - type: "boolean" + type: "boolean", + default: true }, capIsNew: { - type: "boolean" + type: "boolean", + default: true }, newIsCapExceptions: { type: "array", @@ -112,7 +114,8 @@ module.exports = { type: "string" }, properties: { - type: "boolean" + type: "boolean", + default: true } }, additionalProperties: false @@ -126,7 +129,7 @@ module.exports = { create(context) { - const config = context.options[0] ? Object.assign({}, context.options[0]) : {}; + const config = Object.assign({}, context.options[0]); config.newIsCap = config.newIsCap !== false; config.capIsNew = config.capIsNew !== false; |