| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  | /* eslint-env node */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module.exports = { | 
					
						
							| 
									
										
										
										
											2023-01-13 20:43:55 +00:00
										 |  |  |   plugins: [ | 
					
						
							|  |  |  |     '@typescript-eslint', | 
					
						
							|  |  |  |     'wc', | 
					
						
							|  |  |  |     'lit', | 
					
						
							|  |  |  |     'lit-a11y', | 
					
						
							|  |  |  |     'chai-expect', | 
					
						
							|  |  |  |     'chai-friendly', | 
					
						
							|  |  |  |     'import', | 
					
						
							|  |  |  |     'sort-imports-es6-autofix' | 
					
						
							|  |  |  |   ], | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |   extends: [ | 
					
						
							|  |  |  |     'eslint:recommended', | 
					
						
							|  |  |  |     'plugin:wc/recommended', | 
					
						
							|  |  |  |     'plugin:wc/best-practice', | 
					
						
							|  |  |  |     'plugin:lit/recommended', | 
					
						
							|  |  |  |     'plugin:lit-a11y/recommended' | 
					
						
							|  |  |  |   ], | 
					
						
							|  |  |  |   env: { | 
					
						
							|  |  |  |     es2021: true, | 
					
						
							|  |  |  |     browser: true | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   parserOptions: { | 
					
						
							|  |  |  |     sourceType: 'module' | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   overrides: [ | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       extends: [ | 
					
						
							|  |  |  |         'plugin:@typescript-eslint/eslint-recommended', | 
					
						
							|  |  |  |         'plugin:@typescript-eslint/recommended', | 
					
						
							|  |  |  |         'plugin:@typescript-eslint/recommended-requiring-type-checking' | 
					
						
							|  |  |  |       ], | 
					
						
							|  |  |  |       parser: '@typescript-eslint/parser', | 
					
						
							|  |  |  |       parserOptions: { | 
					
						
							|  |  |  |         sourceType: 'module', | 
					
						
							|  |  |  |         project: './tsconfig.json', | 
					
						
							|  |  |  |         tsconfigRootDir: __dirname | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |       files: ['*.ts'], | 
					
						
							|  |  |  |       rules: { | 
					
						
							|  |  |  |         'default-param-last': 'off', | 
					
						
							|  |  |  |         '@typescript-eslint/default-param-last': 'error', | 
					
						
							|  |  |  |         'no-empty-function': 'off', | 
					
						
							|  |  |  |         '@typescript-eslint/no-empty-function': 'warn', | 
					
						
							|  |  |  |         'no-implied-eval': 'off', | 
					
						
							|  |  |  |         '@typescript-eslint/no-implied-eval': 'error', | 
					
						
							|  |  |  |         'no-invalid-this': 'off', | 
					
						
							|  |  |  |         '@typescript-eslint/no-invalid-this': 'error', | 
					
						
							|  |  |  |         'no-shadow': 'off', | 
					
						
							|  |  |  |         '@typescript-eslint/no-shadow': 'error', | 
					
						
							|  |  |  |         'no-throw-literal': 'off', | 
					
						
							|  |  |  |         '@typescript-eslint/no-throw-literal': 'error', | 
					
						
							|  |  |  |         'no-unused-expressions': 'off', | 
					
						
							|  |  |  |         '@typescript-eslint/prefer-regexp-exec': 'off', | 
					
						
							|  |  |  |         '@typescript-eslint/no-unused-expressions': 'error', | 
					
						
							|  |  |  |         '@typescript-eslint/unbound-method': 'off', | 
					
						
							|  |  |  |         '@typescript-eslint/no-non-null-assertion': 'off', | 
					
						
							| 
									
										
										
										
											2022-01-17 04:44:10 +00:00
										 |  |  |         '@typescript-eslint/no-floating-promises': 'off', | 
					
						
							|  |  |  |         '@typescript-eslint/no-misused-promises': [ | 
					
						
							|  |  |  |           'error', | 
					
						
							|  |  |  |           { | 
					
						
							|  |  |  |             checksVoidReturn: false | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |         ], | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |         '@typescript-eslint/consistent-type-assertions': [ | 
					
						
							|  |  |  |           'warn', | 
					
						
							|  |  |  |           { | 
					
						
							|  |  |  |             assertionStyle: 'as', | 
					
						
							|  |  |  |             objectLiteralTypeAssertions: 'never' | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |         ], | 
					
						
							|  |  |  |         '@typescript-eslint/consistent-type-imports': 'warn', | 
					
						
							|  |  |  |         '@typescript-eslint/no-base-to-string': 'error', | 
					
						
							|  |  |  |         '@typescript-eslint/no-confusing-non-null-assertion': 'error', | 
					
						
							|  |  |  |         '@typescript-eslint/no-invalid-void-type': 'error', | 
					
						
							|  |  |  |         '@typescript-eslint/no-require-imports': 'error', | 
					
						
							|  |  |  |         '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn', | 
					
						
							| 
									
										
										
										
											2022-03-02 17:19:59 +00:00
										 |  |  |         '@typescript-eslint/no-unnecessary-condition': 'off', | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |         '@typescript-eslint/no-unnecessary-qualifier': 'warn', | 
					
						
							|  |  |  |         '@typescript-eslint/non-nullable-type-assertion-style': 'warn', | 
					
						
							|  |  |  |         '@typescript-eslint/prefer-for-of': 'warn', | 
					
						
							|  |  |  |         '@typescript-eslint/prefer-optional-chain': 'warn', | 
					
						
							|  |  |  |         '@typescript-eslint/prefer-ts-expect-error': 'warn', | 
					
						
							|  |  |  |         '@typescript-eslint/prefer-return-this-type': 'error', | 
					
						
							|  |  |  |         '@typescript-eslint/prefer-string-starts-ends-with': 'warn', | 
					
						
							|  |  |  |         '@typescript-eslint/require-array-sort-compare': 'error', | 
					
						
							|  |  |  |         '@typescript-eslint/unified-signatures': 'warn', | 
					
						
							|  |  |  |         '@typescript-eslint/array-type': 'warn', | 
					
						
							|  |  |  |         '@typescript-eslint/consistent-type-definitions': ['warn', 'interface'], | 
					
						
							|  |  |  |         '@typescript-eslint/member-delimiter-style': 'warn', | 
					
						
							|  |  |  |         '@typescript-eslint/method-signature-style': 'warn', | 
					
						
							|  |  |  |         '@typescript-eslint/no-extraneous-class': 'error', | 
					
						
							| 
									
										
										
										
											2023-07-12 15:12:15 +00:00
										 |  |  |         '@typescript-eslint/no-redundant-type-constituents': 'off', | 
					
						
							|  |  |  |         '@typescript-eslint/parameter-properties': 'error', | 
					
						
							| 
									
										
										
										
											2022-01-19 14:37:07 +00:00
										 |  |  |         '@typescript-eslint/strict-boolean-expressions': 'off' | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |       } | 
					
						
							|  |  |  |     }, | 
					
						
							| 
									
										
										
										
											2023-06-06 12:18:44 +00:00
										 |  |  |     { | 
					
						
							|  |  |  |       files: ['**/*.cjs'], | 
					
						
							|  |  |  |       env: { | 
					
						
							|  |  |  |         node: true | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     }, | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |     { | 
					
						
							|  |  |  |       extends: ['plugin:chai-expect/recommended', 'plugin:chai-friendly/recommended'], | 
					
						
							|  |  |  |       files: ['*.test.ts'], | 
					
						
							|  |  |  |       rules: { | 
					
						
							| 
									
										
										
										
											2022-03-24 12:23:58 +00:00
										 |  |  |         '@typescript-eslint/no-unsafe-call': 'off', | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |         '@typescript-eslint/no-unused-expressions': 'off' | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   ], | 
					
						
							|  |  |  |   rules: { | 
					
						
							|  |  |  |     'no-template-curly-in-string': 'error', | 
					
						
							|  |  |  |     'array-callback-return': 'error', | 
					
						
							| 
									
										
										
										
											2022-04-15 13:28:09 +00:00
										 |  |  |     'comma-dangle': 'off', | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |     'consistent-return': 'error', | 
					
						
							| 
									
										
										
										
											2022-01-19 14:37:07 +00:00
										 |  |  |     curly: 'off', | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |     'default-param-last': 'error', | 
					
						
							|  |  |  |     eqeqeq: 'error', | 
					
						
							| 
									
										
										
										
											2022-11-09 18:18:05 +00:00
										 |  |  |     'lit-a11y/click-events-have-key-events': 'off', | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |     'no-constructor-return': 'error', | 
					
						
							|  |  |  |     'no-empty-function': 'warn', | 
					
						
							|  |  |  |     'no-eval': 'error', | 
					
						
							|  |  |  |     'no-extend-native': 'error', | 
					
						
							|  |  |  |     'no-extra-bind': 'error', | 
					
						
							|  |  |  |     'no-floating-decimal': 'error', | 
					
						
							| 
									
										
										
										
											2022-01-19 14:37:07 +00:00
										 |  |  |     'no-implicit-coercion': 'off', | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |     'no-implicit-globals': 'error', | 
					
						
							|  |  |  |     'no-implied-eval': 'error', | 
					
						
							|  |  |  |     'no-invalid-this': 'error', | 
					
						
							|  |  |  |     'no-labels': 'error', | 
					
						
							|  |  |  |     'no-lone-blocks': 'error', | 
					
						
							|  |  |  |     'no-new': 'error', | 
					
						
							|  |  |  |     'no-new-func': 'error', | 
					
						
							|  |  |  |     'no-new-wrappers': 'error', | 
					
						
							|  |  |  |     'no-octal-escape': 'error', | 
					
						
							|  |  |  |     'no-proto': 'error', | 
					
						
							|  |  |  |     'no-return-assign': 'warn', | 
					
						
							|  |  |  |     'no-script-url': 'error', | 
					
						
							|  |  |  |     'no-self-compare': 'warn', | 
					
						
							|  |  |  |     'no-sequences': 'warn', | 
					
						
							|  |  |  |     'no-throw-literal': 'error', | 
					
						
							|  |  |  |     'no-unmodified-loop-condition': 'error', | 
					
						
							|  |  |  |     'no-unused-expressions': 'warn', | 
					
						
							|  |  |  |     'no-useless-call': 'error', | 
					
						
							|  |  |  |     'no-useless-concat': 'error', | 
					
						
							|  |  |  |     'no-useless-return': 'warn', | 
					
						
							|  |  |  |     'prefer-promise-reject-errors': 'error', | 
					
						
							| 
									
										
										
										
											2022-04-06 13:09:52 +00:00
										 |  |  |     radix: 'off', | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |     'require-await': 'error', | 
					
						
							|  |  |  |     'wrap-iife': ['warn', 'inside'], | 
					
						
							|  |  |  |     'no-shadow': 'error', | 
					
						
							|  |  |  |     'no-array-constructor': 'error', | 
					
						
							|  |  |  |     'no-bitwise': 'error', | 
					
						
							|  |  |  |     'no-multi-assign': 'warn', | 
					
						
							|  |  |  |     'no-new-object': 'error', | 
					
						
							|  |  |  |     'no-useless-computed-key': 'warn', | 
					
						
							|  |  |  |     'no-useless-rename': 'warn', | 
					
						
							|  |  |  |     'no-var': 'error', | 
					
						
							|  |  |  |     'prefer-const': 'warn', | 
					
						
							|  |  |  |     'prefer-numeric-literals': 'warn', | 
					
						
							|  |  |  |     'prefer-object-spread': 'warn', | 
					
						
							|  |  |  |     'prefer-rest-params': 'warn', | 
					
						
							|  |  |  |     'prefer-spread': 'warn', | 
					
						
							| 
									
										
										
										
											2022-11-10 20:26:10 +00:00
										 |  |  |     'prefer-template': 'off', | 
					
						
							| 
									
										
										
										
											2022-12-28 16:42:08 +00:00
										 |  |  |     'no-else-return': 'off', | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |     'func-names': ['warn', 'never'], | 
					
						
							|  |  |  |     'one-var': ['warn', 'never'], | 
					
						
							|  |  |  |     'operator-assignment': 'warn', | 
					
						
							|  |  |  |     'prefer-arrow-callback': 'warn', | 
					
						
							| 
									
										
										
										
											2022-03-02 14:28:34 +00:00
										 |  |  |     'no-restricted-imports': [ | 
					
						
							|  |  |  |       'warn', | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         paths: [ | 
					
						
							| 
									
										
										
										
											2022-03-24 11:48:03 +00:00
										 |  |  |           { | 
					
						
							|  |  |  |             name: '.', | 
					
						
							|  |  |  |             message: 'Usage of local index imports is not allowed.' | 
					
						
							|  |  |  |           }, | 
					
						
							| 
									
										
										
										
											2022-03-02 14:28:34 +00:00
										 |  |  |           { | 
					
						
							|  |  |  |             name: './index', | 
					
						
							|  |  |  |             message: 'Import from the source file instead.' | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |         ] | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
										
										
											2023-06-22 14:56:24 +00:00
										 |  |  |     'import/extensions': [ | 
					
						
							|  |  |  |       'error', | 
					
						
							|  |  |  |       'always', | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         ignorePackages: true, | 
					
						
							|  |  |  |         pattern: { | 
					
						
							|  |  |  |           js: 'always', | 
					
						
							|  |  |  |           ts: 'never' | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     ], | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |     'import/no-duplicates': 'warn', | 
					
						
							| 
									
										
										
										
											2023-01-13 20:43:55 +00:00
										 |  |  |     'sort-imports-es6-autofix/sort-imports-es6': [ | 
					
						
							|  |  |  |       2, | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |       { | 
					
						
							| 
									
										
										
										
											2023-01-13 20:43:55 +00:00
										 |  |  |         ignoreCase: true, | 
					
						
							|  |  |  |         ignoreMemberSort: false, | 
					
						
							|  |  |  |         memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'] | 
					
						
							| 
									
										
										
										
											2022-01-16 05:47:14 +00:00
										 |  |  |       } | 
					
						
							|  |  |  |     ], | 
					
						
							|  |  |  |     'wc/guard-super-call': 'off' | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | }; |