-
Notifications
You must be signed in to change notification settings - Fork 158
Expand file tree
/
Copy patheslint-remote-tester.config.ts
More file actions
40 lines (35 loc) · 1022 Bytes
/
eslint-remote-tester.config.ts
File metadata and controls
40 lines (35 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import {
getPathIgnorePattern,
getRepositories,
} from 'eslint-remote-tester-repositories';
import { parser } from 'typescript-eslint';
import testingLibraryPlugin from './src';
import type { Config } from 'eslint-remote-tester';
const eslintRemoteTesterConfig: Config = {
repositories: getRepositories({ randomize: true }),
pathIgnorePattern: getPathIgnorePattern(),
extensions: ['js', 'jsx', 'ts', 'tsx'],
concurrentTasks: 3,
cache: false,
logLevel: 'info',
eslintConfig: [
{
plugins: { 'testing-library': testingLibraryPlugin },
rules: {
...Object.fromEntries(
Object.keys(testingLibraryPlugin.rules).map((rule) => [
`testing-library/${rule}`,
'error',
])
),
// Rules with required options without default values
'testing-library/consistent-data-testid': [
'error',
{ testIdPattern: '^{fileName}(__([A-Z]+[a-z]_?)+)_$' },
],
},
},
{ languageOptions: { parser } },
] as Config['eslintConfig'],
};
export default eslintRemoteTesterConfig;