mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Provide custom messages for the no-restricted-globals
ESLint rule, and refactor the .eslintrc
files (PR 9868 follow-up)
Without providing useful (custom) error messages for the `no-restricted-globals` rule, see https://eslint.org/docs/rules/no-restricted-globals, it's quite likely that the rule will be incorrectly disabled rather than the required globals being imported as intended. To reduced duplication of the `no-restricted-globals` rule in multiple `.eslintrc` files, it's instead moved to the top-level `.eslintrc` file and disabled as needed on a folder/file basis outside of `/src` and `/web`.
This commit is contained in:
parent
1aaeaf3338
commit
36b683ca55
7 changed files with 29 additions and 23 deletions
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"extends": [
|
||||
../.eslintrc
|
||||
],
|
||||
|
||||
"rules": {
|
||||
// Variables
|
||||
"no-restricted-globals": ["error",
|
||||
"ReadableStream",
|
||||
"URL",
|
||||
"WritableStream",
|
||||
],
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue