summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/lib/rules/no-self-assign.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2018-03-21 22:44:47 -0700
committerRich Trott <rtrott@gmail.com>2018-03-24 04:11:48 -0700
commit0863a0e528ba9ee01f960dce7ffebe8fff3a774c (patch)
tree37990f3af668c242ec1c4a9e24afd31b720ad96d /tools/node_modules/eslint/lib/rules/no-self-assign.js
parent5e00a013eb219716d952cb8eb29a134c00f5db54 (diff)
downloadandroid-node-v8-0863a0e528ba9ee01f960dce7ffebe8fff3a774c.tar.gz
android-node-v8-0863a0e528ba9ee01f960dce7ffebe8fff3a774c.tar.bz2
android-node-v8-0863a0e528ba9ee01f960dce7ffebe8fff3a774c.zip
tools: update ESLint to 4.19.1
A few bug fixes result in more stringent linting rules. PR-URL: https://github.com/nodejs/node/pull/19528 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'tools/node_modules/eslint/lib/rules/no-self-assign.js')
-rw-r--r--tools/node_modules/eslint/lib/rules/no-self-assign.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/node_modules/eslint/lib/rules/no-self-assign.js b/tools/node_modules/eslint/lib/rules/no-self-assign.js
index 3014042002..8091d7d2e5 100644
--- a/tools/node_modules/eslint/lib/rules/no-self-assign.js
+++ b/tools/node_modules/eslint/lib/rules/no-self-assign.js
@@ -121,7 +121,9 @@ function eachSelfAssignment(left, right, props, report) {
let startJ = 0;
for (let i = right.properties.length - 1; i >= 0; --i) {
- if (right.properties[i].type === "ExperimentalSpreadProperty") {
+ const propType = right.properties[i].type;
+
+ if (propType === "SpreadElement" || propType === "ExperimentalSpreadProperty") {
startJ = i + 1;
break;
}