Skip to content

Commit 3366048

Browse files
committed
feat(eslint-config): extend jsx patterns
1 parent e720f24 commit 3366048

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

packages/eslint-config/src/base/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export const config: ConfigArray = tsEslint.config(
7979
files: [
8080
'**/*.spec.ts',
8181
'**/*.test.ts',
82+
'**/*.tests.ts',
8283
'**/mock/**/*.ts',
8384
'**/mocks/**/*.ts',
8485
'**/test/**/*.ts',

packages/eslint-config/src/react/config.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,24 @@ export const config = [
4343
rules: rules.styles,
4444
},
4545
{
46-
files: ['**/tests/**/*.tsx', '**/*.spec.tsx', '**/*.test.tsx'],
46+
files: ['**/*.spec.tsx', '**/*.test.tsx', '**/*.tests.tsx', '**/test/**/*.tsx', '**/tests/**/*.tsx'],
4747
...jestDom.configs['flat/recommended'],
4848
},
4949
{
5050
files: [
51+
'**/*.spec.tsx',
52+
'**/*.stories.tsx',
53+
'**/*.test.tsx',
54+
'**/*.tests.tsx',
5155
'**/mock/**/*.tsx',
5256
'**/mocks/**/*.tsx',
5357
'**/stories/**/*.tsx',
5458
'**/tests/**/*.tsx',
55-
'**/*.spec.tsx',
56-
'**/*.stories.tsx',
57-
'**/*.test.tsx',
5859
],
5960
plugins: {
6061
vitest,
6162
},
62-
rules: rules.tests,
63+
rules: { ...vitest.configs.recommended.rules, ...rules.tests },
6364
},
6465
{
6566
files: ['**/*.mdx'],

0 commit comments

Comments
 (0)