diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json index 90b8d062b5..d00e90c0aa 100644 --- a/ts/util/lint/exceptions.json +++ b/ts/util/lint/exceptions.json @@ -160,102 +160,6 @@ "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" }, - { - "rule": "jQuery-$(", - "path": "js/background.js", - "line": " if ($('.dark-overlay').length) {", - "lineNumber": 264, - "reasonCategory": "usageTrusted", - "updated": "2018-09-19T21:59:32.770Z", - "reasonDetail": "Protected from arbitrary input" - }, - { - "rule": "jQuery-$(", - "path": "js/background.js", - "line": " $(document.body).prepend('
');", - "lineNumber": 267, - "reasonCategory": "usageTrusted", - "updated": "2018-09-19T21:59:32.770Z", - "reasonDetail": "Protected from arbitrary input" - }, - { - "rule": "jQuery-prepend(", - "path": "js/background.js", - "line": " $(document.body).prepend('
');", - "lineNumber": 267, - "reasonCategory": "usageTrusted", - "updated": "2018-09-19T18:13:29.628Z", - "reasonDetail": "Hard-coded value" - }, - { - "rule": "jQuery-$(", - "path": "js/background.js", - "line": " $('.dark-overlay').on('click', () => $('.dark-overlay').remove());", - "lineNumber": 268, - "reasonCategory": "usageTrusted", - "updated": "2018-09-19T21:59:32.770Z", - "reasonDetail": "Protected from arbitrary input" - }, - { - "rule": "jQuery-$(", - "path": "js/background.js", - "line": " removeDarkOverlay: () => $('.dark-overlay').remove(),", - "lineNumber": 270, - "reasonCategory": "usageTrusted", - "updated": "2018-09-19T21:59:32.770Z", - "reasonDetail": "Protected from arbitrary input" - }, - { - "rule": "jQuery-$(", - "path": "js/background.js", - "line": " $('body').append(clearDataView.el);", - "lineNumber": 273, - "reasonCategory": "usageTrusted", - "updated": "2018-09-19T21:59:32.770Z", - "reasonDetail": "Protected from arbitrary input" - }, - { - "rule": "jQuery-append(", - "path": "js/background.js", - "line": " $('body').append(clearDataView.el);", - "lineNumber": 273, - "reasonCategory": "usageTrusted", - "updated": "2018-09-19T18:13:29.628Z", - "reasonDetail": "Interacting with already-existing DOM nodes" - }, - { - "rule": "jQuery-load(", - "path": "js/background.js", - "line": " await ConversationController.load();", - "lineNumber": 417, - "reasonCategory": "falseMatch", - "updated": "2018-10-02T21:00:44.007Z" - }, - { - "rule": "jQuery-$(", - "path": "js/background.js", - "line": " el: $('body'),", - "lineNumber": 480, - "reasonCategory": "usageTrusted", - "updated": "2018-10-16T23:47:48.006Z", - "reasonDetail": "Protected from arbitrary input" - }, - { - "rule": "jQuery-wrap(", - "path": "js/background.js", - "line": " wrap(", - "lineNumber": 740, - "reasonCategory": "falseMatch", - "updated": "2018-10-18T22:23:00.485Z" - }, - { - "rule": "jQuery-wrap(", - "path": "js/background.js", - "line": " await wrap(", - "lineNumber": 1270, - "reasonCategory": "falseMatch", - "updated": "2018-10-26T22:43:23.229Z" - }, { "rule": "jQuery-load(", "path": "js/conversation_controller.js", @@ -303,7 +207,7 @@ "rule": "jQuery-wrap(", "path": "js/models/messages.js", "line": " this.send(wrap(promise));", - "lineNumber": 793, + "lineNumber": 810, "reasonCategory": "falseMatch", "updated": "2018-10-05T23:12:28.961Z" }, @@ -311,7 +215,7 @@ "rule": "jQuery-wrap(", "path": "js/models/messages.js", "line": " return wrap(", - "lineNumber": 1002, + "lineNumber": 1019, "reasonCategory": "falseMatch", "updated": "2018-10-05T23:12:28.961Z" }, @@ -427,8 +331,8 @@ { "rule": "jQuery-appendTo(", "path": "js/settings_start.js", - "line": " window.view.$el.appendTo($body);", - "lineNumber": 40, + "line": " window.view.$el.appendTo($body);", + "lineNumber": 42, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -1466,16 +1370,16 @@ { "rule": "jQuery-$(", "path": "js/views/settings_view.js", - "line": " el: this.$('.menu-bar-setting'),", + "line": " el: this.$('.send-link-previews-setting'),", "lineNumber": 110, "reasonCategory": "usageTrusted", - "updated": "2018-09-19T21:59:32.770Z", + "updated": "2019-01-24T18:23:20.631Z", "reasonDetail": "Protected from arbitrary input" }, { "rule": "jQuery-$(", "path": "js/views/settings_view.js", - "line": " el: this.$('.media-permissions'),", + "line": " el: this.$('.menu-bar-setting'),", "lineNumber": 116, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", @@ -1484,17 +1388,26 @@ { "rule": "jQuery-$(", "path": "js/views/settings_view.js", - "line": " this.$('.sync-setting').append(syncView.el);", + "line": " el: this.$('.media-permissions'),", "lineNumber": 122, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" }, + { + "rule": "jQuery-$(", + "path": "js/views/settings_view.js", + "line": " this.$('.sync-setting').append(syncView.el);", + "lineNumber": 128, + "reasonCategory": "usageTrusted", + "updated": "2018-09-19T21:59:32.770Z", + "reasonDetail": "Protected from arbitrary input" + }, { "rule": "jQuery-append(", "path": "js/views/settings_view.js", "line": " this.$('.sync-setting').append(syncView.el);", - "lineNumber": 122, + "lineNumber": 128, "reasonCategory": "usageTrusted", "updated": "2018-09-19T18:13:29.628Z", "reasonDetail": "Interacting with already-existing DOM nodes" @@ -1503,7 +1416,7 @@ "rule": "jQuery-$(", "path": "js/views/settings_view.js", "line": " this.$('.sync').text(i18n('syncNow'));", - "lineNumber": 174, + "lineNumber": 182, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1512,7 +1425,7 @@ "rule": "jQuery-$(", "path": "js/views/settings_view.js", "line": " this.$('.sync').attr('disabled', 'disabled');", - "lineNumber": 178, + "lineNumber": 186, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1521,7 +1434,7 @@ "rule": "jQuery-$(", "path": "js/views/settings_view.js", "line": " this.$('.synced_at').hide();", - "lineNumber": 190, + "lineNumber": 198, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1530,7 +1443,7 @@ "rule": "jQuery-$(", "path": "js/views/settings_view.js", "line": " this.$('.sync_failed').hide();", - "lineNumber": 195, + "lineNumber": 203, "reasonCategory": "usageTrusted", "updated": "2018-09-19T21:59:32.770Z", "reasonDetail": "Protected from arbitrary input" @@ -1785,7 +1698,7 @@ "rule": "jQuery-wrap(", "path": "libtextsecure/message_receiver.js", "line": " const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);", - "lineNumber": 794, + "lineNumber": 808, "reasonCategory": "falseMatch", "updated": "2018-09-19T18:13:29.628Z" }, @@ -1793,7 +1706,7 @@ "rule": "jQuery-wrap(", "path": "libtextsecure/message_receiver.js", "line": " const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);", - "lineNumber": 819, + "lineNumber": 833, "reasonCategory": "falseMatch", "updated": "2018-09-19T18:13:29.628Z" }, diff --git a/ts/util/lint/linter.ts b/ts/util/lint/linter.ts index 2ffe329d80..13db2f12da 100644 --- a/ts/util/lint/linter.ts +++ b/ts/util/lint/linter.ts @@ -52,6 +52,7 @@ const excludedFiles = [ // High-traffic files in our project '^js/views/conversation_view.js', '^js/views/file_input_view.js', + '^js/background.js', // Generated files '^js/components.js',