mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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:
@@ -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": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user