Skip to content

Commit

Permalink
Merge pull request #22 from hildjj/mocha
Browse files Browse the repository at this point in the history
Add mocha eslint plugin to the mocha config
  • Loading branch information
hildjj authored Feb 15, 2024
2 parents f9a3f4d + ca90810 commit 3e317e6
Show file tree
Hide file tree
Showing 13 changed files with 691 additions and 246 deletions.
8 changes: 8 additions & 0 deletions flat/mocha.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
"use strict";

const globals = require("globals");
const mocha = require("eslint-plugin-mocha");

module.exports = {
files: ["test/**"],
languageOptions: {
globals: globals.mocha,
},
plugins: {
mocha,
},
rules: {
...mocha.configs.recommended.rules,
"mocha/no-mocha-arrows": "off",
},
};
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "~7",
"@typescript-eslint/parser": "~7",
"eslint-plugin-mocha": "~10",
"eslint": "~8",
"typescript": "~5"
},
Expand All @@ -32,20 +33,24 @@
},
"@typescript-eslint/parser": {
"optional": true
},
"eslint-plugin-mocha": {
"optional": true
}
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"eslint": "^8.56.0",
"eslint-find-rules": "4.1.0",
"eslint-plugin-mocha": "10.2.0",
"typescript": "^5.3.3"
},
"dependencies": {
"@stylistic/eslint-plugin": "1.6.1",
"@stylistic/eslint-plugin": "1.6.2",
"globals": "14.0.0"
},
"packageManager": "pnpm@8.15.1",
"packageManager": "pnpm@8.15.3",
"engines": {
"node": ">=18"
}
Expand Down
Loading

0 comments on commit 3e317e6

Please sign in to comment.