chore: forbid importing src/common/Events.ts (#6183)

This file is now deprecated and only used by the coverage tool and
DocLint - these tools will be updated to not rely on it in the future.

We now have events defined per class - e.g. all the events that `Page`
can emit are defined in the `PageEmittedEvents` enum, and similar. We
have to keep `Events.ts` around for the aforementioned tools, but don't
want its usage creeping back into our source code.
This commit is contained in:
Jack Franklin
2020-07-08 16:03:16 +01:00
committed by GitHub
parent 0e938803ef
commit 19f188a852
3 changed files with 5 additions and 3 deletions

View File

@@ -84,7 +84,11 @@ module.exports = {
"mocha/no-exclusive-tests": "error",
// enforce the variable in a catch block is named error
"unicorn/catch-error-name": "error"
"unicorn/catch-error-name": "error",
"no-restricted-imports": ["error", {
patterns: ["*Events"],
}]
},
"overrides": [
{