summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/lib/rules/no-mixed-operators.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-02-15 16:51:43 -0500
committercjihrig <cjihrig@gmail.com>2019-02-17 21:56:18 -0500
commit77b39c2eb2c9fe437d0e09e3e7682564d815c7fb (patch)
treea10a28bd5022e46c7ba49103282f63a80bf08886 /tools/node_modules/eslint/lib/rules/no-mixed-operators.js
parent2da7ff5e969538a19c27e6929d435094347f90a8 (diff)
downloadandroid-node-v8-77b39c2eb2c9fe437d0e09e3e7682564d815c7fb.tar.gz
android-node-v8-77b39c2eb2c9fe437d0e09e3e7682564d815c7fb.tar.bz2
android-node-v8-77b39c2eb2c9fe437d0e09e3e7682564d815c7fb.zip
tools: update ESLint to 5.14.0
Update ESLint to 5.14.0 PR-URL: https://github.com/nodejs/node/pull/26142 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Diffstat (limited to 'tools/node_modules/eslint/lib/rules/no-mixed-operators.js')
-rw-r--r--tools/node_modules/eslint/lib/rules/no-mixed-operators.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/node_modules/eslint/lib/rules/no-mixed-operators.js b/tools/node_modules/eslint/lib/rules/no-mixed-operators.js
index 22ed65f5b1..2b603a86df 100644
--- a/tools/node_modules/eslint/lib/rules/no-mixed-operators.js
+++ b/tools/node_modules/eslint/lib/rules/no-mixed-operators.js
@@ -42,10 +42,10 @@ const TARGET_NODE_TYPE = /^(?:Binary|Logical)Expression$/;
* @param {Object|undefined} options - A options object to normalize.
* @returns {Object} Normalized option object.
*/
-function normalizeOptions(options) {
- const hasGroups = (options && options.groups && options.groups.length > 0);
+function normalizeOptions(options = {}) {
+ const hasGroups = options.groups && options.groups.length > 0;
const groups = hasGroups ? options.groups : DEFAULT_GROUPS;
- const allowSamePrecedence = (options && options.allowSamePrecedence) !== false;
+ const allowSamePrecedence = options.allowSamePrecedence !== false;
return {
groups,
@@ -95,7 +95,8 @@ module.exports = {
uniqueItems: true
},
allowSamePrecedence: {
- type: "boolean"
+ type: "boolean",
+ default: true
}
},
additionalProperties: false