-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
TypeScript reports the following error after upgrading eslint from 9.28.0 to 9.29.0:
Error:
scripts-eslint/eslint_plugin_playwright.js:6:16 - error TS2375: Type '{ rules: { 'guard-for-in': "off"; 'new-cap': "off"; 'no-await-in-loop': "off"; 'no-invalid-this': "error"; 'node/no-missing-import': "off"; 'node/no-unpublished-require': "off"; 'node/no-unsupported-features/es-syntax': "off"; ... 12 more ...; 'playwright/valid-title': "off"; }; ... 8 more ...; settings?: Record<str...' is not assignable to type 'ConfigWithExtends' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
The types of 'languageOptions.ecmaVersion' are incompatible between these types.
Type 'EcmaVersion | undefined' is not assignable to type 'EcmaVersion'.
Type '17' is not assignable to type 'EcmaVersion'.
6 export default {
~
7 ...playwright.configs['flat/recommended'],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
30 },
~~~
31 };
~
scripts-eslint/eslint_plugin_playwright.js:
// @ts-check
import playwright from 'eslint-plugin-playwright';
/** @type {import('typescript-eslint').ConfigWithExtends} */
export default {
...playwright.configs['flat/recommended'],
rules: {
...playwright.configs['flat/recommended'].rules,
'guard-for-in': 'off',
'new-cap': 'off',
'no-await-in-loop': 'off',
'no-invalid-this': 'error',
'node/no-missing-import': 'off',
'node/no-unpublished-require': 'off',
'node/no-unsupported-features/es-syntax': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-restricted-imports': 'off', // Disable the import restriction within the framework
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-var-requires': 'off',
'playwright/expect-expect': 'off',
'playwright/no-networkidle': 'off',
'playwright/no-useless-not': 'off',
'playwright/no-wait-for-timeout': 'off',
'playwright/valid-title': 'off',
},
};
Mathias-S
Metadata
Metadata
Assignees
Labels
No labels