Skip to content

Commit

Permalink
Add vitest plugin config
Browse files Browse the repository at this point in the history
  • Loading branch information
gndelia committed Nov 4, 2024
1 parent 2a86ae5 commit 9645560
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Additional rule sets are available:
- `bloq/next`
- `bloq/node`
- `bloq/typescript`
- `bloq/vitest`

## Note on code formatting

Expand Down
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@
"lint": "eslint --cache ."
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "^8.11.0",
"@typescript-eslint/parser": "^8.11.0",
"@vitest/eslint-plugin": "^1.1.7",
"eslint-config-next": "^13.0.0",
"eslint-config-prettier": "^8.0.0",
"eslint-plugin-import": "^2.0.0",
"eslint-plugin-jsdoc": "^43.0.0",
"eslint-plugin-markdownlint": "^0.6.0",
"eslint-plugin-mocha": "^10.0.0",
"eslint-plugin-node": "^11.0.0",
"@typescript-eslint/eslint-plugin": "^8.11.0",
"@typescript-eslint/parser": "^8.11.0",
"eslint-plugin-prefer-arrow": "^1.0.0",
"eslint-plugin-promise": "^6.0.0"
},
Expand Down
17 changes: 17 additions & 0 deletions vitest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict'

module.exports = {
extends: ['plugin:@vitest/legacy-recommended'],
plugins: ['@vitest'],
rules: {
'no-unused-expressions': 'off',
'node/no-unpublished-require': 'warn',
'prefer-arrow/prefer-arrow-functions': 'off',
// equivalent to mocha/no-exclusive-tests
'vitest/no-focused-tests': 'error',
// equivalent to mocha/no-setup-in-describe
'vitest/require-hook': 'warn',
// equivalent to mocha/no-skipped-tests
'vitest/no-disabled-tests': 'error'

Check warning on line 15 in vitest.js

View workflow job for this annotation

GitHub Actions / js-checks / run-checks

Expected object keys to be in natural insensitive ascending order. 'vitest/no-disabled-tests' should be before 'vitest/require-hook'

Check warning on line 15 in vitest.js

View workflow job for this annotation

GitHub Actions / js-checks / run-checks

Expected object keys to be in natural insensitive ascending order. 'vitest/no-disabled-tests' should be before 'vitest/require-hook'

Check warning on line 15 in vitest.js

View workflow job for this annotation

GitHub Actions / js-checks / run-checks

Expected object keys to be in natural insensitive ascending order. 'vitest/no-disabled-tests' should be before 'vitest/require-hook'
}
}

0 comments on commit 9645560

Please sign in to comment.