[SERVER-22597] Fix minor javascript errors found by eslint Created: 12/Feb/16  Updated: 21/Nov/16  Resolved: 19/Feb/16

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.3.1
Fix Version/s: 3.2.4, 3.3.2

Type: Bug Priority: Major - P3
Reporter: Michael Grundy Assignee: Michael Grundy
Resolution: Done Votes: 0
Labels: test-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:

eslint --format unix jstests/

Sprint: TIG 10 (02/19/16), TIG 11 (03/11/16)
Participants:

 Description   

While developing our eslint javascript linting configuration we found the following minor errors in our tests:

jstests/core/arrayfind8.js:9:9: Expected a conditional expression and instead saw an assignment. [Error/no-cond-assign]
jstests/repl/repl13.js:4:9: Expected a conditional expression and instead saw an assignment. [Error/no-cond-assign]
jstests/repl/repl17.js:20:13: Expected a conditional expression and instead saw an assignment. [Error/no-cond-assign]
jstests/replsets/get_replication_info_helper.js:27:25: Unexpected use of comma operator. [Error/no-sequences]
jstests/tool/gridfs.js:20:5: unnecessary ".apply()". [Error/no-useless-call]



 Comments   
Comment by Githook User [ 19/Feb/16 ]

Author:

{u'username': u'mgrundy', u'name': u'Mike Grundy', u'email': u'michael.grundy@10gen.com'}

Message: SERVER-22597 Fix minor javascript errors found by eslint

(cherry picked from commit 2aeae1ee0f91fba6c4f5a6fff6a8bfd26e1600d5)
Branch: v3.2
https://github.com/mongodb/mongo/commit/429240d0d1177f4fadf93195a91bfccd719d90ba

Comment by Githook User [ 19/Feb/16 ]

Author:

{u'username': u'mgrundy', u'name': u'Mike Grundy', u'email': u'michael.grundy@10gen.com'}

Message: SERVER-22597 Fix minor javascript errors found by eslint
Branch: master
https://github.com/mongodb/mongo/commit/2aeae1ee0f91fba6c4f5a6fff6a8bfd26e1600d5

Comment by Michael Grundy [ 18/Feb/16 ]

Will handle the assert.js changes in SERVER-22732, it's a little more than a simple typo fix.

Comment by Michael Grundy [ 17/Feb/16 ]

Also address issues in src/mongo/shell:

src/mongo/shell/assert.js:135:13: Found unexpected statement after a return. [Error/no-unreachable]src/mongo/shell/servers.js:845:13: unnecessary ".apply()". [Error/no-useless-call]
src/mongo/shell/servers.js:857:17: unnecessary ".apply()". [Error/no-useless-call]
src/mongo/shell/servers.js:863:13: unnecessary ".apply()". [Error/no-useless-call]
src/mongo/shell/servers.js:873:32: unnecessary ".apply()". [Error/no-useless-call]
src/mongo/shell/servers.js:883:21: unnecessary ".apply()". [Error/no-useless-call]
src/mongo/shell/servers.js:887:17: unnecessary ".apply()". [Error/no-useless-call]
src/mongo/shell/servers.js:890:17: unnecessary ".apply()". [Error/no-useless-call]
src/mongo/shell/servers.js:893:17: unnecessary ".apply()". [Error/no-useless-call]
src/mongo/shell/servers.js:900:32: unnecessary ".apply()". [Error/no-useless-call]
src/mongo/shell/upgrade_check.js:141:61: Unexpected use of comma operator. [Error/no-sequences]
src/mongo/shell/upgrade_check.js:201:59: Unexpected use of comma operator. [Error/no-sequences]

Generated at Thu Feb 08 04:00:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.