Skip to content

Commit

Permalink
chore(root): add eslint rule to restrict sinon usage
Browse files Browse the repository at this point in the history
Ticket: DX-1013

TICKET: DX-1013
  • Loading branch information
kev-daniell committed Feb 10, 2025
1 parent b6a6624 commit 0759087
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,27 @@
"rules": {
"no-undef": "off"
}
},
{
// rule to restrict sinon imports
"files": ["**/*.ts", "**/*.js"],
"rules": {
"no-restricted-imports": [
"error",
{
"paths": ["sinon"],
"patterns": ["sinon/*"]
}
],
"no-restricted-globals": [
"error",
{
"name": "require",
"message": "Requiring sinon is not allowed. Instead use the Node.js native test runner node:test",
"importNames": ["sinon"]
}
]
}
}
]
}

0 comments on commit 0759087

Please sign in to comment.