Skip to content

Commit f682fa8

Browse files
authored
chore: lint error on only in mocha tests (#9300)
1 parent ef235cf commit f682fa8

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

eslint.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import eslint from '@eslint/js';
22
import googleStyle from 'eslint-config-google';
33
import jsdoc from 'eslint-plugin-jsdoc';
4+
import mochaPlugin from 'eslint-plugin-mocha';
45
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
56
import globals from 'globals';
67
import tseslint from 'typescript-eslint';
@@ -200,6 +201,9 @@ export default [
200201
},
201202
{
202203
files: ['tests/**'],
204+
plugins: {
205+
mocha: mochaPlugin,
206+
},
203207
languageOptions: {
204208
globals: {
205209
'Blockly': true,
@@ -219,6 +223,7 @@ export default [
219223
'jsdoc/check-tag-names': ['warn', {'definedTags': ['record']}],
220224
'jsdoc/tag-lines': ['off'],
221225
'jsdoc/no-defaults': ['off'],
226+
'mocha/no-exclusive-tests': 'error',
222227
},
223228
},
224229
{

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
"eslint-config-google": "^0.14.0",
116116
"eslint-config-prettier": "^10.1.1",
117117
"eslint-plugin-jsdoc": "^52.0.2",
118+
"eslint-plugin-mocha": "^11.1.0",
118119
"eslint-plugin-prettier": "^5.2.1",
119120
"glob": "^11.0.1",
120121
"globals": "^16.0.0",

0 commit comments

Comments
 (0)