Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vitest plugin config #50

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
}
}