17
18// Linux: prevent a weird NPE when mocha on Linux requires the window size from the TTY
19// Since we are not running in a tty environment, we just implementt he method statically
20const tty = require("tty");21if (!tty.getWindowSize) {
22 tty.getWindowSize = (): number[] => {
23 return [80, 75];
In other words, the use of forms such as var foo = require("foo")
are banned. Instead use ES6
style imports or import foo = require("foo")
imports.
var foo = require('foo');
const foo = require('foo');
let foo = require('foo');
import foo = require('foo');
require('foo');
import foo from 'foo';