Skip to content

Commit cc81dbc

Browse files
authored
Disallow .only in mocha tests (#2107)
Fixes #2105 ## Checklist - [ ] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [ ] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [ ] I have not broken the cheatsheet
1 parent a9cc79f commit cc81dbc

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

.eslintrc.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@
1111
"ecmaVersion": 6,
1212
"sourceType": "module"
1313
},
14-
"plugins": ["@typescript-eslint", "unused-imports", "import", "unicorn"],
14+
"plugins": [
15+
"@typescript-eslint",
16+
"unused-imports",
17+
"import",
18+
"unicorn",
19+
"mocha"
20+
],
1521
"rules": {
1622
"import/no-relative-packages": "error",
1723
"@typescript-eslint/consistent-type-assertions": [
@@ -53,7 +59,9 @@
5359
],
5460
"no-throw-literal": "warn",
5561
"semi": "off",
56-
"unicorn/prefer-module": "error"
62+
"unicorn/prefer-module": "error",
63+
"mocha/no-skipped-tests": "error",
64+
"mocha/no-exclusive-tests": "error"
5765
},
5866
"overrides": [
5967
{

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"eslint-config-prettier": "^8.8.0",
3737
"eslint-import-resolver-typescript": "3.5.5",
3838
"eslint-plugin-import": "2.28.1",
39+
"eslint-plugin-mocha": "10.2.0",
3940
"eslint-plugin-unicorn": "49.0.0",
4041
"eslint-plugin-unused-imports": "^3.0.0",
4142
"prettier": "3.0.3",

pnpm-lock.yaml

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)