Enforce alignment of JSDoc comments
This CL adds the eslint-plugin-jsdoc plugin and enables just one rule,
`jsdoc/check-alignment`, which ensures that all the lines in a comment
are correctly aligned. For example:
```
/**
* foo
* bar
*/
```
Would fail the check and be corrected to:
```
/**
* foo
* bar
*/
```
DISABLE_THIRD_PARTY_CHECK=deliberate install + use of
eslint-plugin-jsdoc node_module
Bug: none
Change-Id: I969983cd550653654a334ede3409b8c850467245
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4110906
Commit-Queue: Andres Olivares <[email protected]>
Reviewed-by: Andres Olivares <[email protected]>
Auto-Submit: Jack Franklin <[email protected]>
Commit-Queue: Jack Franklin <[email protected]>
diff --git a/front_end/panels/network/components/HeaderSectionRow.ts b/front_end/panels/network/components/HeaderSectionRow.ts
index f8b7ac4..90b100f 100644
--- a/front_end/panels/network/components/HeaderSectionRow.ts
+++ b/front_end/panels/network/components/HeaderSectionRow.ts
@@ -21,40 +21,40 @@
const UIStrings = {
/**
- *@description Comment used in decoded X-Client-Data HTTP header output in Headers View of the Network panel
- */
+ *@description Comment used in decoded X-Client-Data HTTP header output in Headers View of the Network panel
+ */
activeClientExperimentVariation: 'Active `client experiment variation IDs`.',
/**
- *@description Comment used in decoded X-Client-Data HTTP header output in Headers View of the Network panel
- */
+ *@description Comment used in decoded X-Client-Data HTTP header output in Headers View of the Network panel
+ */
activeClientExperimentVariationIds: 'Active `client experiment variation IDs` that trigger server-side behavior.',
/**
- *@description Text in Headers View of the Network panel for X-Client-Data HTTP headers
- */
+ *@description Text in Headers View of the Network panel for X-Client-Data HTTP headers
+ */
decoded: 'Decoded:',
/**
- *@description The title of a button to enable overriding a HTTP header.
- */
+ *@description The title of a button to enable overriding a HTTP header.
+ */
editHeader: 'Override header',
/**
- *@description Description of which letters the name of an HTTP header may contain (a-z, A-Z, 0-9, '-', or '_').
- */
+ *@description Description of which letters the name of an HTTP header may contain (a-z, A-Z, 0-9, '-', or '_').
+ */
headerNamesOnlyLetters: 'Header names should contain only letters, digits, dashes or underscores',
/**
- *@description Text that is usually a hyperlink to more documentation
- */
+ *@description Text that is usually a hyperlink to more documentation
+ */
learnMore: 'Learn more',
/**
- *@description Text for a link to the issues panel
- */
+ *@description Text for a link to the issues panel
+ */
learnMoreInTheIssuesTab: 'Learn more in the issues tab',
/**
- *@description Hover text prompting the user to reload the whole page or refresh the particular request, so that the changes they made take effect.
- */
+ *@description Hover text prompting the user to reload the whole page or refresh the particular request, so that the changes they made take effect.
+ */
reloadPrompt: 'Refresh the page/request for these changes to take effect',
/**
- *@description The title of a button which removes a HTTP header override.
- */
+ *@description The title of a button which removes a HTTP header override.
+ */
removeOverride: 'Remove this header override',
};
diff --git a/front_end/panels/network/components/RequestHeaderSection.ts b/front_end/panels/network/components/RequestHeaderSection.ts
index 5dfb868..2353607 100644
--- a/front_end/panels/network/components/RequestHeaderSection.ts
+++ b/front_end/panels/network/components/RequestHeaderSection.ts
@@ -18,21 +18,21 @@
const UIStrings = {
/**
- *@description Text that is usually a hyperlink to more documentation
- */
+ *@description Text that is usually a hyperlink to more documentation
+ */
learnMore: 'Learn more',
/**
- *@description Message to explain lack of raw headers for a particular network request
- */
+ *@description Message to explain lack of raw headers for a particular network request
+ */
provisionalHeadersAreShownDisableCache: 'Provisional headers are shown. Disable cache to see full headers.',
/**
- *@description Tooltip to explain lack of raw headers for a particular network request
- */
+ *@description Tooltip to explain lack of raw headers for a particular network request
+ */
onlyProvisionalHeadersAre:
'Only provisional headers are available because this request was not sent over the network and instead was served from a local cache, which doesn’t store the original request headers. Disable cache to see full request headers.',
/**
- *@description Message to explain lack of raw headers for a particular network request
- */
+ *@description Message to explain lack of raw headers for a particular network request
+ */
provisionalHeadersAreShown: 'Provisional headers are shown.',
};
diff --git a/front_end/panels/network/components/RequestHeadersView.ts b/front_end/panels/network/components/RequestHeadersView.ts
index 098c61f..9c2ae4d 100644
--- a/front_end/panels/network/components/RequestHeadersView.ts
+++ b/front_end/panels/network/components/RequestHeadersView.ts
@@ -33,77 +33,77 @@
const UIStrings = {
/**
- *@description Text in Request Headers View of the Network panel
- */
+ *@description Text in Request Headers View of the Network panel
+ */
fromDiskCache: '(from disk cache)',
/**
- *@description Text in Request Headers View of the Network panel
- */
+ *@description Text in Request Headers View of the Network panel
+ */
fromMemoryCache: '(from memory cache)',
/**
- *@description Text in Request Headers View of the Network panel
- */
+ *@description Text in Request Headers View of the Network panel
+ */
fromPrefetchCache: '(from prefetch cache)',
/**
- *@description Text in Request Headers View of the Network panel
- */
+ *@description Text in Request Headers View of the Network panel
+ */
fromServiceWorker: '(from `service worker`)',
/**
- *@description Text in Request Headers View of the Network panel
- */
+ *@description Text in Request Headers View of the Network panel
+ */
fromSignedexchange: '(from signed-exchange)',
/**
- *@description Text in Request Headers View of the Network panel
- */
+ *@description Text in Request Headers View of the Network panel
+ */
fromWebBundle: '(from Web Bundle)',
/**
- *@description Section header for a list of the main aspects of a http request
- */
+ *@description Section header for a list of the main aspects of a http request
+ */
general: 'General',
/**
- *@description Label for a link from the network panel's headers view to the file in which
- * header overrides are defined in the sources panel.
- */
+ *@description Label for a link from the network panel's headers view to the file in which
+ * header overrides are defined in the sources panel.
+ */
headerOverrides: 'Header overrides',
/**
- *@description Label for a checkbox to switch between raw and parsed headers
- */
+ *@description Label for a checkbox to switch between raw and parsed headers
+ */
raw: 'Raw',
/**
- *@description Text in Request Headers View of the Network panel
- */
+ *@description Text in Request Headers View of the Network panel
+ */
referrerPolicy: 'Referrer Policy',
/**
- *@description Text in Network Log View Columns of the Network panel
- */
+ *@description Text in Network Log View Columns of the Network panel
+ */
remoteAddress: 'Remote Address',
/**
- *@description Text in Request Headers View of the Network panel
- */
+ *@description Text in Request Headers View of the Network panel
+ */
requestHeaders: 'Request Headers',
/**
- *@description The HTTP method of a request
- */
+ *@description The HTTP method of a request
+ */
requestMethod: 'Request Method',
/**
- *@description The URL of a request
- */
+ *@description The URL of a request
+ */
requestUrl: 'Request URL',
/**
- *@description A context menu item in the Network Log View Columns of the Network panel
- */
+ *@description A context menu item in the Network Log View Columns of the Network panel
+ */
responseHeaders: 'Response Headers',
/**
- *@description Title text for a link to the Sources panel to the file containing the header override definitions
- */
+ *@description Title text for a link to the Sources panel to the file containing the header override definitions
+ */
revealHeaderOverrides: 'Reveal header override definitions',
/**
- *@description Text to show more content
- */
+ *@description Text to show more content
+ */
showMore: 'Show more',
/**
- *@description HTTP response code
- */
+ *@description HTTP response code
+ */
statusCode: 'Status Code',
};
const str_ = i18n.i18n.registerUIStrings('panels/network/components/RequestHeadersView.ts', UIStrings);
diff --git a/front_end/panels/network/components/RequestTrustTokensView.ts b/front_end/panels/network/components/RequestTrustTokensView.ts
index 74a77ca..79a92c1d 100644
--- a/front_end/panels/network/components/RequestTrustTokensView.ts
+++ b/front_end/panels/network/components/RequestTrustTokensView.ts
@@ -14,74 +14,74 @@
const UIStrings = {
/**
- *@description Section heading in the Trust Token tab
- */
+ *@description Section heading in the Trust Token tab
+ */
parameters: 'Parameters',
/**
- *@description Text that refers to some types
- */
+ *@description Text that refers to some types
+ */
type: 'Type',
/**
- *@description Label for a Trust Token parameter
- */
+ *@description Label for a Trust Token parameter
+ */
refreshPolicy: 'Refresh policy',
/**
- *@description Label for a list if origins in the Trust Token tab
- */
+ *@description Label for a list if origins in the Trust Token tab
+ */
issuers: 'Issuers',
/**
- *@description Label for a report field in the Network panel
- */
+ *@description Label for a report field in the Network panel
+ */
topLevelOrigin: 'Top level origin',
/**
- *@description Text for the issuer of an item
- */
+ *@description Text for the issuer of an item
+ */
issuer: 'Issuer',
/**
- *@description Heading of a report section in the Network panel
- */
+ *@description Heading of a report section in the Network panel
+ */
result: 'Result',
/**
- *@description Text for the status of something
- */
+ *@description Text for the status of something
+ */
status: 'Status',
/**
- *@description Label for a field in the Network panel
- */
+ *@description Label for a field in the Network panel
+ */
numberOfIssuedTokens: 'Number of issued tokens',
/**
- * @description Text for the success status in the Network panel. Refers to the outcome of a network
- * request which will either be 'Success' or 'Failure'.
- */
+ * @description Text for the success status in the Network panel. Refers to the outcome of a network
+ * request which will either be 'Success' or 'Failure'.
+ */
success: 'Success',
/**
- *@description Text in the network panel for an error status
- */
+ *@description Text in the network panel for an error status
+ */
failure: 'Failure',
/**
- *@description Detailed text for a success status in the Network panel
- */
+ *@description Detailed text for a success status in the Network panel
+ */
theOperationsResultWasServedFrom: 'The operations result was served from cache.',
/**
- *@description Detailed text for a success status in the Network panel
- */
+ *@description Detailed text for a success status in the Network panel
+ */
theOperationWasFulfilledLocally: 'The operation was fulfilled locally, no request was sent.',
/**
- *@description Text for an error status in the Network panel
- */
+ *@description Text for an error status in the Network panel
+ */
aClientprovidedArgumentWas: 'A client-provided argument was malformed or otherwise invalid.',
/**
- *@description Text for an error status in the Network panel
- */
+ *@description Text for an error status in the Network panel
+ */
eitherNoInputsForThisOperation:
'Either no inputs for this operation are available or the output exceeds the operations quota.',
/**
- *@description Text for an error status in the Network panel
- */
+ *@description Text for an error status in the Network panel
+ */
theServersResponseWasMalformedOr: 'The servers response was malformed or otherwise invalid.',
/**
- *@description Text for an error status in the Network panel
- */
+ *@description Text for an error status in the Network panel
+ */
theOperationFailedForAnUnknown: 'The operation failed for an unknown reason.',
};
const str_ = i18n.i18n.registerUIStrings('panels/network/components/RequestTrustTokensView.ts', UIStrings);
diff --git a/front_end/panels/network/components/ResponseHeaderSection.ts b/front_end/panels/network/components/ResponseHeaderSection.ts
index f5bd213..aad1ccc 100644
--- a/front_end/panels/network/components/ResponseHeaderSection.ts
+++ b/front_end/panels/network/components/ResponseHeaderSection.ts
@@ -36,42 +36,42 @@
const UIStrings = {
/**
- *@description Label for a button which allows adding an HTTP header.
- */
+ *@description Label for a button which allows adding an HTTP header.
+ */
addHeader: 'Add header',
/**
- *@description Explanation text for which cross-origin policy to set.
- */
+ *@description Explanation text for which cross-origin policy to set.
+ */
chooseThisOptionIfTheResourceAnd:
'Choose this option if the resource and the document are served from the same site.',
/**
- *@description Explanation text for which cross-origin policy to set.
- */
+ *@description Explanation text for which cross-origin policy to set.
+ */
onlyChooseThisOptionIfAn:
'Only choose this option if an arbitrary website including this resource does not impose a security risk.',
/**
- *@description Message in the Headers View of the Network panel when a cross-origin opener policy blocked loading a sandbox iframe.
- */
+ *@description Message in the Headers View of the Network panel when a cross-origin opener policy blocked loading a sandbox iframe.
+ */
thisDocumentWasBlockedFrom:
'This document was blocked from loading in an `iframe` with a `sandbox` attribute because this document specified a cross-origin opener policy.',
/**
- *@description Message in the Headers View of the Network panel when a cross-origin embedder policy header needs to be set.
- */
+ *@description Message in the Headers View of the Network panel when a cross-origin embedder policy header needs to be set.
+ */
toEmbedThisFrameInYourDocument:
'To embed this frame in your document, the response needs to enable the cross-origin embedder policy by specifying the following response header:',
/**
- *@description Message in the Headers View of the Network panel when a cross-origin resource policy header needs to be set.
- */
+ *@description Message in the Headers View of the Network panel when a cross-origin resource policy header needs to be set.
+ */
toUseThisResourceFromADifferent:
'To use this resource from a different origin, the server needs to specify a cross-origin resource policy in the response headers:',
/**
- *@description Message in the Headers View of the Network panel when the cross-origin resource policy header is too strict.
- */
+ *@description Message in the Headers View of the Network panel when the cross-origin resource policy header is too strict.
+ */
toUseThisResourceFromADifferentOrigin:
'To use this resource from a different origin, the server may relax the cross-origin resource policy response header:',
/**
- *@description Message in the Headers View of the Network panel when the cross-origin resource policy header is too strict.
- */
+ *@description Message in the Headers View of the Network panel when the cross-origin resource policy header is too strict.
+ */
toUseThisResourceFromADifferentSite:
'To use this resource from a different site, the server may relax the cross-origin resource policy response header:',
};
diff --git a/front_end/panels/network/components/WebBundleInfoView.ts b/front_end/panels/network/components/WebBundleInfoView.ts
index b8c89aa..60cacc0 100644
--- a/front_end/panels/network/components/WebBundleInfoView.ts
+++ b/front_end/panels/network/components/WebBundleInfoView.ts
@@ -17,8 +17,8 @@
const UIStrings = {
/**
- *@description Header for the column that contains URL of the resource in a web bundle.
- */
+ *@description Header for the column that contains URL of the resource in a web bundle.
+ */
bundledResource: 'Bundled resource',
};
const str_ = i18n.i18n.registerUIStrings('panels/network/components/WebBundleInfoView.ts', UIStrings);