mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Enable the unicorn/prefer-modern-dom-apis
ESLint plugin rule
This rule will help enforce slightly shorter code, and according to MDN both `Element.replaceWith()` and `Element.before()` are available in all browsers that we currently support. Please find additional information here: - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-dom-apis.md - https://developer.mozilla.org/en-US/docs/Web/API/Element/replaceWith - https://developer.mozilla.org/en-US/docs/Web/API/Element/before
This commit is contained in:
parent
0c65926d5b
commit
4d39898823
4 changed files with 6 additions and 5 deletions
|
@ -53,6 +53,7 @@
|
|||
"unicorn/prefer-date-now": "error",
|
||||
"unicorn/prefer-dom-node-append": "error",
|
||||
"unicorn/prefer-dom-node-remove": "error",
|
||||
"unicorn/prefer-modern-dom-apis": "error",
|
||||
"unicorn/prefer-string-starts-ends-with": "error",
|
||||
|
||||
// Possible errors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue