Skip to content

Commit

Permalink
eslint-config: delete dropped rules from jest-eslint-config
Browse files Browse the repository at this point in the history
rename renamed rules.
Set new rule require-hook to OFF
  • Loading branch information
tbergquist-godaddy authored and kodiakhq[bot] committed Oct 11, 2021
1 parent 6304236 commit 155ad5d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
10 changes: 10 additions & 0 deletions src/eslint-config-adeira/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Unreleased

- Delete dropped rules from [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest)
- prefer-to-be-undefined
- prefer-to-be-null
- no-expect-resolves
- no-truthy-falsy
- no-try-expect
- prefer-inline-snapshots
- Rename renamed rules from [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest)
- valid-describe to valid-describe-callback
- lowercase-name to prefer-lowercase-title
- Additional rules from [`eslint-plugin-testing-library`](https://github.com/testing-library/eslint-plugin-testing-library) were enabled (warnings or errors in strict mode).

# 6.6.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ Object {
"init-declarations": 0,
"jest/consistent-test-it": 0,
"jest/expect-expect": 0,
"jest/lowercase-name": 0,
"jest/max-nested-describe": Array [
1,
Object {
Expand All @@ -371,7 +370,6 @@ Object {
"jest/no-disabled-tests": 2,
"jest/no-done-callback": 0,
"jest/no-duplicate-hooks": 2,
"jest/no-expect-resolves": 0,
"jest/no-export": 2,
"jest/no-focused-tests": 2,
"jest/no-hooks": 0,
Expand All @@ -387,24 +385,22 @@ Object {
"jest/no-test-callback": 0,
"jest/no-test-prefixes": 0,
"jest/no-test-return-statement": 2,
"jest/no-truthy-falsy": 0,
"jest/prefer-called-with": 2,
"jest/prefer-expect-assertions": 0,
"jest/prefer-expect-resolves": 1,
"jest/prefer-hooks-on-top": 2,
"jest/prefer-inline-snapshots": 0,
"jest/prefer-lowercase-title": 0,
"jest/prefer-spy-on": 0,
"jest/prefer-strict-equal": 0,
"jest/prefer-to-be": 1,
"jest/prefer-to-be-null": 2,
"jest/prefer-to-be-undefined": 2,
"jest/prefer-to-contain": 2,
"jest/prefer-to-have-length": 2,
"jest/prefer-todo": 2,
"jest/require-hook": 0,
"jest/require-to-throw-message": 0,
"jest/require-top-level-describe": 0,
"jest/unbound-method": 0,
"jest/valid-describe": 2,
"jest/valid-describe-callback": 2,
"jest/valid-expect": 2,
"jest/valid-expect-in-promise": 2,
"jest/valid-title": 2,
Expand Down Expand Up @@ -1196,7 +1192,7 @@ Snapshot Diff:
"jest/prefer-strict-equal": 0,
- "jest/prefer-to-be": 1,
+ "jest/prefer-to-be": 2,
"jest/prefer-to-be-null": 2,
"jest/prefer-to-contain": 2,
@@ --- --- @@
"no-caller": 2,
- "no-case-declarations": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,6 @@ Object {
],
"jest/consistent-test-it": 0,
"jest/expect-expect": 0,
"jest/lowercase-name": 0,
"jest/max-nested-describe": Array [
1,
Object {
Expand All @@ -679,7 +678,6 @@ Object {
"jest/no-disabled-tests": 2,
"jest/no-done-callback": 0,
"jest/no-duplicate-hooks": 2,
"jest/no-expect-resolves": 0,
"jest/no-export": 2,
"jest/no-focused-tests": 2,
"jest/no-hooks": 0,
Expand All @@ -695,24 +693,22 @@ Object {
"jest/no-test-callback": 0,
"jest/no-test-prefixes": 0,
"jest/no-test-return-statement": 2,
"jest/no-truthy-falsy": 0,
"jest/prefer-called-with": 2,
"jest/prefer-expect-assertions": 0,
"jest/prefer-expect-resolves": 1,
"jest/prefer-hooks-on-top": 2,
"jest/prefer-inline-snapshots": 0,
"jest/prefer-lowercase-title": 0,
"jest/prefer-spy-on": 0,
"jest/prefer-strict-equal": 0,
"jest/prefer-to-be": 1,
"jest/prefer-to-be-null": 2,
"jest/prefer-to-be-undefined": 2,
"jest/prefer-to-contain": 2,
"jest/prefer-to-have-length": 2,
"jest/prefer-todo": 2,
"jest/require-hook": 0,
"jest/require-to-throw-message": 0,
"jest/require-top-level-describe": 0,
"jest/unbound-method": 0,
"jest/valid-describe": 2,
"jest/valid-describe-callback": 2,
"jest/valid-expect": 2,
"jest/valid-expect-in-promise": 2,
"jest/valid-title": 2,
Expand Down
10 changes: 3 additions & 7 deletions src/eslint-config-adeira/src/presets/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = ({
// Jest (https://github.com/jest-community/eslint-plugin-jest)
'jest/consistent-test-it': OFF,
'jest/expect-expect': OFF,
'jest/lowercase-name': OFF,
'jest/prefer-lowercase-title': OFF,
'jest/max-nested-describe': [NEXT_VERSION_ERROR, { max: 5 }],
'jest/no-alias-methods': OFF,
'jest/no-commented-out-tests': OFF,
Expand All @@ -23,7 +23,6 @@ module.exports = ({
'jest/no-disabled-tests': ERROR,
'jest/no-done-callback': OFF,
'jest/no-duplicate-hooks': ERROR,
'jest/no-expect-resolves': OFF,
'jest/no-export': ERROR,
'jest/no-focused-tests': ERROR,
'jest/no-hooks': OFF, // TODO: WARN (?)
Expand All @@ -39,26 +38,23 @@ module.exports = ({
'jest/no-test-callback': OFF,
'jest/no-test-prefixes': OFF,
'jest/no-test-return-statement': ERROR,
'jest/no-truthy-falsy': OFF,
'jest/prefer-called-with': ERROR,
'jest/prefer-expect-assertions': OFF,
'jest/prefer-hooks-on-top': ERROR,
'jest/prefer-inline-snapshots': OFF,
'jest/prefer-spy-on': OFF,
'jest/prefer-strict-equal': OFF, // TODO: WARN
'jest/prefer-to-be-null': ERROR,
'jest/prefer-to-be-undefined': ERROR,
'jest/prefer-to-contain': ERROR,
'jest/prefer-to-have-length': ERROR,
'jest/prefer-todo': ERROR,
'jest/require-to-throw-message': OFF,
'jest/require-top-level-describe': OFF,
'jest/unbound-method': OFF,
'jest/valid-describe': ERROR,
'jest/valid-describe-callback': ERROR,
'jest/valid-expect': ERROR,
'jest/valid-expect-in-promise': ERROR,
'jest/valid-title': ERROR,
'jest/prefer-expect-resolves': NEXT_VERSION_ERROR,
'jest/prefer-to-be': NEXT_VERSION_ERROR,
'jest/require-hook': OFF,
},
} /*: EslintConfig */);

0 comments on commit 155ad5d

Please sign in to comment.