Skip to content

Commit

Permalink
add eslint plugin for mocha
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Mar 7, 2024
1 parent fcf5a93 commit d8e3964
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions playground/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import eslint from '@eslint/js';
import ts from 'typescript-eslint';
import mocha from 'eslint-plugin-mocha';

export default ts.config(
eslint.configs.recommended,
Expand All @@ -28,10 +29,15 @@ export default ts.config(
'@typescript-eslint/no-unsafe-assignment': 'off',
},
},
mocha.configs.flat.recommended,
{
files: ['test.ts'],
rules: {
'@typescript-eslint/unbound-method': 'off', // For checking `window.runActionlint`
'mocha/no-exclusive-tests': 'error',
'mocha/no-pending-tests': 'error',
'mocha/no-skipped-tests': 'error',
'mocha/no-top-level-hooks': 'error',
},
}
);
1 change: 1 addition & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@types/node": "^20.11.24",
"@types/pako": "^2.0.3",
"eslint": "^8.57.0",
"eslint-plugin-mocha": "^10.4.0",
"http-server": "^14.1.1",
"prettier": "^3.2.5",
"stylelint": "^16.2.1",
Expand Down

0 comments on commit d8e3964

Please sign in to comment.