tslint: Enable no-var-requires

Rationale from the rule's page:

AMD-style require([]) and CommonJS-style require("") statements are
environment-specific and more difficult to statically analyze.

ES2015-style imports are part of the JavaScript language specfication
and recommended as the path going forward. TypeScript will compile them
to environment-specific forms as needed.
This commit is contained in:
Simon Marchi 2018-07-18 10:52:35 -04:00
commit e0ed9f71b8
3 changed files with 2 additions and 3 deletions

View file

@ -8,7 +8,7 @@ import * as fs from "fs"
import { posix } from "path"
import * as nativePath from "path"
const path = posix;
const Client = require("ssh2").Client;
import { Client } from "ssh2";
export function escape(str: string) {
return str.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");