forked from microsoft/FluidFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-extractor-base.json
225 lines (204 loc) · 7.61 KB
/
api-extractor-base.json
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
// Base API-Extractor config for build-tools
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"compiler": {
"tsconfigFilePath": "<projectFolder>/tsconfig.json"
},
/**
* Specifies the .d.ts file to be used as the starting point for analysis. API Extractor analyzes the symbols exported by this module.
* Can be overridden as necessary for packages with different build structures.
*
* See: <https://api-extractor.com/pages/configs/api-extractor_json/#mainentrypointfilepath>
*/
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
/**
* Configures how the API report file (*.api.md) will be generated.
*/
"apiReport": {
"enabled": true,
"reportFileName": "<unscopedPackageName>",
"reportFolder": "<projectFolder>/api-report/",
"reportTempFolder": "<projectFolder>/_api-extractor-temp/",
// `build-tools` packages do not currently generate separate entry-points based on release levels.
// If that changes, these should specify the appropriate variants.
"reportVariants": ["complete"]
},
/**
* Configures how the doc model file (*.api.json) will be generated.
*/
"docModel": {
"enabled": true,
"apiJsonFilePath": "<projectFolder>/_api-extractor-temp/doc-models/<unscopedPackageName>.api.json"
},
/**
* Configures how the .d.ts rollup file will be generated.
*/
"dtsRollup": {
"enabled": false
},
/**
* Configures how the tsdoc-metadata.json file will be generated.
*/
"tsdocMetadata": {
"enabled": true
},
/**
* Configures how API Extractor reports error and warning messages produced during analysis.
*
* There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages.
*/
"messages": {
/**
* Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing
* the input .d.ts files.
*
* TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551"
*
* DEFAULT VALUE: A single "default" entry with logLevel=warning.
*/
"compilerMessageReporting": {
/**
* Configures the default routing for messages that don't match an explicit rule in this table.
*/
"default": {
/**
* Specifies whether the message should be written to the the tool's output log. Note that
* the "addToApiReviewFile" property may supersede this option.
*
* Possible values: "error", "warning", "none"
*
* Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail
* and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes
* the "--local" option), the warning is displayed but the build will not fail.
*/
"logLevel": "error",
/**
* When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md),
* then the message will be written inside that file; otherwise, the message is instead logged according to
* the "logLevel" option.
*/
"addToApiReportFile": false // Ensure build failure on errors
}
},
/**
* Configures handling of messages reported by API Extractor during its analysis.
*
* API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag"
*
* DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings
*/
"extractorMessageReporting": {
"default": {
/**
* Specifies whether the message should be written to the the tool's output log. Note that
* the "addToApiReviewFile" property may supersede this option.
*
* Possible values: "error", "warning", "none"
*
* Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail
* and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes
* the "--local" option), the warning is displayed but the build will not fail.
*/
"logLevel": "error",
/**
* When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md),
* then the message will be written inside that file; otherwise, the message is instead logged according to
* the "logLevel" option.
*/
"addToApiReportFile": false // Ensure build failure on errors
},
// #region Enabled Rules
// Prevent cyclic `@inheritDoc` comments
"ae-cyclic-inherit-doc": {
"logLevel": "error",
"addToApiReportFile": false
},
// A documentation comment should contain at most one release tag.
"ae-extra-release-tag": {
"logLevel": "error",
"addToApiReportFile": false
},
// Reported when an exported API refers to another declaration that is not exported.
"ae-forgotten-export": {
"logLevel": "error",
"addToApiReportFile": false
},
// A type signature should not reference another types whose release tag is less visible.
"ae-incompatible-release-tags": {
"logLevel": "error",
"addToApiReportFile": false
},
// Multiple function overloads should not have @internal tags with other tags.
"ae-internal-mixed-release-tag": {
"logLevel": "error",
"addToApiReportFile": false
},
// Require packages to include `@packageDocumentation` comment
"ae-misplaced-package-tag": {
"logLevel": "error",
"addToApiReportFile": false
},
// Require explicit release tags for all API members.
"ae-missing-release-tag": {
// TODO: Consider enabling this in the future.
"logLevel": "none",
"addToApiReportFile": false
},
// Require documentation on all package-exported API items.
"ae-undocumented": {
// TODO: Consider enabling this in the future.
"logLevel": "none"
},
// The @inheritDoc tag needs a TSDoc declaration reference.
"ae-unresolved-inheritdoc-base": {
"logLevel": "error",
"addToApiReportFile": false
},
"ae-unresolved-inheritdoc-reference": {
"logLevel": "error",
"addToApiReportFile": false
},
// The @link tag needs a TSDoc declaration reference.
"ae-unresolved-link": {
"logLevel": "error",
"addToApiReportFile": false
},
// #endregion
// #region Disabled Rules
// Disabled. We don't require that internal members be prefixed with an underscore.
"ae-internal-missing-underscore": {
"logLevel": "none",
"addToApiReportFile": false
}
// #endregion
},
/**
* Configures handling of messages reported by the TSDoc parser when analyzing code comments.
*
* TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text"
*
* DEFAULT VALUE: A single "default" entry with logLevel=warning.
*/
"tsdocMessageReporting": {
"default": {
/**
* Specifies whether the message should be written to the the tool's output log. Note that
* the "addToApiReviewFile" property may supersede this option.
*
* Possible values: "error", "warning", "none"
*
* Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail
* and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes
* the "--local" option), the warning is displayed but the build will not fail.
*/
"logLevel": "error",
/**
* When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md),
* then the message will be written inside that file; otherwise, the message is instead logged according to
* the "logLevel" option.
*/
"addToApiReportFile": false // Ensure build failure on errors
}
}
}
}