Merge pull request #11354 from Snuffleupagus/eslint-more-rules
Enable the `getter-return`, `no-dupe-else-if`, and `no-setter-return` ESLint rules
This commit is contained in:
		
						commit
						827eb64b75
					
				| @ -35,10 +35,12 @@ | |||||||
| 
 | 
 | ||||||
|     // Possible errors |     // Possible errors | ||||||
|     "for-direction": "error", |     "for-direction": "error", | ||||||
|  |     "getter-return": "error", | ||||||
|     "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-dupe-args": "error", |     "no-dupe-args": "error", | ||||||
|  |     "no-dupe-else-if": "error", | ||||||
|     "no-dupe-keys": "error", |     "no-dupe-keys": "error", | ||||||
|     "no-duplicate-case": "error", |     "no-duplicate-case": "error", | ||||||
|     "no-empty": ["error", { "allowEmptyCatch": true, }], |     "no-empty": ["error", { "allowEmptyCatch": true, }], | ||||||
| @ -51,6 +53,7 @@ | |||||||
|     "no-irregular-whitespace": "error", |     "no-irregular-whitespace": "error", | ||||||
|     "no-obj-calls": "error", |     "no-obj-calls": "error", | ||||||
|     "no-regex-spaces": "error", |     "no-regex-spaces": "error", | ||||||
|  |     "no-setter-return": "error", | ||||||
|     "no-sparse-arrays": "error", |     "no-sparse-arrays": "error", | ||||||
|     "no-unexpected-multiline": "error", |     "no-unexpected-multiline": "error", | ||||||
|     "no-unreachable": "error", |     "no-unreachable": "error", | ||||||
|  | |||||||
| @ -72,6 +72,7 @@ scroll_horizontal_label=অনুভূমিক স্ক্রলিং | |||||||
| scroll_wrapped.title=Wrapped স্ক্রোলিং ব্যবহার করুন | scroll_wrapped.title=Wrapped স্ক্রোলিং ব্যবহার করুন | ||||||
| scroll_wrapped_label=Wrapped স্ক্রোলিং | scroll_wrapped_label=Wrapped স্ক্রোলিং | ||||||
| 
 | 
 | ||||||
|  | spread_none.title=পেজ স্প্রেডগুলোতে যোগদান করবেন না | ||||||
| spread_none_label=Spreads নেই | spread_none_label=Spreads নেই | ||||||
| spread_odd_label=বিজোড় Spreads | spread_odd_label=বিজোড় Spreads | ||||||
| spread_even_label=জোড় Spreads | spread_even_label=জোড় Spreads | ||||||
|  | |||||||
| @ -145,7 +145,7 @@ attachments.title=Monstrar le annexos | |||||||
| attachments_label=Annexos | attachments_label=Annexos | ||||||
| thumbs.title=Monstrar le vignettes | thumbs.title=Monstrar le vignettes | ||||||
| thumbs_label=Vignettes | thumbs_label=Vignettes | ||||||
| findbar.title=Recercar in le documento | findbar.title=Cercar in le documento | ||||||
| findbar_label=Cercar | findbar_label=Cercar | ||||||
| 
 | 
 | ||||||
| # Thumbnails panel item (tooltip and alt text for images) | # Thumbnails panel item (tooltip and alt text for images) | ||||||
|  | |||||||
| @ -166,10 +166,17 @@ find_reached_bottom=दस्तऐवजाच्या तळाला पो | |||||||
| # index of the currently active find result, respectively a number representing | # index of the currently active find result, respectively a number representing | ||||||
| # the total number of matches in the document. | # the total number of matches in the document. | ||||||
| find_match_count={[ plural(total) ]} | find_match_count={[ plural(total) ]} | ||||||
|  | find_match_count[one]={{total}} पैकी {{current}} सुसंगत | ||||||
|  | find_match_count[two]={{total}} पैकी {{current}} सुसंगत | ||||||
|  | find_match_count[few]={{total}} पैकी {{current}} सुसंगत | ||||||
|  | find_match_count[many]={{total}} पैकी {{current}} सुसंगत | ||||||
|  | find_match_count[other]={{total}} पैकी {{current}} सुसंगत | ||||||
| # LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are | # LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are | ||||||
| # [zero|one|two|few|many|other], with [other] as the default value. | # [zero|one|two|few|many|other], with [other] as the default value. | ||||||
| # "{{limit}}" will be replaced by a numerical value. | # "{{limit}}" will be replaced by a numerical value. | ||||||
|  | find_match_count_limit={[ plural(limit) ]} | ||||||
| find_match_count_limit[zero]={{limit}} पेक्षा अधिक जुळण्या | find_match_count_limit[zero]={{limit}} पेक्षा अधिक जुळण्या | ||||||
|  | find_match_count_limit[one]={{limit}} पेक्षा अधिक जुळण्या | ||||||
| find_match_count_limit[two]={{limit}} पेक्षा अधिक जुळण्या | find_match_count_limit[two]={{limit}} पेक्षा अधिक जुळण्या | ||||||
| find_match_count_limit[few]={{limit}} पेक्षा अधिक जुळण्या | find_match_count_limit[few]={{limit}} पेक्षा अधिक जुळण्या | ||||||
| find_match_count_limit[many]={{limit}} पेक्षा अधिक जुळण्या | find_match_count_limit[many]={{limit}} पेक्षा अधिक जुळण्या | ||||||
| @ -211,6 +218,10 @@ invalid_file_error=अवैध किंवा दोषीत PDF फाइल | |||||||
| missing_file_error=न आढळणारी PDF फाइल. | missing_file_error=न आढळणारी PDF फाइल. | ||||||
| unexpected_response_error=अनपेक्षित सर्व्हर प्रतिसाद. | unexpected_response_error=अनपेक्षित सर्व्हर प्रतिसाद. | ||||||
| 
 | 
 | ||||||
|  | # LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be | ||||||
|  | # replaced by the modification date, and time, of the annotation. | ||||||
|  | annotation_date_string={{date}}, {{time}} | ||||||
|  | 
 | ||||||
| # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. | # LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip. | ||||||
| # "{{type}}" will be replaced with an annotation type from a list defined in | # "{{type}}" will be replaced with an annotation type from a list defined in | ||||||
| # the PDF spec (32000-1:2008 Table 169 – Annotation types). | # the PDF spec (32000-1:2008 Table 169 – Annotation types). | ||||||
|  | |||||||
| @ -72,11 +72,11 @@ scroll_horizontal_label=Deslocação horizontal | |||||||
| scroll_wrapped.title=Utilizar deslocação encapsulada | scroll_wrapped.title=Utilizar deslocação encapsulada | ||||||
| scroll_wrapped_label=Deslocação encapsulada | scroll_wrapped_label=Deslocação encapsulada | ||||||
| 
 | 
 | ||||||
| spread_none.title=Não juntar spreads de páginas | spread_none.title=Não juntar páginas dispersas | ||||||
| spread_none_label=Sem spreads | spread_none_label=Sem spreads | ||||||
| spread_odd.title=Juntar spreads de páginas a partir de páginas com números ímpares | spread_odd.title=Juntar páginas dispersas a partir de páginas com números ímpares | ||||||
| spread_odd_label=Spreads ímpares | spread_odd_label=Spreads ímpares | ||||||
| spread_even.title=Juntar spreads de páginas a partir de páginas com números pares | spread_even.title=Juntar páginas dispersas a partir de páginas com números pares | ||||||
| spread_even_label=Spreads pares | spread_even_label=Spreads pares | ||||||
| 
 | 
 | ||||||
| # Document properties dialog box | # Document properties dialog box | ||||||
|  | |||||||
							
								
								
									
										1328
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1328
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										20
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								package.json
									
									
									
									
									
								
							| @ -2,23 +2,23 @@ | |||||||
|   "name": "pdf.js", |   "name": "pdf.js", | ||||||
|   "version": "2.0.0", |   "version": "2.0.0", | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "@babel/core": "^7.7.2", |     "@babel/core": "^7.7.4", | ||||||
|     "@babel/plugin-transform-modules-commonjs": "^7.7.0", |     "@babel/plugin-transform-modules-commonjs": "^7.7.4", | ||||||
|     "@babel/plugin-transform-runtime": "^7.6.2", |     "@babel/plugin-transform-runtime": "^7.7.4", | ||||||
|     "@babel/preset-env": "^7.7.1", |     "@babel/preset-env": "^7.7.4", | ||||||
|     "@babel/runtime": "^7.7.2", |     "@babel/runtime": "^7.7.4", | ||||||
|     "acorn": "^6.3.0", |     "acorn": "^6.3.0", | ||||||
|     "autoprefixer": "^9.7.1", |     "autoprefixer": "^9.7.2", | ||||||
|     "babel-loader": "^8.0.6", |     "babel-loader": "^8.0.6", | ||||||
|     "canvas": "^2.6.0", |     "canvas": "^2.6.0", | ||||||
|     "core-js": "^3.4.0", |     "core-js": "^3.4.2", | ||||||
|     "escodegen": "^1.12.0", |     "escodegen": "^1.12.0", | ||||||
|     "eslint": "^6.6.0", |     "eslint": "^6.7.0", | ||||||
|     "eslint-config-prettier": "^6.5.0", |     "eslint-config-prettier": "^6.7.0", | ||||||
|     "eslint-plugin-fetch-options": "^0.0.5", |     "eslint-plugin-fetch-options": "^0.0.5", | ||||||
|     "eslint-plugin-html": "^6.0.0", |     "eslint-plugin-html": "^6.0.0", | ||||||
|     "eslint-plugin-import": "^2.18.2", |     "eslint-plugin-import": "^2.18.2", | ||||||
|     "eslint-plugin-mozilla": "^2.2.0", |     "eslint-plugin-mozilla": "^2.3.0", | ||||||
|     "eslint-plugin-no-unsanitized": "^3.0.2", |     "eslint-plugin-no-unsanitized": "^3.0.2", | ||||||
|     "eslint-plugin-prettier": "^3.1.1", |     "eslint-plugin-prettier": "^3.1.1", | ||||||
|     "eslint-plugin-unicorn": "^10.0.0", |     "eslint-plugin-unicorn": "^10.0.0", | ||||||
|  | |||||||
| @ -394,7 +394,7 @@ class IdentityCMap extends CMap { | |||||||
|     return 0x10000; |     return 0x10000; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   get isIdentityCMap() { |   get isIdentityCMap() { // eslint-disable-line getter-return
 | ||||||
|     unreachable('should not access .isIdentityCMap'); |     unreachable('should not access .isIdentityCMap'); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -106,15 +106,15 @@ class BaseFontLoader { | |||||||
|     unreachable('Abstract method `_queueLoadingCallback`.'); |     unreachable('Abstract method `_queueLoadingCallback`.'); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   get isFontLoadingAPISupported() { |   get isFontLoadingAPISupported() { // eslint-disable-line getter-return
 | ||||||
|     unreachable('Abstract method `isFontLoadingAPISupported`.'); |     unreachable('Abstract method `isFontLoadingAPISupported`.'); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   get isSyncFontLoadingSupported() { |   get isSyncFontLoadingSupported() { // eslint-disable-line getter-return
 | ||||||
|     unreachable('Abstract method `isSyncFontLoadingSupported`.'); |     unreachable('Abstract method `isSyncFontLoadingSupported`.'); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   get _loadTestFont() { |   get _loadTestFont() { // eslint-disable-line getter-return
 | ||||||
|     unreachable('Abstract method `_loadTestFont`.'); |     unreachable('Abstract method `_loadTestFont`.'); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -12,6 +12,7 @@ | |||||||
|  * See the License for the specific language governing permissions and |  * See the License for the specific language governing permissions and | ||||||
|  * limitations under the License. |  * limitations under the License. | ||||||
|  */ |  */ | ||||||
|  | /* eslint-disable getter-return */ | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * @interface |  * @interface | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user