Merge pull request #12448 from Snuffleupagus/eslint-no-debugger-alert
Enable the ESLint `no-debugger` and `no-alert` rules
This commit is contained in:
		
						commit
						10e7623123
					
				| @ -45,6 +45,7 @@ | |||||||
|     "no-async-promise-executor": "error", |     "no-async-promise-executor": "error", | ||||||
|     "no-cond-assign": ["error", "except-parens"], |     "no-cond-assign": ["error", "except-parens"], | ||||||
|     "no-constant-condition": ["error", { "checkLoops": false, }], |     "no-constant-condition": ["error", { "checkLoops": false, }], | ||||||
|  |     "no-debugger": "error", | ||||||
|     "no-dupe-args": "error", |     "no-dupe-args": "error", | ||||||
|     "no-dupe-else-if": "error", |     "no-dupe-else-if": "error", | ||||||
|     "no-dupe-keys": "error", |     "no-dupe-keys": "error", | ||||||
| @ -79,6 +80,7 @@ | |||||||
|     "dot-notation": "error", |     "dot-notation": "error", | ||||||
|     "eqeqeq": ["error", "always"], |     "eqeqeq": ["error", "always"], | ||||||
|     "grouped-accessor-pairs": ["error", "getBeforeSet"], |     "grouped-accessor-pairs": ["error", "getBeforeSet"], | ||||||
|  |     "no-alert": "error", | ||||||
|     "no-caller": "error", |     "no-caller": "error", | ||||||
|     "no-else-return": "error", |     "no-else-return": "error", | ||||||
|     "no-empty-pattern": "error", |     "no-empty-pattern": "error", | ||||||
|  | |||||||
| @ -19,6 +19,7 @@ | |||||||
|   }, |   }, | ||||||
| 
 | 
 | ||||||
|   "rules": { |   "rules": { | ||||||
|  |     "no-alert": "off", | ||||||
|     "object-shorthand": ["error", "never"] |     "object-shorthand": ["error", "never"] | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -1667,6 +1667,7 @@ const PDFViewerApplication = { | |||||||
|           "Warning: The PDF is not fully loaded for printing." |           "Warning: The PDF is not fully loaded for printing." | ||||||
|         ) |         ) | ||||||
|         .then(notReadyMessage => { |         .then(notReadyMessage => { | ||||||
|  |           // eslint-disable-next-line no-alert
 | ||||||
|           window.alert(notReadyMessage); |           window.alert(notReadyMessage); | ||||||
|         }); |         }); | ||||||
|       return; |       return; | ||||||
|  | |||||||
| @ -219,6 +219,7 @@ function requestAccessToLocalFile(fileUrl, overlayManager, callback) { | |||||||
|             "\nSelected: " + |             "\nSelected: " + | ||||||
|             file.name + |             file.name + | ||||||
|             "\nDo you want to open the selected file?"; |             "\nDo you want to open the selected file?"; | ||||||
|  |           // eslint-disable-next-line no-alert
 | ||||||
|           if (!confirm(msg)) { |           if (!confirm(msg)) { | ||||||
|             this.value = ""; |             this.value = ""; | ||||||
|             return; |             return; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user