Просмотр исходного кода

Merge pull request #3490 from overleaf/as-remove-eslint-disables

Remove empty eslint disable comments

GitOrigin-RevId: 5a0f3a5a9e4f20fdd8138ecc8c929a7587ccef66
Alasdair Smith 5 лет назад
Родитель
Сommit
d487ffea5c
23 измененных файлов с 19 добавлено и 64 удалено
  1. 1 3
      services/web/frontend/js/directives/equals.js
  2. 1 3
      services/web/frontend/js/directives/expandableTextArea.js
  3. 6 8
      services/web/frontend/js/directives/fineUpload.js
  4. 1 3
      services/web/frontend/js/directives/maxHeight.js
  5. 1 3
      services/web/frontend/js/directives/onEnter.js
  6. 1 3
      services/web/frontend/js/directives/rightClick.js
  7. 1 3
      services/web/frontend/js/filters/formatDate.js
  8. 0 2
      services/web/frontend/js/ide/clone/index.js
  9. 0 2
      services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/snippets/Environments.js
  10. 0 2
      services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/snippets/TopHundredSnippets.js
  11. 1 3
      services/web/frontend/js/ide/file-tree/directives/draggable.js
  12. 1 3
      services/web/frontend/js/ide/file-tree/directives/droppable.js
  13. 3 4
      services/web/frontend/js/ide/history/components/historyFileTree.js
  14. 0 2
      services/web/frontend/js/ide/hotkeys/index.js
  15. 0 2
      services/web/frontend/js/ide/review-panel/ReviewPanelManager.js
  16. 0 2
      services/web/frontend/js/ide/review-panel/filters/notEmpty.js
  17. 1 3
      services/web/frontend/js/ide/review-panel/filters/numKeys.js
  18. 1 3
      services/web/frontend/js/ide/review-panel/filters/orderOverviewEntries.js
  19. 0 2
      services/web/frontend/js/ide/settings/index.js
  20. 0 2
      services/web/frontend/js/ide/wordcount/index.js
  21. 0 2
      services/web/frontend/js/main/keys.js
  22. 0 2
      services/web/frontend/js/main/project-list/index.js
  23. 0 2
      services/web/frontend/js/main/scribtex-popup.js

+ 1 - 3
services/web/frontend/js/directives/equals.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*
@@ -14,7 +12,7 @@ export default App.directive('equals', () => ({
   link(scope, elem, attrs, ctrl) {
     const firstField = `#${attrs.equals}`
     return elem.add(firstField).on('keyup', () =>
-      scope.$apply(function () {
+      scope.$apply(function() {
         const equal = elem.val() === $(firstField).val()
         return ctrl.$setValidity('areEqual', equal)
       })

+ 1 - 3
services/web/frontend/js/directives/expandableTextArea.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*
@@ -12,7 +10,7 @@ import App from '../base'
 export default App.directive('expandableTextArea', () => ({
   restrict: 'A',
   link(scope, el) {
-    const resetHeight = function () {
+    const resetHeight = function() {
       const curHeight = el.outerHeight()
       const fitHeight = el.prop('scrollHeight')
       // clear height if text area is empty

+ 6 - 8
services/web/frontend/js/directives/fineUpload.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*
@@ -42,12 +40,12 @@ export default App.directive('fineUpload', $timeout => ({
       validation.sizeLimit = scope.sizeLimit
     }
     const maxConnections = scope.maxConnections || 1
-    const onComplete = scope.onCompleteCallback || function () {}
-    const onUpload = scope.onUploadCallback || function () {}
-    const onError = scope.onErrorCallback || function () {}
-    const onValidateBatch = scope.onValidateBatch || function () {}
-    const onSubmit = scope.onSubmitCallback || function () {}
-    const onCancel = scope.onCancelCallback || function () {}
+    const onComplete = scope.onCompleteCallback || function() {}
+    const onUpload = scope.onUploadCallback || function() {}
+    const onError = scope.onErrorCallback || function() {}
+    const onValidateBatch = scope.onValidateBatch || function() {}
+    const onSubmit = scope.onSubmitCallback || function() {}
+    const onCancel = scope.onCancelCallback || function() {}
     if (scope.autoUpload == null) {
       autoUpload = true
     } else {

+ 1 - 3
services/web/frontend/js/directives/maxHeight.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*
@@ -13,7 +11,7 @@ import App from '../base'
 export default App.directive('maxHeight', () => ({
   restrict: 'A',
   link(scope, element, attrs) {
-    return scope.$watch(attrs.maxHeight, function (value) {
+    return scope.$watch(attrs.maxHeight, function(value) {
       if (value != null) {
         return element.css({ 'max-height': value })
       }

+ 1 - 3
services/web/frontend/js/directives/onEnter.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*
@@ -10,7 +8,7 @@
 import App from '../base'
 
 export default App.directive('onEnter', () => (scope, element, attrs) =>
-  element.bind('keydown keypress', function (event) {
+  element.bind('keydown keypress', function(event) {
     if (event.which === 13) {
       scope.$apply(() => scope.$eval(attrs.onEnter, { event }))
       return event.preventDefault()

+ 1 - 3
services/web/frontend/js/directives/rightClick.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*
@@ -12,7 +10,7 @@ import App from '../base'
 export default App.directive('rightClick', () => ({
   restrict: 'A',
   link(scope, element, attrs) {
-    return element.bind('contextmenu', function (e) {
+    return element.bind('contextmenu', function(e) {
       e.preventDefault()
       e.stopPropagation()
       return scope.$eval(attrs.rightClick)

+ 1 - 3
services/web/frontend/js/filters/formatDate.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*
@@ -24,7 +22,7 @@ moment.updateLocale('en', {
 App.filter(
   'formatDate',
   () =>
-    function (date, format) {
+    function(date, format) {
       if (!date) return 'N/A'
       if (format == null) {
         format = 'Do MMM YYYY, h:mm a'

+ 0 - 2
services/web/frontend/js/ide/clone/index.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 import './controllers/CloneProjectController'

+ 0 - 2
services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/snippets/Environments.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 const envs = [

+ 0 - 2
services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/snippets/TopHundredSnippets.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*

+ 1 - 3
services/web/frontend/js/ide/file-tree/directives/draggable.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*
@@ -11,7 +9,7 @@ import App from '../../../base'
 
 export default App.directive('draggable', () => ({
   link(scope, element, attrs) {
-    return scope.$watch(attrs.draggable, function (draggable) {
+    return scope.$watch(attrs.draggable, function(draggable) {
       if (draggable) {
         return element.draggable({
           delay: 250,

+ 1 - 3
services/web/frontend/js/ide/file-tree/directives/droppable.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*
@@ -11,7 +9,7 @@ import App from '../../../base'
 
 export default App.directive('droppable', () => ({
   link(scope, element, attrs) {
-    return scope.$watch(attrs.droppable, function (droppable) {
+    return scope.$watch(attrs.droppable, function(droppable) {
       if (droppable) {
         return element.droppable({
           greedy: true,

+ 3 - 4
services/web/frontend/js/ide/history/components/historyFileTree.js

@@ -1,6 +1,5 @@
 import _ from 'lodash'
-/* eslint-disable
- */
+
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*
@@ -9,12 +8,12 @@ import _ from 'lodash'
  * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
  */
 import App from '../../../base'
-const historyFileTreeController = function ($scope, $element, $attrs) {
+const historyFileTreeController = function($scope, $element, $attrs) {
   const ctrl = this
   ctrl.handleEntityClick = file => ctrl.onSelectedFileChange({ file })
   ctrl._fileTree = []
 
-  $scope.$watch('$ctrl.files', function (files) {
+  $scope.$watch('$ctrl.files', function(files) {
     if (files != null && files.length > 0) {
       ctrl._fileTree = _.reduce(files, _reducePathsToTree, [])
     }

+ 0 - 2
services/web/frontend/js/ide/hotkeys/index.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 import './BackspaceHighjack'

+ 0 - 2
services/web/frontend/js/ide/review-panel/ReviewPanelManager.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 import './controllers/ReviewPanelController'

+ 0 - 2
services/web/frontend/js/ide/review-panel/filters/notEmpty.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*

+ 1 - 3
services/web/frontend/js/ide/review-panel/filters/numKeys.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*
@@ -13,7 +11,7 @@ import App from '../../../base'
 export default App.filter(
   'numKeys',
   () =>
-    function (object) {
+    function(object) {
       if (object != null) {
         return Object.keys(object).length
       } else {

+ 1 - 3
services/web/frontend/js/ide/review-panel/filters/orderOverviewEntries.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*
@@ -12,7 +10,7 @@ import App from '../../../base'
 export default App.filter(
   'orderOverviewEntries',
   () =>
-    function (items) {
+    function(items) {
       const array = []
       for (let key in items) {
         const value = items[key]

+ 0 - 2
services/web/frontend/js/ide/settings/index.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 import './services/settings'

+ 0 - 2
services/web/frontend/js/ide/wordcount/index.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 import './controllers/WordCountController'

+ 0 - 2
services/web/frontend/js/main/keys.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*

+ 0 - 2
services/web/frontend/js/main/project-list/index.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 import './project-list'

+ 0 - 2
services/web/frontend/js/main/scribtex-popup.js

@@ -1,5 +1,3 @@
-/* eslint-disable
- */
 // TODO: This file was created by bulk-decaffeinate.
 // Fix any style issues and re-enable lint.
 /*