1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Migrate to ESLint flat config

Flat config is the new config system used by ESLint 9.
To make the migration easier, they also added
flat config support to ESLint 8.

This commit migrates the various ESLint configs in the repository to use
the new system, **without** upgrading to ESLint 9 yet.
This commit is contained in:
Nicolò Ribaudo 2024-11-12 13:00:27 +01:00
parent 7a962031e9
commit 9e6ff979db
No known key found for this signature in database
GPG key ID: AAFDA9101C58F338
16 changed files with 450 additions and 387 deletions

View file

@ -1,18 +0,0 @@
{
"plugins": ["jasmine"],
"extends": ["../.eslintrc", "plugin:jasmine/recommended"],
"env": {
"node": true,
"jasmine": true
},
"rules": {
"jasmine/new-line-before-expect": "off",
"jasmine/new-line-between-declarations": "off",
"jasmine/no-focused-tests": "error",
"jasmine/no-pending-tests": "off",
"jasmine/no-spec-dupes": ["error", "branch"],
"jasmine/no-suite-dupes": ["error", "branch"],
"jasmine/prefer-jasmine-matcher": "off",
"jasmine/prefer-toHaveBeenCalledWith": "off"
}
}

View file

@ -1,9 +0,0 @@
{
"extends": [
"../.eslintrc"
],
"rules": {
"import/no-unresolved": ["error", { "ignore": [".*/build/image_decoders/.*"] }],
},
}

View file

@ -1,14 +0,0 @@
{
"extends": [
"../.eslintrc"
],
"rules": {
"no-restricted-syntax": ["error",
{
"selector": "CallExpression[callee.name='waitForTimeout']",
"message": "`waitForTimeout` can cause intermittent failures and should not be used (see issue #17656 for replacements).",
},
],
},
}

View file

@ -1,10 +0,0 @@
{
"extends": [
"../.eslintrc"
],
"rules": {
// Plugins
"import/no-unresolved": ["error", { "ignore": ["pdfjs/"] }],
},
}