Skip to content

Commit

Permalink
Chore: Prevent focused tests by adding jest eslint rule (grafana#45088)
Browse files Browse the repository at this point in the history
* Prevent focused tests by adding jest eslint rule

* Remove redundant no-only-tests eslint plugin

* Update lock file
  • Loading branch information
connorlindsey authored Feb 11, 2022
1 parent 3da0434 commit cd05ee0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"extends": ["@grafana/eslint-config"],
"root": true,
"plugins": ["no-only-tests", "@emotion", "lodash"],
"plugins": ["@emotion", "lodash", "jest"],
"rules": {
"no-only-tests/no-only-tests": "error",
"react/prop-types": "off",
"@emotion/jsx-import": "error",
"lodash/import-scope": [2, "member"]
"lodash/import-scope": [2, "member"],
"jest/no-focused-tests": "error"
},
"overrides": [
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@
"enzyme-to-json": "3.6.2",
"eslint": "8.8.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-jest": "^26.1.0",
"eslint-plugin-jsdoc": "37.8.0",
"eslint-plugin-lodash": "^7.2.0",
"eslint-plugin-no-only-tests": "2.6.0",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.28.0",
"eslint-plugin-react-hooks": "4.3.0",
Expand Down
28 changes: 19 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11337,7 +11337,7 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/utils@npm:5.11.0":
"@typescript-eslint/utils@npm:5.11.0, @typescript-eslint/utils@npm:^5.10.0":
version: 5.11.0
resolution: "@typescript-eslint/utils@npm:5.11.0"
dependencies:
Expand Down Expand Up @@ -18160,6 +18160,23 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-jest@npm:^26.1.0":
version: 26.1.0
resolution: "eslint-plugin-jest@npm:26.1.0"
dependencies:
"@typescript-eslint/utils": ^5.10.0
peerDependencies:
"@typescript-eslint/eslint-plugin": ^5.0.0
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
peerDependenciesMeta:
"@typescript-eslint/eslint-plugin":
optional: true
jest:
optional: true
checksum: 5d796092640202dd519c44c4270a335e7b5e7cd74f36b41754c2a9ed007a0110f4cc9b4b721dafe6724b3f93a3c9d27f9a0267c7e2a86e0f71a4a9f920897adc
languageName: node
linkType: hard

"eslint-plugin-jsdoc@npm:37.7.0":
version: 37.7.0
resolution: "eslint-plugin-jsdoc@npm:37.7.0"
Expand Down Expand Up @@ -18207,13 +18224,6 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-no-only-tests@npm:2.6.0":
version: 2.6.0
resolution: "eslint-plugin-no-only-tests@npm:2.6.0"
checksum: 4e3c9cc7e09c13e855fd7af4a8969128f766dcf32a0680715ebcaa903c7fe44db8e45e994c8b908443a6019cbd9ea1b51f413bf968a0c58214aded930a863df9
languageName: node
linkType: hard

"eslint-plugin-prettier@npm:4.0.0":
version: 4.0.0
resolution: "eslint-plugin-prettier@npm:4.0.0"
Expand Down Expand Up @@ -20448,9 +20458,9 @@ __metadata:
enzyme-to-json: 3.6.2
eslint: 8.8.0
eslint-config-prettier: 8.3.0
eslint-plugin-jest: ^26.1.0
eslint-plugin-jsdoc: 37.8.0
eslint-plugin-lodash: ^7.2.0
eslint-plugin-no-only-tests: 2.6.0
eslint-plugin-prettier: 4.0.0
eslint-plugin-react: 7.28.0
eslint-plugin-react-hooks: 4.3.0
Expand Down

0 comments on commit cd05ee0

Please sign in to comment.