@checkdigit/eslint-plugin 6.6.0-PR.75-8f9f → 6.6.0-PR.75-1f73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.cjs +477 -380
- package/dist-cjs/metafile.json +34 -10
- package/dist-mjs/agent/no-fixture.mjs +3 -2
- package/dist-mjs/agent/no-mapped-response.mjs +75 -0
- package/dist-mjs/agent/no-service-wrapper.mjs +2 -2
- package/dist-mjs/index.mjs +32 -5
- package/dist-types/agent/no-mapped-response.d.ts +4 -0
- package/dist-types/index.d.ts +29 -3
- package/package.json +1 -1
- package/src/agent/no-fixture.ts +3 -1
- package/src/agent/no-mapped-response.ts +84 -0
- package/src/agent/no-service-wrapper.ts +1 -1
- package/src/index.ts +30 -3
package/src/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ import fetchThen, { ruleId as fetchThenRuleId } from './agent/fetch-then';
|
|
|
15
15
|
import invalidJsonStringify, { ruleId as invalidJsonStringifyRuleId } from './invalid-json-stringify';
|
|
16
16
|
import noFixture, { ruleId as noFixtureRuleId } from './agent/no-fixture';
|
|
17
17
|
import noFullResponse, { ruleId as noFullResponseRuleId } from './agent/no-full-response';
|
|
18
|
+
import noMappedResponse, { ruleId as noMappedResponseRuleId } from './agent/no-mapped-response';
|
|
18
19
|
import noPromiseInstanceMethod, { ruleId as noPromiseInstanceMethodRuleId } from './no-promise-instance-method';
|
|
19
20
|
import noServiceWrapper, { ruleId as noServiceWrapperRuleId } from './agent/no-service-wrapper';
|
|
20
21
|
import noStatusCode, { ruleId as noStatusCodeRuleId } from './agent/no-status-code';
|
|
@@ -52,6 +53,7 @@ export default {
|
|
|
52
53
|
[fetchResponseHeaderGetterRuleId]: fetchResponseHeaderGetter,
|
|
53
54
|
[addUrlDomainRuleId]: addUrlDomain,
|
|
54
55
|
[noFullResponseRuleId]: noFullResponse,
|
|
56
|
+
[noMappedResponseRuleId]: noMappedResponse,
|
|
55
57
|
[requireResolveFullResponseRuleId]: requireResolveFullResponse,
|
|
56
58
|
},
|
|
57
59
|
configs: {
|
|
@@ -70,6 +72,13 @@ export default {
|
|
|
70
72
|
[`@checkdigit/${noPromiseInstanceMethodRuleId}`]: 'error',
|
|
71
73
|
[`@checkdigit/${noFullResponseRuleId}`]: 'error',
|
|
72
74
|
[`@checkdigit/${requireResolveFullResponseRuleId}`]: 'error',
|
|
75
|
+
[`@checkdigit/${addUrlDomainRuleId}`]: 'off',
|
|
76
|
+
[`@checkdigit/${noFixtureRuleId}`]: 'off',
|
|
77
|
+
[`@checkdigit/${noServiceWrapperRuleId}`]: 'off',
|
|
78
|
+
[`@checkdigit/${noStatusCodeRuleId}`]: 'off',
|
|
79
|
+
[`@checkdigit/${fetchResponseBodyJsonRuleId}`]: 'off',
|
|
80
|
+
[`@checkdigit/${fetchResponseHeaderGetterRuleId}`]: 'off',
|
|
81
|
+
[`@checkdigit/${fetchThenRuleId}`]: 'off',
|
|
73
82
|
},
|
|
74
83
|
},
|
|
75
84
|
recommended: {
|
|
@@ -87,16 +96,34 @@ export default {
|
|
|
87
96
|
[`@checkdigit/${noPromiseInstanceMethodRuleId}`]: 'error',
|
|
88
97
|
},
|
|
89
98
|
},
|
|
90
|
-
agent: {
|
|
99
|
+
'agent-phase-1-test': {
|
|
100
|
+
files: ['*.spec.ts', '*.test.ts', 'src/api/v*/index.ts'],
|
|
91
101
|
rules: {
|
|
102
|
+
[`@checkdigit/${noFullResponseRuleId}`]: 'error',
|
|
103
|
+
[`@checkdigit/${requireResolveFullResponseRuleId}`]: 'error',
|
|
104
|
+
[`@checkdigit/${noMappedResponseRuleId}`]: 'error',
|
|
105
|
+
[`@checkdigit/${addUrlDomainRuleId}`]: 'error',
|
|
92
106
|
[`@checkdigit/${noFixtureRuleId}`]: 'error',
|
|
93
|
-
[`@checkdigit/${fetchThenRuleId}`]: 'error',
|
|
94
107
|
[`@checkdigit/${noServiceWrapperRuleId}`]: 'error',
|
|
95
108
|
[`@checkdigit/${noStatusCodeRuleId}`]: 'error',
|
|
96
109
|
[`@checkdigit/${fetchResponseBodyJsonRuleId}`]: 'error',
|
|
97
110
|
[`@checkdigit/${fetchResponseHeaderGetterRuleId}`]: 'error',
|
|
98
|
-
[`@checkdigit/${
|
|
111
|
+
[`@checkdigit/${fetchThenRuleId}`]: 'error',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
'agent-phase-2-production': {
|
|
115
|
+
ignorePatterns: ['*.spec.ts', '*.test.ts'],
|
|
116
|
+
rules: {
|
|
99
117
|
[`@checkdigit/${noFullResponseRuleId}`]: 'error',
|
|
118
|
+
[`@checkdigit/${requireResolveFullResponseRuleId}`]: 'error',
|
|
119
|
+
[`@checkdigit/${noMappedResponseRuleId}`]: 'error',
|
|
120
|
+
[`@checkdigit/${addUrlDomainRuleId}`]: 'error',
|
|
121
|
+
[`@checkdigit/${noFixtureRuleId}`]: 'off',
|
|
122
|
+
[`@checkdigit/${noServiceWrapperRuleId}`]: 'error',
|
|
123
|
+
[`@checkdigit/${noStatusCodeRuleId}`]: 'error',
|
|
124
|
+
[`@checkdigit/${fetchResponseBodyJsonRuleId}`]: 'error',
|
|
125
|
+
[`@checkdigit/${fetchResponseHeaderGetterRuleId}`]: 'error',
|
|
126
|
+
[`@checkdigit/${fetchThenRuleId}`]: 'error',
|
|
100
127
|
},
|
|
101
128
|
},
|
|
102
129
|
},
|