Skip to content

Commit

Permalink
eslint: warn when using .done() or .fail() (wikimedia-gadgets#1709)
Browse files Browse the repository at this point in the history
  • Loading branch information
NovemLinguae authored Feb 12, 2023
1 parent a1e6102 commit 733fdb5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,18 @@
"space-unary-ops": "error",
"spaced-comment": ["error", "always", { "line": { "exceptions": ["-"] }, "block": { "balanced": true } }],
"switch-colon-spacing": "error",
"no-nested-ternary": "error"
"no-nested-ternary": "error",
"no-restricted-syntax": [
"warn",
{
"message": "Using .done() is discouraged. See https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Asynchronous_code",
"selector": "MemberExpression > Identifier[name=\"done\"]"
},
{
"message": "Using .fail() is discouraged. See https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Asynchronous_code",
"selector": "MemberExpression > Identifier[name=\"fail\"]"
}
]
},
"reportUnusedDisableDirectives": true
}

0 comments on commit 733fdb5

Please sign in to comment.