Skip to content

Commit

Permalink
feat: Implement v3 rule "jest" (#228)
Browse files Browse the repository at this point in the history
* feat: Implement the rule "jest"

* update eslint-plugin-jest
  • Loading branch information
wakamsha authored Mar 12, 2024
1 parent b1662ad commit d544fa0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"confusing-browser-globals": "^1.0.11",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jest-dom": "^4.0.3",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-n": "^16.6.2",
Expand Down
9 changes: 7 additions & 2 deletions rules/jest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
module.exports = {
extends: ['../configs/jest'].map(require.resolve),
rules: {},
plugins: ['jest'],
extends: ['plugin:jest/recommended', 'plugin:jest/style'],
rules: {
// Disallow duplicate setup and teardown hooks
// https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-duplicate-hooks.md
'jest/no-duplicate-hooks': ['error'],
},
};

0 comments on commit d544fa0

Please sign in to comment.