From 46d2f87ad2e8ae26ce8c095fc0eafda8a5feaf28 Mon Sep 17 00:00:00 2001 From: Luke Watts Date: Wed, 25 Jan 2023 22:02:30 +0100 Subject: [PATCH] chore(deps): introduce linting to catch focused tests --- .eslintrc.json | 4 ++- package.json | 1 + yarn.lock | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 1c6f1e53b8..b3a218bd88 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,8 @@ "@typescript-eslint", "prettier", "unicorn", - "sort-class-members" + "sort-class-members", + "jest" ], "extends": [ "plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react @@ -55,6 +56,7 @@ "prefer": "type-imports" } ], + "jest/no-focused-tests": "error", "@typescript-eslint/explicit-function-return-type": "off", "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/interface-name-prefix": "off", diff --git a/package.json b/package.json index 3b746245e3..2272fddeae 100644 --- a/package.json +++ b/package.json @@ -174,6 +174,7 @@ "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.26.0", + "eslint-plugin-jest": "^27.2.1", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-sort-class-members": "^1.15.2", "eslint-plugin-unicorn": "^36.0.0", diff --git a/yarn.lock b/yarn.lock index f950555f3b..ccf4b42368 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12152,6 +12152,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:5.49.0": + version: 5.49.0 + resolution: "@typescript-eslint/scope-manager@npm:5.49.0" + dependencies: + "@typescript-eslint/types": 5.49.0 + "@typescript-eslint/visitor-keys": 5.49.0 + checksum: 466047e24ff8a4195f14aadde39375f22891bdaced09e58c89f2c32af0aa4a0d87e71a5f006f6ab76858e6f30c4b764b1e0ef7bc26713bb78add30638108c45f + languageName: node + linkType: hard + "@typescript-eslint/type-utils@npm:5.10.1": version: 5.10.1 resolution: "@typescript-eslint/type-utils@npm:5.10.1" @@ -12206,6 +12216,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:5.49.0": + version: 5.49.0 + resolution: "@typescript-eslint/types@npm:5.49.0" + checksum: 41f72a043007fc3f3356b5a38d7bfa54871545b4a309810a062f044cff25122413a9660ce6d83d1221762f60d067351d020b0cb68f7e1279817f53e77ce8f33d + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:5.10.1": version: 5.10.1 resolution: "@typescript-eslint/typescript-estree@npm:5.10.1" @@ -12260,6 +12277,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:5.49.0": + version: 5.49.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.49.0" + dependencies: + "@typescript-eslint/types": 5.49.0 + "@typescript-eslint/visitor-keys": 5.49.0 + debug: ^4.3.4 + globby: ^11.1.0 + is-glob: ^4.0.3 + semver: ^7.3.7 + tsutils: ^3.21.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: f331af9f0ef3ce3157c421b8cc727dec5aa0a60add305aa4c676a02c63ec07799105268af192c5ed193a682b7ed804564d29d49bdbd2019678e495d80e65e29a + languageName: node + linkType: hard + "@typescript-eslint/utils@npm:5.10.1": version: 5.10.1 resolution: "@typescript-eslint/utils@npm:5.10.1" @@ -12294,6 +12329,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:^5.10.0": + version: 5.49.0 + resolution: "@typescript-eslint/utils@npm:5.49.0" + dependencies: + "@types/json-schema": ^7.0.9 + "@types/semver": ^7.3.12 + "@typescript-eslint/scope-manager": 5.49.0 + "@typescript-eslint/types": 5.49.0 + "@typescript-eslint/typescript-estree": 5.49.0 + eslint-scope: ^5.1.1 + eslint-utils: ^3.0.0 + semver: ^7.3.7 + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: 8218c566637d5104dfb2346216f8cb4c244f31c2a39e261aafe554b8abd48bd630a0d0807a0a8d776af8f9d9914c8776d86abf0a523049f3c5619c498a7e5b1e + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:5.10.1": version: 5.10.1 resolution: "@typescript-eslint/visitor-keys@npm:5.10.1" @@ -12324,6 +12377,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:5.49.0": + version: 5.49.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.49.0" + dependencies: + "@typescript-eslint/types": 5.49.0 + eslint-visitor-keys: ^3.3.0 + checksum: 46dc7bc713e8825d1fccba521fdf7c6e2f8829e491c2afd44dbe4105c6432e3c3dfe7e1ecb221401269d639264bb4af77b60a7b65521fcff9ab02cd31d8ef782 + languageName: node + linkType: hard + "@uppy/core@npm:^2.1.4": version: 2.1.4 resolution: "@uppy/core@npm:2.1.4" @@ -20086,6 +20149,23 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-jest@npm:^27.2.1": + version: 27.2.1 + resolution: "eslint-plugin-jest@npm:27.2.1" + dependencies: + "@typescript-eslint/utils": ^5.10.0 + peerDependencies: + "@typescript-eslint/eslint-plugin": ^5.0.0 + eslint: ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + "@typescript-eslint/eslint-plugin": + optional: true + jest: + optional: true + checksum: 579a4d26304cc6748b2e6dff6c965ea7a21b618d8b051eb02727d25cf5c7767f6db8ef5237531635ff77e242b983b973e7cb8c820a4d20d5bda73358c452a8ab + languageName: node + linkType: hard + "eslint-plugin-jsx-a11y@npm:^6.5.1": version: 6.7.1 resolution: "eslint-plugin-jsx-a11y@npm:6.7.1" @@ -30296,6 +30376,7 @@ fsevents@^1.2.7: eslint: ^7.32.0 eslint-config-prettier: ^8.3.0 eslint-plugin-import: ^2.26.0 + eslint-plugin-jest: ^27.2.1 eslint-plugin-prettier: ^3.4.0 eslint-plugin-sort-class-members: ^1.15.2 eslint-plugin-unicorn: ^36.0.0