Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnonnenberg-signal committed Jan 29, 2019
1 parent 160d9f6 commit 589a66c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 110 deletions.
133 changes: 23 additions & 110 deletions ts/util/lint/exceptions.json
Expand Up @@ -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('<div class=\"dark-overlay\"></div>');",
"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('<div class=\"dark-overlay\"></div>');",
"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",
Expand Down Expand Up @@ -303,15 +207,15 @@
"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"
},
{
"rule": "jQuery-wrap(",
"path": "js/models/messages.js",
"line": " return wrap(",
"lineNumber": 1002,
"lineNumber": 1019,
"reasonCategory": "falseMatch",
"updated": "2018-10-05T23:12:28.961Z"
},
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -1466,17 +1370,26 @@
{
"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": "2019-01-24T18:23:20.631Z",
"reasonDetail": "Protected from arbitrary input"
},
{
"rule": "jQuery-$(",
"path": "js/views/settings_view.js",
"line": " el: this.$('.menu-bar-setting'),",
"lineNumber": 116,
"reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input"
},
{
"rule": "jQuery-$(",
"path": "js/views/settings_view.js",
"line": " el: this.$('.media-permissions'),",
"lineNumber": 116,
"lineNumber": 122,
"reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input"
Expand All @@ -1485,7 +1398,7 @@
"rule": "jQuery-$(",
"path": "js/views/settings_view.js",
"line": " this.$('.sync-setting').append(syncView.el);",
"lineNumber": 122,
"lineNumber": 128,
"reasonCategory": "usageTrusted",
"updated": "2018-09-19T21:59:32.770Z",
"reasonDetail": "Protected from arbitrary input"
Expand All @@ -1494,7 +1407,7 @@
"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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -1785,15 +1698,15 @@
"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"
},
{
"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"
},
Expand Down
1 change: 1 addition & 0 deletions ts/util/lint/linter.ts
Expand Up @@ -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',
Expand Down

0 comments on commit 589a66c

Please sign in to comment.