Skip to content

Commit

Permalink
eslint: fix no-undef in tests (wikimedia-gadgets#2130)
Browse files Browse the repository at this point in the history
manual fixes

basically just hard-code all the existing globals into the "globals" section of .eslintrc.json
  • Loading branch information
NovemLinguae authored Dec 13, 2024
1 parent 95efda0 commit 2a38b76
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
"env": {
"jest": true
},
"globals": {
"assert": "readonly",
"document": "readonly",
"jQuery": "readonly",
"Morebits": "readonly",
"mw": "readonly",
"Twinkle": "readonly",
"window": "readonly"
},
"root": true,
"rules": {
"array-bracket-spacing": "off",
Expand All @@ -13,7 +22,6 @@
"object-curly-spacing": "off",
"space-in-parens": "off",

"no-undef": "warn",
"no-useless-escape": "warn"
}
}

0 comments on commit 2a38b76

Please sign in to comment.