pdf.js/test/integration/.eslintrc
Tim van der Meij d4633ba478
Implement a linting rule to discourage using waitForTimeout for new tests
The `waitForTimeout` function should not be used anymore and only exists
for old usages that have to be rewritten, but there was nothing in place
to signal this. This commit therefore implements a linting rule, specific
to the integration tests, to make it clear that this function should no
longer be used. We exclude the old usages from it because we are already
tracking those in #17656 (so this patch is mostly to not make the scope
of that issue bigger).
2024-04-09 16:12:15 +02:00

15 lines
323 B
Plaintext

{
"extends": [
"../.eslintrc"
],
"rules": {
"no-restricted-syntax": ["error",
{
"selector": "CallExpression[callee.name='waitForTimeout']",
"message": "`waitForTimeout` can cause intermittent failures and should not be used (see issue #17656 for replacements).",
},
],
},
}