-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.ts
71 lines (69 loc) · 2.67 KB
/
index.ts
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */
const assertionMessageRule = require('./rules/assertion-message').default
const maxAssertsRule = require('./rules/max-asserts').default
const noIdenticalTitleRule = require('./rules/no-identical-title').default
const noIgnoredTestFilesRule = require('./rules/no-ignored-test-files').default
const noOnlyTestRule = require('./rules/no-only-test').default
const noSkipTestRule = require('./rules/no-skip-test').default
const noStatementAfterEndRule =
require('./rules/no-statement-after-end').default
const noUnknownModifiersRule = require('./rules/no-unknown-modifiers').default
const testEndedRule = require('./rules/test-ended').default
const usePlanRule = require('./rules/use-plan').default
const usePlanWellRule = require('./rules/use-plan-well').default
const useTWellRule = require('./rules/use-t-well').default
const useTRule = require('./rules/use-t').default
const useTapRule = require('./rules/use-tap').default
const eslintTapPluginConfig = {
rules: {
'assertion-message': { create: assertionMessageRule },
'max-asserts': { create: maxAssertsRule },
'no-identical-title': { create: noIdenticalTitleRule },
'no-ignored-test-files': { create: noIgnoredTestFilesRule },
'no-only-test': { create: noOnlyTestRule },
'no-skip-test': { create: noSkipTestRule },
'no-statement-after-end': { create: noStatementAfterEndRule },
'no-unknown-modifiers': { create: noUnknownModifiersRule },
'test-ended': { create: testEndedRule },
'use-plan': { create: usePlanRule },
'use-plan-well': { create: usePlanWellRule },
'use-t-well': {
create: useTWellRule,
meta: {
type: 'problem',
fixable: 'code',
},
},
'use-t': { create: useTRule },
'use-tap': { create: useTapRule },
},
/* eslint-enable */
configs: {
recommended: {
env: {
es6: true,
},
parserOptions: {
ecmaVersion: 7,
sourceType: 'module',
},
rules: {
'tap/assertion-message': ['error', 'always'],
'tap/max-asserts': ['error', 8],
'tap/no-identical-title': 'error',
'tap/no-ignored-test-files': 'error',
'tap/no-only-test': 'error',
'tap/no-skip-test': 'error',
'tap/no-statement-after-end': 'error',
'tap/no-unknown-modifiers': 'error',
'tap/test-ended': 'error',
'tap/use-plan': ['error', 'always'],
'tap/use-plan-well': 'error',
'tap/use-t-well': 'error',
'tap/use-t': 'error',
'tap/use-tap': 'error',
},
},
},
}
export default eslintTapPluginConfig