-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(deps): update
eslint-plugin-jest
to latest
Fixes #183
- Loading branch information
1 parent
9a66082
commit a213c03
Showing
5 changed files
with
145 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
import jest from 'eslint-plugin-jest'; | ||
import tseslint from 'typescript-eslint'; | ||
import { allJsExtensions } from '@sherifforg/constants'; | ||
import { jestHandPickedRules } from './handpickedRules/jestHandPickedRules'; | ||
|
||
export const getJestConfig = (pathsOverrides?: string[]) => { | ||
return { | ||
return tseslint.config({ | ||
files: pathsOverrides ?? [ | ||
`**/*.{test,spec}.{${allJsExtensions}}`, | ||
`**/tests/**/*.{${allJsExtensions}}`, | ||
`**/__tests__/**/*.{${allJsExtensions}}`, | ||
], | ||
plugins: { | ||
jest, | ||
}, | ||
languageOptions: { | ||
globals: jest.environments.globals.globals, | ||
}, | ||
extends: jest.configs['flat/style'], | ||
// @ts-expect-error | ||
rules: { | ||
...jest.configs.style.rules, | ||
...jestHandPickedRules, | ||
'@typescript-eslint/unbound-method': 0, // see reference: https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md | ||
'@typescript-eslint/unbound-method': 0, | ||
}, | ||
}; | ||
}); | ||
}; |
Oops, something went wrong.