feat(ts): enable jest/unbound-method
(#141)
This commit is contained in:
@@ -51,6 +51,15 @@ module.exports = {
|
||||
'@typescript-eslint/restrict-template-expressions': 'error',
|
||||
'@typescript-eslint/unbound-method': 'error',
|
||||
},
|
||||
}, {
|
||||
// https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md
|
||||
files: ['**/__tests__/**/*.ts', '**/*.spec.ts', '**/*.test.ts'],
|
||||
plugins: ['jest'],
|
||||
rules: {
|
||||
// you should turn the original rule off *only* for test files
|
||||
'@typescript-eslint/unbound-method': 'off',
|
||||
'jest/unbound-method': 'error',
|
||||
},
|
||||
}],
|
||||
),
|
||||
rules: {
|
||||
|
@@ -19,7 +19,8 @@
|
||||
"dependencies": {
|
||||
"@antfu/eslint-config-basic": "workspace:*",
|
||||
"@typescript-eslint/eslint-plugin": "^5.46.0",
|
||||
"@typescript-eslint/parser": "^5.46.0"
|
||||
"@typescript-eslint/parser": "^5.46.0",
|
||||
"eslint-plugin-jest": "^27.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.29.0"
|
||||
|
Reference in New Issue
Block a user