Skip to content

Commit 2ad184a

Browse files
authored
chore: Move eslint jest rule from geti/eslint to geti classic (#1171)
1 parent eddce2a commit 2ad184a

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

web_ui/eslint.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { fileURLToPath } from 'node:url';
77
import { FlatCompat } from '@eslint/eslintrc';
88
import js from '@eslint/js';
99
import sharedEslintConfig from '@geti/config/lint';
10+
import jest from 'eslint-plugin-jest';
1011

1112
const filename = fileURLToPath(import.meta.url);
1213
const dirname = path.dirname(filename);
@@ -18,6 +19,19 @@ const compat = new FlatCompat({
1819

1920
export 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': [

web_ui/packages/config/lint/eslint.config.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import typescriptEslint from '@typescript-eslint/eslint-plugin';
1111
import tsParser from '@typescript-eslint/parser';
1212
import header from 'eslint-plugin-header';
1313
import _import from 'eslint-plugin-import';
14-
import jest from 'eslint-plugin-jest';
1514
import jsxA11Y from 'eslint-plugin-jsx-a11y';
1615
import reactPlugin from 'eslint-plugin-react';
1716
import 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',

0 commit comments

Comments
 (0)