| 
									
										
										
										
											2019-12-16 23:53:01 +00:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2024-02-06 23:46:31 +00:00
										 |  |  |   "plugins": ["jest", "@typescript-eslint", "prettier", "unicorn"], | 
					
						
							|  |  |  |   "extends": ["plugin:unicorn/recommended", "plugin:github/recommended", "plugin:prettier/recommended"], | 
					
						
							| 
									
										
										
										
											2021-03-13 23:44:01 +00:00
										 |  |  |   "parser": "@typescript-eslint/parser", | 
					
						
							|  |  |  |   "parserOptions": { | 
					
						
							| 
									
										
										
										
											2022-04-11 22:43:41 +00:00
										 |  |  |     "ecmaVersion": 2020, | 
					
						
							|  |  |  |     "sourceType": "module", | 
					
						
							| 
									
										
										
										
											2024-02-06 23:46:31 +00:00
										 |  |  |     "extraFileExtensions": [".mjs"], | 
					
						
							| 
									
										
										
										
											2022-04-11 22:43:41 +00:00
										 |  |  |     "ecmaFeatures": { | 
					
						
							|  |  |  |       "impliedStrict": true | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     "project": "./tsconfig.json" | 
					
						
							| 
									
										
										
										
											2021-03-13 23:44:01 +00:00
										 |  |  |   }, | 
					
						
							| 
									
										
										
										
											2019-12-16 23:53:01 +00:00
										 |  |  |   "env": { | 
					
						
							|  |  |  |     "node": true, | 
					
						
							|  |  |  |     "es6": true, | 
					
						
							| 
									
										
										
										
											2021-03-13 23:44:01 +00:00
										 |  |  |     "jest/globals": true | 
					
						
							| 
									
										
										
										
											2019-12-16 23:53:01 +00:00
										 |  |  |   }, | 
					
						
							|  |  |  |   "rules": { | 
					
						
							| 
									
										
										
										
											2022-04-11 22:43:41 +00:00
										 |  |  |     // Error out for code formatting errors
 | 
					
						
							| 
									
										
										
										
											2019-12-22 14:05:15 +00:00
										 |  |  |     "prettier/prettier": "error", | 
					
						
							| 
									
										
										
										
											2022-04-11 22:43:41 +00:00
										 |  |  |     // Namespaces or sometimes needed
 | 
					
						
							| 
									
										
										
										
											2022-02-28 11:30:59 +00:00
										 |  |  |     "import/no-namespace": "off", | 
					
						
							| 
									
										
										
										
											2022-04-11 22:43:41 +00:00
										 |  |  |     // Properly format comments
 | 
					
						
							| 
									
										
										
										
											2024-02-06 23:46:31 +00:00
										 |  |  |     "spaced-comment": ["error", "always"], | 
					
						
							| 
									
										
										
										
											2022-04-11 22:43:41 +00:00
										 |  |  |     "lines-around-comment": [ | 
					
						
							|  |  |  |       "error", | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         "beforeBlockComment": true, | 
					
						
							|  |  |  |         "beforeLineComment": true, | 
					
						
							|  |  |  |         "allowBlockStart": true, | 
					
						
							|  |  |  |         "allowObjectStart": true, | 
					
						
							|  |  |  |         "allowArrayStart": true, | 
					
						
							|  |  |  |         "allowClassStart": true, | 
					
						
							|  |  |  |         "ignorePattern": "pragma|ts-ignore" | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     // Mandatory spacing
 | 
					
						
							|  |  |  |     "padding-line-between-statements": [ | 
					
						
							|  |  |  |       "error", | 
					
						
							| 
									
										
										
										
											2023-08-22 08:03:32 +00:00
										 |  |  |       { | 
					
						
							|  |  |  |         "blankLine": "always", | 
					
						
							|  |  |  |         "prev": "*", | 
					
						
							|  |  |  |         "next": "return" | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         "blankLine": "always", | 
					
						
							|  |  |  |         "prev": "directive", | 
					
						
							|  |  |  |         "next": "*" | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         "blankLine": "any", | 
					
						
							|  |  |  |         "prev": "directive", | 
					
						
							|  |  |  |         "next": "directive" | 
					
						
							|  |  |  |       } | 
					
						
							| 
									
										
										
										
											2022-04-11 22:43:41 +00:00
										 |  |  |     ], | 
					
						
							|  |  |  |     // Enforce camelCase
 | 
					
						
							|  |  |  |     "camelcase": "error", | 
					
						
							|  |  |  |     // Allow forOfStatements
 | 
					
						
							| 
									
										
										
										
											2024-02-06 23:46:31 +00:00
										 |  |  |     "no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"], | 
					
						
							| 
									
										
										
										
											2022-04-11 22:43:41 +00:00
										 |  |  |     // Continue is viable in forOf loops in generators
 | 
					
						
							|  |  |  |     "no-continue": "off", | 
					
						
							|  |  |  |     // From experience, named exports are almost always desired. I got tired of this rule
 | 
					
						
							|  |  |  |     "import/prefer-default-export": "off", | 
					
						
							|  |  |  |     // Unused vars are useful to keep method signatures consistent and documented
 | 
					
						
							|  |  |  |     "@typescript-eslint/no-unused-vars": "off", | 
					
						
							|  |  |  |     // For this project only use kebab-case
 | 
					
						
							| 
									
										
										
										
											2023-08-22 08:03:32 +00:00
										 |  |  |     "unicorn/filename-case": [ | 
					
						
							|  |  |  |       "error", | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         "cases": { | 
					
						
							|  |  |  |           "kebabCase": true | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
										
										
											2022-04-11 22:43:41 +00:00
										 |  |  |     // Allow Array.from(set) mitigate TS2569 which would require '--downlevelIteration'
 | 
					
						
							| 
									
										
										
										
											2023-08-22 08:03:32 +00:00
										 |  |  |     "unicorn/prefer-spread": "off", | 
					
						
							|  |  |  |     // Temp disable to prevent mixing changes with other PRs
 | 
					
						
							|  |  |  |     "i18n-text/no-en": "off" | 
					
						
							| 
									
										
										
										
											2025-06-11 14:56:27 +00:00
										 |  |  |   }, | 
					
						
							|  |  |  |   "overrides": [ | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       "files": ["jest.setup.js"], | 
					
						
							|  |  |  |       "rules": { | 
					
						
							|  |  |  |         "import/no-commonjs": "off" | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   ] | 
					
						
							| 
									
										
										
										
											2019-12-16 23:53:01 +00:00
										 |  |  | } |