diff --git a/publish-docs.js b/publish-docs.js index 35824e9972..1cdca9172c 100644 --- a/publish-docs.js +++ b/publish-docs.js @@ -209,7 +209,7 @@ function copyBuildOutput() { // Create `versions` folder if it doesn't already exist. try { shell.mkdir('docsDist/versions'); - } catch (e) { + } catch { // If mkdir failed, it's almost certainly because the dir already exists. // Just ignore the error. } diff --git a/src/components/callout/callout.helpers.ts b/src/components/callout/callout.helpers.ts index d0f46b7c75..cd2d77284d 100644 --- a/src/components/callout/callout.helpers.ts +++ b/src/components/callout/callout.helpers.ts @@ -29,7 +29,7 @@ export function getHeading( try { return translate.get(key, language); - } catch (error) { + } catch { return translate.get(key, 'en'); } } diff --git a/src/components/form/widgets/code-editor.ts b/src/components/form/widgets/code-editor.ts index f36d8191a6..cf862e68ee 100644 --- a/src/components/form/widgets/code-editor.ts +++ b/src/components/form/widgets/code-editor.ts @@ -14,7 +14,7 @@ export class CodeEditor extends React.Component { try { value = JSON.stringify(props.formData, null, ' '); - } catch (e) { + } catch { // N/A } @@ -46,7 +46,7 @@ export class CodeEditor extends React.Component { props.onChange(value); props.onValidate(); - } catch (e) { + } catch { props.onValidate('Should be a valid JSON document'); } }