-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
32 lines (31 loc) · 1.06 KB
/
Copy patheslint.config.js
File metadata and controls
32 lines (31 loc) · 1.06 KB
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
import testPolicy from './scripts/test-policy/eslint-plugin.js';
import { contractCallAllowances } from './scripts/test-policy/migration-inventory.js';
export default [
{
name: 'historical-install-artifacts',
ignores: ['test/fixtures/**'],
},
{
name: 'test-policy',
files: ['test/**/*.{js,mjs}', 'e2e/**/*.{js,mjs}'],
languageOptions: { ecmaVersion: 'latest', sourceType: 'module' },
linterOptions: { noInlineConfig: true },
plugins: { 'test-policy': testPolicy },
rules: {
'test-policy/no-focused-tests': 'error',
'test-policy/no-uncontracted-mocks': 'error',
'test-policy/no-fixed-waits': 'error',
'test-policy/no-vacuous-tests': 'error',
},
},
{
name: 'behavioral-test-contracts',
files: ['test/**/*.test.js', 'e2e/**/specs/**/*.pw.js'],
rules: { 'test-policy/behavior-contract': 'error' },
},
...contractCallAllowances.map(({ file, rule, allow }) => ({
name: `bounded-call-inventory:${file}:${rule}`,
files: [file],
rules: { [`test-policy/${rule}`]: ['error', { allow }] },
})),
];