From fdc86ab13042003980604c317682cb7d39658e93 Mon Sep 17 00:00:00 2001 From: Wolfgang Ginolas Date: Thu, 29 Feb 2024 14:55:01 +0100 Subject: [PATCH] Remove jshint --- .jshintignore | 38 -------- .jshintrc | 26 ------ lib/api.js | 1 - lib/archive-account.js | 1 - lib/client/index.js | 2 +- lib/commands/admin-rpc.js | 3 - lib/commands/block.js | 1 - lib/commands/channel.js | 1 - lib/commands/core.js | 1 - lib/commands/invitation.js | 1 - lib/commands/metadata.js | 1 - lib/commands/pin-rpc.js | 1 - lib/commands/quota.js | 1 - lib/commands/upload.js | 1 - lib/commands/users.js | 1 - lib/env.js | 1 - lib/historyKeeper.js | 2 - lib/hk-util.js | 1 - lib/log.js | 1 - lib/pins.js | 3 - lib/rpc.js | 1 - lib/stats.js | 1 - lib/storage/block.js | 1 - lib/storage/file.js | 1 - lib/stream-file.js | 1 - lib/workers/db-worker.js | 1 - lib/workers/index.js | 1 - package-lock.json | 149 ------------------------------ package.json | 2 - scripts/check-account-deletion.js | 1 - scripts/compare-pin-methods.js | 1 - scripts/generate-admin-keys.js | 2 - scripts/pinned.js | 1 - scripts/runtests.js | 1 - scripts/tests/test-pins.js | 1 - scripts/tests/test-plan.js | 1 - www/auth/base32.js | 1 - www/bounce/main.js | 2 +- www/common/common-util.js | 4 +- www/common/media-tag.js | 4 +- www/common/outer/serviceworker.js | 1 - www/common/outer/sharedworker.js | 1 - www/common/outer/webworker.js | 1 - www/common/sframe-boot.js | 2 +- www/common/test.js | 1 - www/file/file-crypto.js | 2 +- www/mediatag/media-tag.js | 4 +- www/pad/csp.js | 4 +- www/pad/wysiwygarea-plugin.js | 4 +- www/profile/inner.js | 2 +- 50 files changed, 13 insertions(+), 274 deletions(-) delete mode 100644 .jshintignore delete mode 100644 .jshintrc diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index 52f336846..000000000 --- a/.jshintignore +++ /dev/null @@ -1,38 +0,0 @@ -node_modules/ -www/components/ -www/bower_components/ -www/common/onlyoffice/sdkjs -www/common/onlyoffice/web-apps -www/common/onlyoffice/x2t -www/common/onlyoffice/v1 -www/common/onlyoffice/v2* -www/common/onlyoffice/v4 -www/common/onlyoffice/v5 -www/common/onlyoffice/v*/ - -www/scratch -www/accounts -www/lib -www/accounts - -www/common/toolbar.js -www/common/hyperscript.js - -www/pad/wysiwygarea-plugin.js -www/pad/mediatag-plugin.js -www/pad/mediatag-plugin-dialog.js -www/pad/disable-base64.js -www/pad/wordcount/ - -www/kanban/jkanban.js -www/common/jscolor.js - -www/common/media-tag-nacl.min.js - -customize/ - -www/debug/chainpad.dist.js - -www/pad/mathjax/ -www/code/mermaid*.js -www/code/orgmode.js diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 761c69159..000000000 --- a/.jshintrc +++ /dev/null @@ -1,26 +0,0 @@ -{ - "laxcomma": true, - "laxbreak": true, - "sub": true, - "curly": true, - "eqeqeq": true, - "iterator": true, - "latedef": true, - "nocomma": true, - "shadow": false, - "undef": true, - "unused": true, - "futurehostile":true, - "browser": true, - "esversion": 6, - "predef": [ - "console", - "define", - "require", - "module", - "__dirname" - ], - "globals": { - "self": true - } -} diff --git a/lib/api.js b/lib/api.js index 3aae81c95..e2f96171a 100644 --- a/lib/api.js +++ b/lib/api.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ const WebSocketServer = require('ws').Server; const NetfluxSrv = require('chainpad-server'); const Decrees = require("./decrees"); diff --git a/lib/archive-account.js b/lib/archive-account.js index d3adbe917..43ff1357e 100644 --- a/lib/archive-account.js +++ b/lib/archive-account.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6, node: true */ const nThen = require('nthen'); const Pins = require('./pins'); const Util = require("./common-util"); diff --git a/lib/client/index.js b/lib/client/index.js index 267a3645a..a4b814ae6 100644 --- a/lib/client/index.js +++ b/lib/client/index.js @@ -3,7 +3,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later var Netflux = require("netflux-websocket"); -var WebSocket = require("ws"); // jshint ignore:line +var WebSocket = require("ws"); var nThen = require("nthen"); var Util = require("../../www/common/common-util"); diff --git a/lib/commands/admin-rpc.js b/lib/commands/admin-rpc.js index 53f154321..c491eb0de 100644 --- a/lib/commands/admin-rpc.js +++ b/lib/commands/admin-rpc.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ /* globals process */ const nThen = require("nthen"); const getFolderSize = require("get-folder-size"); @@ -17,9 +16,7 @@ const Users = require("./users"); const BlockStore = require("../storage/block"); const MFA = require("../storage/mfa"); const ArchiveAccount = require('../archive-account'); -/* jshint ignore:start */ const { Worker } = require('node:worker_threads'); -/* jshint ignore:end */ var Fs = require("fs"); diff --git a/lib/commands/block.js b/lib/commands/block.js index 39c003e3c..1d64364df 100644 --- a/lib/commands/block.js +++ b/lib/commands/block.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ /* globals Buffer*/ const Block = module.exports; const Nacl = require("tweetnacl/nacl-fast"); diff --git a/lib/commands/channel.js b/lib/commands/channel.js index 275e6bf1f..6edf7e7ff 100644 --- a/lib/commands/channel.js +++ b/lib/commands/channel.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Channel = module.exports; const Util = require("../common-util"); diff --git a/lib/commands/core.js b/lib/commands/core.js index a0c8f419b..79f3f40e8 100644 --- a/lib/commands/core.js +++ b/lib/commands/core.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ /* globals process */ const Core = module.exports; const Util = require("../common-util"); diff --git a/lib/commands/invitation.js b/lib/commands/invitation.js index 307efeeda..2624389e7 100644 --- a/lib/commands/invitation.js +++ b/lib/commands/invitation.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Invitation = module.exports; const Invite = require('../storage/invite'); diff --git a/lib/commands/metadata.js b/lib/commands/metadata.js index 54448f9b2..8eeca31ce 100644 --- a/lib/commands/metadata.js +++ b/lib/commands/metadata.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Data = module.exports; const Meta = require("../metadata"); diff --git a/lib/commands/pin-rpc.js b/lib/commands/pin-rpc.js index 1c9052a14..0b3e14413 100644 --- a/lib/commands/pin-rpc.js +++ b/lib/commands/pin-rpc.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Core = require("./core"); const Pinning = module.exports; diff --git a/lib/commands/quota.js b/lib/commands/quota.js index 50e57b9bf..7a92dbda9 100644 --- a/lib/commands/quota.js +++ b/lib/commands/quota.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ /* globals Buffer*/ const Quota = module.exports; diff --git a/lib/commands/upload.js b/lib/commands/upload.js index 1b23ab549..999f003f0 100644 --- a/lib/commands/upload.js +++ b/lib/commands/upload.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Upload = module.exports; const Util = require("../common-util"); const Pinning = require("./pin-rpc"); diff --git a/lib/commands/users.js b/lib/commands/users.js index 0e6ded48a..5b05a333b 100644 --- a/lib/commands/users.js +++ b/lib/commands/users.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Users = module.exports; const User = require('../storage/user'); diff --git a/lib/env.js b/lib/env.js index 1f95a3beb..a06d713e1 100644 --- a/lib/env.js +++ b/lib/env.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ /* globals process */ const Crypto = require('crypto'); diff --git a/lib/historyKeeper.js b/lib/historyKeeper.js index 786b1e50b..22aa4faf5 100644 --- a/lib/historyKeeper.js +++ b/lib/historyKeeper.js @@ -2,8 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ - const nThen = require('nthen'); const RPC = require("./rpc"); const HK = require("./hk-util.js"); diff --git a/lib/hk-util.js b/lib/hk-util.js index b92d846bf..c7f820bd9 100644 --- a/lib/hk-util.js +++ b/lib/hk-util.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ /* global Buffer */ var HK = module.exports; diff --git a/lib/log.js b/lib/log.js index 59d243027..c5b27fb85 100644 --- a/lib/log.js +++ b/lib/log.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ var Store = require("./storage/file"); var Util = require("./common-util"); diff --git a/lib/pins.js b/lib/pins.js index 686b49b3f..2201e561c 100644 --- a/lib/pins.js +++ b/lib/pins.js @@ -2,8 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ - var Pins = module.exports; const Fs = require("fs"); @@ -90,7 +88,6 @@ var createLineHandler = Pins.createLineHandler = function (ref, errorHandler) { }); } ref.surplus = ref.index; - //jshint -W086 // fallthrough } case 'PIN': { diff --git a/lib/rpc.js b/lib/rpc.js index 0dcc6ec1e..c2501c61e 100644 --- a/lib/rpc.js +++ b/lib/rpc.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Util = require("./common-util"); const Core = require("./commands/core"); diff --git a/lib/stats.js b/lib/stats.js index 16aefc59a..58333ad50 100644 --- a/lib/stats.js +++ b/lib/stats.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Stats = module.exports; var truthyStringOrNothing = function (s) { diff --git a/lib/storage/block.js b/lib/storage/block.js index ab79fe9dc..8809cf1b7 100644 --- a/lib/storage/block.js +++ b/lib/storage/block.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Block = module.exports; const Util = require("../common-util"); const Path = require("path"); diff --git a/lib/storage/file.js b/lib/storage/file.js index 397a9ee31..d8617f300 100644 --- a/lib/storage/file.js +++ b/lib/storage/file.js @@ -3,7 +3,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later /*@flow*/ -/* jshint esversion: 6 */ /* globals Buffer */ var Fs = require("fs"); var Fse = require("fs-extra"); diff --git a/lib/stream-file.js b/lib/stream-file.js index 10dfa647d..372148836 100644 --- a/lib/stream-file.js +++ b/lib/stream-file.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ /* global Buffer */ const ToPull = require('stream-to-pull-stream'); diff --git a/lib/workers/db-worker.js b/lib/workers/db-worker.js index a6c077914..9878d2c22 100644 --- a/lib/workers/db-worker.js +++ b/lib/workers/db-worker.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ /* globals process, Buffer */ const HK = require("../hk-util"); diff --git a/lib/workers/index.js b/lib/workers/index.js index bb6077397..6db3f8bbd 100644 --- a/lib/workers/index.js +++ b/lib/workers/index.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6 */ /* global process */ const Util = require("../common-util"); const nThen = require('nthen'); diff --git a/package-lock.json b/package-lock.json index 3d7ca3cda..544b01f32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,7 +66,6 @@ "devDependencies": { "eslint": "^8.57.0", "eslint-plugin-compat": "^4.2.0", - "jshint": "^2.13.4", "lesshint": "6.3.7" }, "funding": { @@ -1497,19 +1496,6 @@ "node": ">= 0.4" } }, - "node_modules/cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", - "integrity": "sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg==", - "dev": true, - "dependencies": { - "exit": "0.1.2", - "glob": "^7.1.1" - }, - "engines": { - "node": ">=0.2.5" - } - }, "node_modules/clone-deep": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-1.0.0.tgz", @@ -1583,15 +1569,6 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, - "node_modules/console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==", - "dev": true, - "dependencies": { - "date-now": "^0.1.4" - } - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -1733,12 +1710,6 @@ "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.0.tgz", "integrity": "sha512-6nOXX3UitrmdvSJWoVR2dlzhbX5bEUqmqsMUyx1ypCLZkHHkcuYtdpW3p94RGvcFkTV7DkLo+Ilbwnlwi8L+jw==" }, - "node_modules/date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==", - "dev": true - }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1854,62 +1825,6 @@ "node": ">=6.0.0" } }, - "node_modules/dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "dev": true, - "dependencies": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - } - }, - "node_modules/dom-serializer/node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/dom-serializer/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "node_modules/domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", - "dev": true, - "dependencies": { - "domelementtype": "1" - } - }, - "node_modules/domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", - "dev": true, - "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, "node_modules/dragula": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/dragula/-/dragula-3.7.2.tgz", @@ -1950,12 +1865,6 @@ "node": ">= 0.8" } }, - "node_modules/entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==", - "dev": true - }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -2279,15 +2188,6 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -3102,19 +3002,6 @@ "node": ">=8.0.0" } }, - "node_modules/htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", - "dev": true, - "dependencies": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" - } - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -3449,24 +3336,6 @@ "node": ">=4" } }, - "node_modules/jshint": { - "version": "2.13.6", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.6.tgz", - "integrity": "sha512-IVdB4G0NTTeQZrBoM8C5JFVLjV2KtZ9APgybDA1MK73xb09qFs0jCXyQLnCOp1cSZZZbvhq/6mfXHUTaDkffuQ==", - "dev": true, - "dependencies": { - "cli": "~1.0.0", - "console-browserify": "1.1.x", - "exit": "0.1.x", - "htmlparser2": "3.8.x", - "lodash": "~4.17.21", - "minimatch": "~3.0.2", - "strip-json-comments": "1.0.x" - }, - "bin": { - "jshint": "bin/jshint" - } - }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -3717,12 +3586,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "node_modules/lodash.includes": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", @@ -5551,18 +5414,6 @@ "node": ">=0.10.0" } }, - "node_modules/strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", - "dev": true, - "bin": { - "strip-json-comments": "cli.js" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/success-symbol": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/success-symbol/-/success-symbol-0.1.0.tgz", diff --git a/package.json b/package.json index d3b23c47b..4aedf7e83 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,6 @@ "devDependencies": { "eslint": "^8.57.0", "eslint-plugin-compat": "^4.2.0", - "jshint": "^2.13.4", "lesshint": "6.3.7" }, "overrides": { @@ -89,7 +88,6 @@ "package": "PACKAGE=1 node server.js", "lint": "eslint . && ./node_modules/lesshint/bin/lesshint -c ./.lesshintrc ./customize.dist/src/less2/", "lint:js": "eslint .", - "lint:server": "jshint --config .jshintrc lib", "lint:less": "./node_modules/lesshint/bin/lesshint -c ./.lesshintrc ./customize.dist/src/less2/", "lint:translations": "node ./scripts/translations/lint-translations.js", "unused-translations": "node ./scripts/translations/unused-translations.js", diff --git a/scripts/check-account-deletion.js b/scripts/check-account-deletion.js index a262c7046..e9ed51f5b 100644 --- a/scripts/check-account-deletion.js +++ b/scripts/check-account-deletion.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6, node: true */ const Fs = require('fs'); const nThen = require('nthen'); const Nacl = require('tweetnacl/nacl-fast'); diff --git a/scripts/compare-pin-methods.js b/scripts/compare-pin-methods.js index 6894aa40b..299e6462f 100644 --- a/scripts/compare-pin-methods.js +++ b/scripts/compare-pin-methods.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6, node: true */ const nThen = require("nthen"); const Pins = require("../lib/pins"); const Assert = require("assert"); diff --git a/scripts/generate-admin-keys.js b/scripts/generate-admin-keys.js index 0fe421c53..bda495a2f 100644 --- a/scripts/generate-admin-keys.js +++ b/scripts/generate-admin-keys.js @@ -2,8 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6, node: true */ - const Nacl = require('tweetnacl/nacl-fast'); const keyPair = Nacl.box.keyPair(); diff --git a/scripts/pinned.js b/scripts/pinned.js index e833974e1..12c0722d1 100644 --- a/scripts/pinned.js +++ b/scripts/pinned.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 6, node: true */ const Fs = require('fs'); const Path = require("path"); const Semaphore = require('saferphore'); diff --git a/scripts/runtests.js b/scripts/runtests.js index def41c3a5..60685932a 100644 --- a/scripts/runtests.js +++ b/scripts/runtests.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -// jshint esversion: 6, browser: false, node: true // This file is for automated testing, it should probably not be invoked for any other purpose. // It will: // 1. npm install diff --git a/scripts/tests/test-pins.js b/scripts/tests/test-pins.js index d31059748..67309b7c8 100644 --- a/scripts/tests/test-pins.js +++ b/scripts/tests/test-pins.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Pins = require("../../lib/pins"); var stats = { diff --git a/scripts/tests/test-plan.js b/scripts/tests/test-plan.js index 56fc5e3f5..062a490e8 100644 --- a/scripts/tests/test-plan.js +++ b/scripts/tests/test-plan.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/*jshint esversion: 6 */ const Plan = require("../../lib/plan"); var rand_delay = function (f) { diff --git a/www/auth/base32.js b/www/auth/base32.js index b31a406c3..ba804c104 100644 --- a/www/auth/base32.js +++ b/www/auth/base32.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint esversion: 7 */ define([], function () { // Based on https://gist.github.com/bellbind/871b145110c458e83077a718aef9fa0e diff --git a/www/bounce/main.js b/www/bounce/main.js index 697ff5711..e8d658602 100644 --- a/www/bounce/main.js +++ b/www/bounce/main.js @@ -81,7 +81,7 @@ define(['/api/config'], function (ApiConfig) { // Inform the user that we won't navigate and that the 'bounce tab' will be closed. // our linter warns when it sees 'javascript:' because it doesn't distinguish between // detecting this pattern and using it, so we ignore this line - if (['javascript:', 'vbscript:', 'data:', 'blob:'].includes(target.protocol)) { // jshint ignore:line + if (['javascript:', 'vbscript:', 'data:', 'blob:'].includes(target.protocol)) { window.alert(Messages._getKey('bounce_danger', [target.href])); return void reject(); } diff --git a/www/common/common-util.js b/www/common/common-util.js index b1223f35a..7d9a1b27b 100644 --- a/www/common/common-util.js +++ b/www/common/common-util.js @@ -6,8 +6,8 @@ var Util = {}; // polyfill for atob in case you're using this from node... - window.atob = window.atob || function (str) { return Buffer.from(str, 'base64').toString('binary'); }; // jshint ignore:line - window.btoa = window.btoa || function (str) { return Buffer.from(str, 'binary').toString('base64'); }; // jshint ignore:line + window.atob = window.atob || function (str) { return Buffer.from(str, 'base64').toString('binary'); }; + window.btoa = window.btoa || function (str) { return Buffer.from(str, 'binary').toString('base64'); }; Util.slice = function (A, start, end) { return Array.prototype.slice.call(A, start, end); diff --git a/www/common/media-tag.js b/www/common/media-tag.js index bf0359001..ac02eed3f 100644 --- a/www/common/media-tag.js +++ b/www/common/media-tag.js @@ -349,9 +349,7 @@ var factory = function () { increment: function (N) { var l = N.length; while (l-- > 1) { - /* .jshint probably suspects this is unsafe because we lack types - but as long as this is only used on nonces, it should be safe */ - if (N[l] !== 255) { return void N[l]++; } // jshint ignore:line + if (N[l] !== 255) { return void N[l]++; } // you don't need to worry about this running out. // you'd need a REAAAALLY big file diff --git a/www/common/outer/serviceworker.js b/www/common/outer/serviceworker.js index 7b2a23139..f723cd27a 100644 --- a/www/common/outer/serviceworker.js +++ b/www/common/outer/serviceworker.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint ignore:start */ importScripts('/components/requirejs/require.js'); window = self; diff --git a/www/common/outer/sharedworker.js b/www/common/outer/sharedworker.js index 392c4aef6..a85857682 100644 --- a/www/common/outer/sharedworker.js +++ b/www/common/outer/sharedworker.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint ignore:start */ importScripts('/components/requirejs/require.js'); window = self; diff --git a/www/common/outer/webworker.js b/www/common/outer/webworker.js index 114c9f59e..f88df427b 100644 --- a/www/common/outer/webworker.js +++ b/www/common/outer/webworker.js @@ -2,7 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* jshint ignore:start */ importScripts('/components/requirejs/require.js'); window = self; diff --git a/www/common/sframe-boot.js b/www/common/sframe-boot.js index 4cfaa2b05..480c35300 100644 --- a/www/common/sframe-boot.js +++ b/www/common/sframe-boot.js @@ -45,7 +45,7 @@ if (typeof(Promise) !== 'function') { var caughtEval; console.log("Testing if CSP correctly blocks an 'eval' call"); try { - eval('true'); // jshint ignore:line + eval('true'); } catch (err) { caughtEval = true; } if (!/^\/(sheet|doc|presentation|unsafeiframe)/.test(window.location.pathname) && !caughtEval) { diff --git a/www/common/test.js b/www/common/test.js index a418a2e1f..e084a8561 100644 --- a/www/common/test.js +++ b/www/common/test.js @@ -68,7 +68,6 @@ define([], function () { } }; - // jshint -W103 var errProto = (new Error()).__proto__; var doLog = function (o) { var s; diff --git a/www/file/file-crypto.js b/www/file/file-crypto.js index 246bf756d..6a5bc9e33 100644 --- a/www/file/file-crypto.js +++ b/www/file/file-crypto.js @@ -42,7 +42,7 @@ define([ while (l-- > 1) { /* our linter suspects this is unsafe because we lack types but as long as this is only used on nonces, it should be safe */ - if (N[l] !== 255) { return void N[l]++; } // jshint ignore:line + if (N[l] !== 255) { return void N[l]++; } if (l === 0) { throw new Error('E_NONCE_TOO_LARGE'); } N[l] = 0; } diff --git a/www/mediatag/media-tag.js b/www/mediatag/media-tag.js index 0292fffde..55b5f822e 100644 --- a/www/mediatag/media-tag.js +++ b/www/mediatag/media-tag.js @@ -128,9 +128,7 @@ increment: function (N) { var l = N.length; while (l-- > 1) { - /* .jshint probably suspects this is unsafe because we lack types - but as long as this is only used on nonces, it should be safe */ - if (N[l] !== 255) { return void N[l]++; } // jshint ignore:line + if (N[l] !== 255) { return void N[l]++; } // you don't need to worry about this running out. // you'd need a REAAAALLY big file diff --git a/www/pad/csp.js b/www/pad/csp.js index 039ddf6ef..ad5cfcc34 100644 --- a/www/pad/csp.js +++ b/www/pad/csp.js @@ -185,8 +185,8 @@ define(['jquery'], function ($) { // for other browers, the 'src' attribute should be left empty to // trigger iframe's 'load' event. var src = - CKEDITOR.env.air ? 'javascript:void(0)' : // jshint ignore:line - ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) ? 'javascript:void(function(){' + encodeURIComponent( // jshint ignore:line + CKEDITOR.env.air ? 'javascript:void(0)' : + ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) ? 'javascript:void(function(){' + encodeURIComponent( 'document.open();' + // In IE, the document domain must be set any time we call document.open(). '(' + CKEDITOR.tools.fixDomain + ')();' + diff --git a/www/pad/wysiwygarea-plugin.js b/www/pad/wysiwygarea-plugin.js index dd07a7b08..41031222b 100644 --- a/www/pad/wysiwygarea-plugin.js +++ b/www/pad/wysiwygarea-plugin.js @@ -31,9 +31,9 @@ define(['/api/config'], function (ApiConfig) { // trigger iframe's 'load' event. // Microsoft Edge throws "Permission Denied" if treated like an IE (http://dev.ckeditor.com/ticket/13441). if ( CKEDITOR.env.air ) { - src = 'javascript:void(0)'; // jshint ignore:line + src = 'javascript:void(0)'; } else if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) { - src = 'javascript:void(function(){' + encodeURIComponent( src ) + '}())'; // jshint ignore:line + src = 'javascript:void(function(){' + encodeURIComponent( src ) + '}())'; } else { src = ''; } diff --git a/www/profile/inner.js b/www/profile/inner.js index cb42b0e72..ee4d65468 100644 --- a/www/profile/inner.js +++ b/www/profile/inner.js @@ -93,7 +93,7 @@ define([ var CREATE_ID = "cp-app-profile-create"; var HEADER_ID = "cp-app-profile-header"; var HEADER_RIGHT_ID = "cp-app-profile-rightside"; - var CREATE_INVITE_BUTTON = 'cp-app-profile-invite-button'; /* jshint ignore: line */ + var CREATE_INVITE_BUTTON = 'cp-app-profile-invite-button'; var VIEW_PROFILE_BUTTON = 'cp-app-profile-viewprofile-button'; var common;