Skip to content

Commit 9645560

Browse files
committed
Add vitest plugin config
1 parent 2a86ae5 commit 9645560

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Additional rule sets are available:
2828
- `bloq/next`
2929
- `bloq/node`
3030
- `bloq/typescript`
31+
- `bloq/vitest`
3132

3233
## Note on code formatting
3334

package-lock.json

Lines changed: 21 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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@
2828
"lint": "eslint --cache ."
2929
},
3030
"dependencies": {
31+
"@typescript-eslint/eslint-plugin": "^8.11.0",
32+
"@typescript-eslint/parser": "^8.11.0",
33+
"@vitest/eslint-plugin": "^1.1.7",
3134
"eslint-config-next": "^13.0.0",
3235
"eslint-config-prettier": "^8.0.0",
3336
"eslint-plugin-import": "^2.0.0",
3437
"eslint-plugin-jsdoc": "^43.0.0",
3538
"eslint-plugin-markdownlint": "^0.6.0",
3639
"eslint-plugin-mocha": "^10.0.0",
3740
"eslint-plugin-node": "^11.0.0",
38-
"@typescript-eslint/eslint-plugin": "^8.11.0",
39-
"@typescript-eslint/parser": "^8.11.0",
4041
"eslint-plugin-prefer-arrow": "^1.0.0",
4142
"eslint-plugin-promise": "^6.0.0"
4243
},

vitest.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
'use strict'
2+
3+
module.exports = {
4+
extends: ['plugin:@vitest/legacy-recommended'],
5+
plugins: ['@vitest'],
6+
rules: {
7+
'no-unused-expressions': 'off',
8+
'node/no-unpublished-require': 'warn',
9+
'prefer-arrow/prefer-arrow-functions': 'off',
10+
// equivalent to mocha/no-exclusive-tests
11+
'vitest/no-focused-tests': 'error',
12+
// equivalent to mocha/no-setup-in-describe
13+
'vitest/require-hook': 'warn',
14+
// equivalent to mocha/no-skipped-tests
15+
'vitest/no-disabled-tests': 'error'
16+
}
17+
}

0 commit comments

Comments
 (0)