diff --git a/cli/index.ts b/cli/index.ts
index ce3e44b508..8c34bb05a1 100644
--- a/cli/index.ts
+++ b/cli/index.ts
@@ -14,7 +14,14 @@ import * as zlib from 'zlib';
import { createStore, loadAndBundleSpec, Redoc } from 'redoc';
import { watch } from 'chokidar';
-import { createReadStream, existsSync, readFileSync, ReadStream, writeFileSync, lstatSync } from 'fs';
+import {
+ createReadStream,
+ existsSync,
+ lstatSync,
+ readFileSync,
+ ReadStream,
+ writeFileSync,
+} from 'fs';
import * as mkdirp from 'mkdirp';
import * as YargsParser from 'yargs';
@@ -196,7 +203,7 @@ async function serve(port: number, pathToSpec: string, options: Options = {}) {
const watcher = watch(pathToSpecDirectory, watchOptions);
const log = console.log.bind(console);
- const handlePath = async path => {
+ const handlePath = async _path => {
try {
spec = await loadAndBundleSpec(pathToSpec);
pageHTML = await getPageHTML(spec, pathToSpec, options);
@@ -282,13 +289,13 @@ async function getPageHTML(
ssr
? 'hydrate(__redoc_state, container);'
: `init("spec.json", ${JSON.stringify(redocOptions)}, container)`
- };
+ };
`,
redocHead: ssr
? (cdn
- ? ''
- : ``) + css
+ ? ''
+ : ``) + css
: '',
title: title || spec.info.title || 'ReDoc documentation',
disableGoogleFont,
@@ -368,7 +375,7 @@ function getObjectOrJSON(options) {
}
} catch (e) {
console.log(
- `Encountered error:\n\n${options}\n\nis neither a file with a valid JSON object neither a stringified JSON object.`
+ `Encountered error:\n\n${options}\n\nis neither a file with a valid JSON object neither a stringified JSON object.`,
);
handleError(e);
}
diff --git a/package.json b/package.json
index 353e800158..710464de08 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,7 @@
"bundle": "npm run bundle:clean && npm run bundle:lib && npm run bundle:standalone",
"declarations": "tsc --emitDeclarationOnly -p tsconfig.lib.json && cp -R src/types typings/",
"stats": "webpack --env.standalone --json --profile --mode=production > stats.json",
- "prettier": "prettier --write \"src/**/*.{ts,tsx}\"",
+ "prettier": "prettier --write \"cli/index.ts\" \"src/**/*.{ts,tsx}\"",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
"lint": "tslint --project tsconfig.json",
"benchmark": "node ./benchmark/benchmark.js",
diff --git a/tsconfig.json b/tsconfig.json
index 6a327741af..4710e2a575 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -34,6 +34,7 @@
"e2e/**"
],
"include": [
+ "cli/index.ts",
"./custom.d.ts",
"./demo/playground/hmr-playground.tsx",
"./src/**/*.ts?",