Skip to content

Commit c0b2b21

Browse files
committed
chore(deps,lint): upgrade Playwright to 1.58.2 and vasu-playwright-utils to 1.22.0; enhance ESLint/TypeScript rules
1 parent 2823073 commit c0b2b21

5 files changed

Lines changed: 877 additions & 1167 deletions

File tree

eslint.config.js

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -83,44 +83,66 @@ module.exports = [
8383
'prettier/prettier': 'error',
8484
'no-trailing-spaces': 'error',
8585
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 0 }],
86+
'eol-last': ['error', 'always'],
8687

87-
// ESLint recommended overrides for TypeScript
88-
...typescript.configs['eslint-recommended'].overrides[0].rules,
89-
90-
// TypeScript recommended rules
88+
// TypeScript Rules - Base
9189
...typescript.configs.recommended.rules,
92-
90+
...typescript.configs['eslint-recommended'].overrides[0].rules,
9391
// TypeScript recommended-requiring-type-checking rules (type-aware rules)
9492
...typescript.configs['recommended-requiring-type-checking'].rules,
95-
96-
// Custom TypeScript Rules (matching your original config)
97-
'@typescript-eslint/no-unsafe-assignment': 'off', // Consider revisiting this setting later to change it to either 'warn' or 'error'.
98-
'@typescript-eslint/no-unsafe-member-access': 'off', // Consider revisiting this setting later to change it to either 'warn' or 'error'.
99-
'@typescript-eslint/no-unsafe-return': 'off',
93+
'@typescript-eslint/no-unsafe-assignment': 'warn',
94+
'@typescript-eslint/no-unsafe-member-access': 'warn',
95+
'@typescript-eslint/no-unsafe-return': 'warn',
96+
'@typescript-eslint/no-unsafe-call': 'warn',
10097
'@typescript-eslint/no-floating-promises': 'error',
10198
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
10299
'@typescript-eslint/no-explicit-any': 'warn',
103100
'@typescript-eslint/explicit-module-boundary-types': 'off',
104-
'@typescript-eslint/no-unused-vars': [
105-
'error',
106-
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' },
107-
],
101+
102+
// TypeScript Rules - Additional Strict Rules
103+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
104+
'@typescript-eslint/no-unused-expressions': 'error',
105+
'@typescript-eslint/no-empty-function': 'warn',
106+
'@typescript-eslint/prefer-nullish-coalescing': 'error',
107+
'@typescript-eslint/prefer-optional-chain': 'error',
108+
'@typescript-eslint/prefer-as-const': 'error',
109+
'@typescript-eslint/no-non-null-assertion': 'warn',
110+
'@typescript-eslint/no-duplicate-enum-values': 'error',
111+
'@typescript-eslint/no-inferrable-types': ['error', { ignoreParameters: false, ignoreProperties: false }],
108112

109113
// Import Rules
110114
'import/no-unresolved': 'error',
111115
'import/named': 'error',
112116
'import/default': 'error',
113117
'import/no-absolute-path': 'error',
114118
'import/no-self-import': 'error',
119+
// 'import/no-duplicates': 'error',
120+
'import/first': 'error',
121+
'import/no-mutable-exports': 'error',
115122
'sort-imports': ['error', { ignoreDeclarationSort: true }],
116123

117124
// General Rules
118-
'require-await': 'error',
125+
'require-await': 'off',
126+
'@typescript-eslint/require-await': 'error',
127+
'@typescript-eslint/await-thenable': 'error',
128+
'@typescript-eslint/no-misused-promises': 'error',
119129
complexity: ['warn', { max: 11 }],
130+
'no-console': ['warn', { allow: ['warn', 'error', 'info'] }],
131+
'no-debugger': 'error',
132+
'no-var': 'error',
133+
'prefer-const': 'error',
134+
'prefer-template': 'error',
135+
'object-shorthand': 'error',
136+
// 'no-else-return': ['error', { allowElseIf: false }],
137+
'no-lonely-if': 'error',
138+
'no-useless-return': 'error',
139+
'no-nested-ternary': 'warn',
140+
eqeqeq: ['error', 'always', { null: 'ignore' }],
141+
'no-throw-literal': 'error',
120142

121143
// JSDoc Rules
122-
'jsdoc/check-alignment': 'warn',
123-
'jsdoc/check-indentation': 'warn',
144+
// 'jsdoc/check-alignment': 'warn',
145+
// 'jsdoc/check-indentation': 'warn',
124146

125147
// Playwright recommended rules (from plugin:playwright/playwright-test)
126148
...playwright.configs['playwright-test'].rules,
@@ -142,6 +164,7 @@ module.exports = [
142164
'playwright/expect-expect': 'off',
143165
'playwright/no-conditional-in-test': 'off',
144166
'playwright/no-skipped-test': 'off',
167+
'playwright/consistent-spacing-between-blocks': 'off',
145168
},
146169
},
147170
];

0 commit comments

Comments
 (0)