Skip to content

Commit

Permalink
feat!: Remove jest eslint rules (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
simenandre authored Oct 18, 2022
1 parent 4b4ea78 commit 0ef4ee1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,27 @@ To make all this config work, you only need to add this to `package.json`:
}
}
```

## Migrate from v2?

We removed `jest`-related rules in v3, essentially making `jest` an optional
dependency. In our experience, we don't necessarily want to use Jest for every
project anymore. Versions below v3 **require** `jest`, which just doesn't make
sense to us.

Here are the steps to get it working [again]:

Run this in your terminal:

```shell
yarn add -D eslint-plugin-jest
```

```json
{
"eslintConfig": {
"extends": ["@bjerk/eslint-config", "plugin:jest/recommended"],
"plugins": ["jest"]
}
}
```
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:eslint-comments/recommended',
'plugin:promise/recommended',
'plugin:jest/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'jest', 'import', 'unicorn'],
plugins: ['@typescript-eslint', 'import', 'unicorn'],
rules: {
curly: 'error',
'@typescript-eslint/explicit-module-boundary-types': 'warn',
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.0.4",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.0.1",
"eslint-plugin-unicorn": "^43.0.2",
Expand All @@ -27,7 +26,6 @@
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.0.4",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.0.1",
"eslint-plugin-unicorn": "^43.0.2",
Expand All @@ -40,7 +38,6 @@
"eslint-config-prettier",
"eslint-plugin-eslint-comments",
"eslint-plugin-import",
"eslint-plugin-jest",
"eslint-plugin-prettier",
"eslint-plugin-promise",
"eslint-plugin-unicorn",
Expand Down
14 changes: 1 addition & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
semver "^7.3.7"
tsutils "^3.21.0"

"@typescript-eslint/utils@5.39.0", "@typescript-eslint/utils@^5.10.0":
"@typescript-eslint/utils@5.39.0":
version "5.39.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.39.0.tgz#b7063cca1dcf08d1d21b0d91db491161ad0be110"
integrity sha512-+DnY5jkpOpgj+EBtYPyHRjXampJfC0yUZZzfzLuUWVZvCuKqSdJVC8UhdWipIw7VKNTfwfAPiOWzYkAwuIhiAg==
Expand Down Expand Up @@ -550,13 +550,6 @@ eslint-plugin-import@^2.26.0:
resolve "^1.22.0"
tsconfig-paths "^3.14.1"

eslint-plugin-jest@^27.0.4:
version "27.0.4"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.0.4.tgz#ab9c7b3f48bfade4762c24c415a5d9bbc0174a61"
integrity sha512-BuvY78pHMpMJ6Cio7sKg6jrqEcnRYPUc4Nlihku4vKx3FjlmMINSX4vcYokZIe+8TKcyr1aI5Kq7vYwgJNdQSA==
dependencies:
"@typescript-eslint/utils" "^5.10.0"

eslint-plugin-prettier@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b"
Expand Down Expand Up @@ -803,11 +796,6 @@ function-bind@^1.1.1:
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==

functional-red-black-tree@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=

get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6"
Expand Down

0 comments on commit 0ef4ee1

Please sign in to comment.