UNPKG

@shayanthenerd/eslint-config

Version:

A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style

27 lines (26 loc) 1.05 kB
//#region src/rules/playwright.ts function getPlaywrightRules(options) { const { maxNestedDescribe } = options.configs.test; const playwrightRules = { "playwright/max-expects": "off", "playwright/prefer-to-be": "warn", "playwright/no-get-by-title": "error", "playwright/prefer-to-contain": "warn", "playwright/no-wait-for-timeout": "off", "playwright/no-duplicate-hooks": "error", "playwright/prefer-strict-equal": "warn", "playwright/prefer-hooks-on-top": "warn", "playwright/prefer-to-have-count": "warn", "playwright/prefer-hooks-in-order": "warn", "playwright/prefer-to-have-length": "warn", "playwright/no-commented-out-tests": "error", "playwright/prefer-equality-matcher": "warn", "playwright/require-to-throw-message": "error", "playwright/prefer-comparison-matcher": "warn", "playwright/max-nested-describe": ["warn", { max: maxNestedDescribe }], "playwright/prefer-lowercase-title": ["warn", { ignoreTopLevelDescribe: true }] }; return playwrightRules; } //#endregion export { getPlaywrightRules };