Skip to content

Commit

Permalink
feat(jest): source formatting rules from eslint-plugin-jest
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Dec 6, 2024
1 parent 1826911 commit ea36362
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 33 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ Below is a complete list of the configs provided, and their dependencies:
- `eslint-plugin-prettier`
- `ackama/jest`
- `eslint-plugin-jest`
- `eslint-plugin-jest-formatting`
- `ackama/react`
- `eslint-plugin-prettier`
- `eslint-plugin-react`
Expand Down
17 changes: 10 additions & 7 deletions jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@ const banMatchers = matchers => {

/** @type {import('eslint').Linter.Config} */
const config = {
plugins: ['jest', 'jest-formatting'],
extends: [
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:jest-formatting/recommended'
],
plugins: ['jest'],
extends: ['plugin:jest/recommended', 'plugin:jest/style'],
rules: {
'@typescript-eslint/unbound-method': 'off',
'jest/consistent-test-it': 'error',
Expand Down Expand Up @@ -62,7 +58,14 @@ const config = {
'jest/require-to-throw-message': 'error',
'jest/require-top-level-describe': 'error',
'jest/unbound-method': 'error',
'jest/valid-title': 'error'
'jest/valid-title': 'error',

'jest/padding-around-after-all-blocks': 'error',
'jest/padding-around-after-each-blocks': 'error',
'jest/padding-around-before-all-blocks': 'error',
'jest/padding-around-before-each-blocks': 'error',
'jest/padding-around-describe-blocks': 'error',
'jest/padding-around-test-blocks': 'error'
}
};

Expand Down
20 changes: 1 addition & 19 deletions package-lock.json

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

7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
"eslint": "^8.0.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^28.0.0",
"eslint-plugin-jest-formatting": "^3.0.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-n": "^17.0.0",
"eslint-plugin-prettier": "^5.0.0",
Expand All @@ -117,8 +116,7 @@
"@typescript-eslint/parser": "^7.0.0",
"eslint": ">= 8.0",
"eslint-plugin-import": ">= 2.21",
"eslint-plugin-jest": "^28.0.0",
"eslint-plugin-jest-formatting": "^3.0.0",
"eslint-plugin-jest": "^28.8.0",
"eslint-plugin-jsx-a11y": "^6.0.0",
"eslint-plugin-n": ">= 14.0.0",
"eslint-plugin-prettier": ">= 3.1",
Expand All @@ -139,9 +137,6 @@
"eslint-plugin-jest": {
"optional": true
},
"eslint-plugin-jest-formatting": {
"optional": true
},
"eslint-plugin-jsx-a11y": {
"optional": true
},
Expand Down

0 comments on commit ea36362

Please sign in to comment.