File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { fileURLToPath } from 'node:url';
77import { FlatCompat } from '@eslint/eslintrc' ;
88import js from '@eslint/js' ;
99import sharedEslintConfig from '@geti/config/lint' ;
10+ import jest from 'eslint-plugin-jest' ;
1011
1112const filename = fileURLToPath ( import . meta. url ) ;
1213const dirname = path . dirname ( filename ) ;
@@ -18,6 +19,19 @@ const compat = new FlatCompat({
1819
1920export default [
2021 ...sharedEslintConfig ,
22+ {
23+ files : [ '**/*.test.tsx' , '**/*.test.ts' ] ,
24+ plugins : {
25+ jest,
26+ } ,
27+ rules : {
28+ 'jest/no-disabled-tests' : 'error' ,
29+ 'jest/no-focused-tests' : 'error' ,
30+ 'jest/no-identical-title' : 'error' ,
31+ 'jest/prefer-to-have-length' : 'warn' ,
32+ 'jest/valid-expect' : 'error' ,
33+ } ,
34+ } ,
2135 {
2236 rules : {
2337 'no-restricted-imports' : [
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import typescriptEslint from '@typescript-eslint/eslint-plugin';
1111import tsParser from '@typescript-eslint/parser' ;
1212import header from 'eslint-plugin-header' ;
1313import _import from 'eslint-plugin-import' ;
14- import jest from 'eslint-plugin-jest' ;
1514import jsxA11Y from 'eslint-plugin-jsx-a11y' ;
1615import reactPlugin from 'eslint-plugin-react' ;
1716import reactHooks from 'eslint-plugin-react-hooks' ;
@@ -99,7 +98,6 @@ export default [
9998 {
10099 plugins : {
101100 import : fixupPluginRules ( _import ) ,
102- jest,
103101 'jsx-a11y' : fixupPluginRules ( jsxA11Y ) ,
104102 '@typescript-eslint' : fixupPluginRules ( typescriptEslint ) ,
105103 header,
@@ -169,12 +167,6 @@ export default [
169167 } ,
170168 ] ,
171169
172- 'jest/no-disabled-tests' : 'error' ,
173- 'jest/no-focused-tests' : 'error' ,
174- 'jest/no-identical-title' : 'error' ,
175- 'jest/prefer-to-have-length' : 'warn' ,
176- 'jest/valid-expect' : 'error' ,
177-
178170 'import/extensions' : [
179171 'error' ,
180172 'ignorePackages' ,
You can’t perform that action at this time.
0 commit comments