Update some deprecated ESLint rules
Please see https://eslint.org/docs/rules/#deprecated where the following rules apply to the PDF.js project: - [`no-buffer-constructor`](https://eslint.org/docs/rules/no-buffer-constructor), which we can replace with the `unicorn/no-new-buffer` rule; see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-buffer.md - [`no-catch-shadow`](https://eslint.org/docs/rules/no-catch-shadow), which was replaced by the `no-shadow` rule (that we're already using).
This commit is contained in:
parent
d3c9c08aca
commit
96dbe38544
@ -46,6 +46,7 @@
|
|||||||
}],
|
}],
|
||||||
"unicorn/no-abusive-eslint-disable": "error",
|
"unicorn/no-abusive-eslint-disable": "error",
|
||||||
"unicorn/no-array-push-push": "error",
|
"unicorn/no-array-push-push": "error",
|
||||||
|
"unicorn/no-new-buffer": "error",
|
||||||
"unicorn/no-instanceof-array": "error",
|
"unicorn/no-instanceof-array": "error",
|
||||||
"unicorn/no-useless-spread": "error",
|
"unicorn/no-useless-spread": "error",
|
||||||
"unicorn/prefer-string-starts-ends-with": "error",
|
"unicorn/prefer-string-starts-ends-with": "error",
|
||||||
@ -136,7 +137,6 @@
|
|||||||
"strict": ["off", "global"],
|
"strict": ["off", "global"],
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
"no-catch-shadow": "error",
|
|
||||||
"no-delete-var": "error",
|
"no-delete-var": "error",
|
||||||
"no-label-var": "error",
|
"no-label-var": "error",
|
||||||
"no-shadow": "error",
|
"no-shadow": "error",
|
||||||
@ -153,9 +153,6 @@
|
|||||||
"variables": false,
|
"variables": false,
|
||||||
}],
|
}],
|
||||||
|
|
||||||
// Node.js and CommonJS
|
|
||||||
"no-buffer-constructor": "error",
|
|
||||||
|
|
||||||
// Stylistic Issues
|
// Stylistic Issues
|
||||||
"lines-between-class-members": ["error", "always"],
|
"lines-between-class-members": ["error", "always"],
|
||||||
"max-len": ["error", {
|
"max-len": ["error", {
|
||||||
|
Loading…
Reference in New Issue
Block a user