@@ -39,34 +39,68 @@ module.exports = [
3939 'prettier/prettier' : 'error' ,
4040 'no-trailing-spaces' : 'error' ,
4141 'no-multiple-empty-lines' : [ 'error' , { max : 1 , maxEOF : 0 } ] ,
42+ 'eol-last' : [ 'error' , 'always' ] ,
4243
43- // TypeScript Rules
44+ // TypeScript Rules - Base
4445 ...typescript . configs [ 'eslint-recommended' ] . overrides [ 0 ] . rules ,
4546 ...typescript . configs . recommended . rules ,
4647 '@typescript-eslint/no-unsafe-assignment' : 'warn' ,
4748 '@typescript-eslint/no-unsafe-member-access' : 'warn' ,
4849 '@typescript-eslint/no-unsafe-return' : 'warn' ,
50+ '@typescript-eslint/no-unsafe-call' : 'warn' ,
4951 '@typescript-eslint/no-floating-promises' : 'error' ,
5052 '@typescript-eslint/no-unnecessary-type-assertion' : 'error' ,
5153 '@typescript-eslint/no-explicit-any' : 'warn' ,
5254 '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
5355
56+ // TypeScript Rules - Additional Strict Rules
57+ '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' , varsIgnorePattern : '^_' } ] ,
58+ '@typescript-eslint/no-unused-expressions' : 'error' ,
59+ '@typescript-eslint/no-empty-function' : 'warn' ,
60+ '@typescript-eslint/prefer-nullish-coalescing' : 'error' ,
61+ '@typescript-eslint/prefer-optional-chain' : 'error' ,
62+ '@typescript-eslint/prefer-as-const' : 'error' ,
63+ '@typescript-eslint/no-non-null-assertion' : 'warn' ,
64+ '@typescript-eslint/no-duplicate-enum-values' : 'error' ,
65+ '@typescript-eslint/no-inferrable-types' : [ 'error' , { ignoreParameters : false , ignoreProperties : false } ] ,
66+
5467 // Import Rules
5568 'import/no-unresolved' : 'error' ,
5669 'import/named' : 'error' ,
5770 'import/default' : 'error' ,
5871 'import/no-absolute-path' : 'error' ,
5972 'import/no-self-import' : 'error' ,
73+ // 'import/no-duplicates': 'error',
74+ 'import/first' : 'error' ,
75+ 'import/no-mutable-exports' : 'error' ,
6076 'sort-imports' : [ 'error' , { ignoreDeclarationSort : true } ] ,
6177
62- // General Rules
63- 'require-await' : 'error' ,
78+ // General Rules - Best Practices
79+ 'require-await' : 'off' , // Turned off in favor of @typescript -eslint version
80+ '@typescript-eslint/require-await' : 'error' ,
81+ '@typescript-eslint/await-thenable' : 'error' ,
82+ '@typescript-eslint/no-misused-promises' : 'error' ,
6483 complexity : [ 'warn' , { max : 11 } ] ,
84+ 'no-console' : [ 'warn' , { allow : [ 'warn' , 'error' , 'info' ] } ] ,
85+ 'no-debugger' : 'error' ,
86+ 'no-var' : 'error' ,
87+ 'prefer-const' : 'error' ,
88+ 'prefer-template' : 'error' ,
89+ 'object-shorthand' : 'error' ,
90+ // 'no-else-return': ['error', { allowElseIf: false }],
91+ 'no-lonely-if' : 'error' ,
92+ 'no-useless-return' : 'error' ,
93+ 'no-nested-ternary' : 'warn' ,
94+ eqeqeq : [ 'error' , 'always' , { null : 'ignore' } ] ,
95+ 'no-throw-literal' : 'error' ,
6596
6697 // JSDoc Rules
6798 'jsdoc/check-alignment' : 'warn' ,
6899 'jsdoc/check-indentation' : 'warn' ,
69100
101+ // Playwright recommended rules (from plugin:playwright/playwright-test)
102+ ...playwright . configs [ 'playwright-test' ] . rules ,
103+
70104 // Playwright Rules
71105 'playwright/missing-playwright-await' : [ 'error' ] ,
72106 'playwright/no-focused-test' : 'error' ,
@@ -85,6 +119,7 @@ module.exports = [
85119 'playwright/expect-expect' : 'off' ,
86120 'playwright/no-conditional-in-test' : 'off' ,
87121 'playwright/no-skipped-test' : 'off' ,
122+ 'playwright/consistent-spacing-between-blocks' : 'off' ,
88123 } ,
89124 } ,
90125 { files : [ 'src/**/*.ts' ] , rules : { '@typescript-eslint/explicit-module-boundary-types' : 'warn' } } ,
0 commit comments