Fix linting
This commit is contained in:
parent
7bf407fbf1
commit
ffc6ce4586
3 changed files with 14 additions and 13 deletions
11
package.json
11
package.json
|
|
@ -46,14 +46,15 @@
|
|||
"types"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@sindresorhus/tsconfig": "^0.3.0",
|
||||
"@sindresorhus/tsconfig": "^0.4.0",
|
||||
"@types/jsdom": "^12.2.3",
|
||||
"@types/node": "^12.0.0",
|
||||
"@types/zen-observable": "^0.8.0",
|
||||
"@typescript-eslint/eslint-plugin": "^1.5.0",
|
||||
"ava": "^1.4.1",
|
||||
"del-cli": "^1.1.0",
|
||||
"eslint-config-xo-typescript": "^0.10.1",
|
||||
"@typescript-eslint/parser": "^1.10.2",
|
||||
"ava": "^2.1.0",
|
||||
"del-cli": "^2.0.0",
|
||||
"eslint-config-xo-typescript": "^0.14.0",
|
||||
"jsdom": "^15.0.0",
|
||||
"rxjs": "^6.4.0",
|
||||
"tempy": "^0.3.0",
|
||||
|
|
@ -85,6 +86,8 @@
|
|||
"BigUint64Array"
|
||||
],
|
||||
"rules": {
|
||||
"import/first": "off",
|
||||
"import/newline-after-import": "off",
|
||||
"@typescript-eslint/explicit-function-return-type": "off"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
/// <reference lib="dom"/>
|
||||
|
||||
// TODO: Use the `URL` global when targeting Node.js 10
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
const URLGlobal = typeof URL === 'undefined' ? require('url').URL : URL;
|
||||
|
||||
export type Class<T = unknown> = new (...args: any[]) => T;
|
||||
|
|
|
|||
15
test/test.ts
15
test/test.ts
|
|
@ -1,15 +1,14 @@
|
|||
import fs from 'fs';
|
||||
import net from 'net';
|
||||
import Stream from 'stream';
|
||||
import util from 'util';
|
||||
import tempy from 'tempy';
|
||||
import fs = require('fs');
|
||||
import net = require('net');
|
||||
import Stream = require('stream');
|
||||
import {inspect} from 'util';
|
||||
import tempy = require('tempy');
|
||||
import test, {ExecutionContext} from 'ava';
|
||||
import {JSDOM} from 'jsdom';
|
||||
import {Subject, Observable} from 'rxjs';
|
||||
import ZenObservable from 'zen-observable';
|
||||
import ZenObservable = require('zen-observable');
|
||||
import is, {TypeName} from '../source';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
const URLGlobal = typeof URL === 'undefined' ? require('url').URL : URL;
|
||||
|
||||
const isNode10orHigher = Number(process.versions.node.split('.')[0]) >= 10;
|
||||
|
|
@ -472,7 +471,7 @@ const testType = (t: ExecutionContext, type: string, exclude?: string[]) => {
|
|||
const assert = isTypeUnderTest ? t.true.bind(t) : t.false.bind(t);
|
||||
|
||||
for (const fixture of fixtures) {
|
||||
assert(testIs(fixture), `Value: ${util.inspect(fixture)}`);
|
||||
assert(testIs(fixture), `Value: ${inspect(fixture)}`);
|
||||
|
||||
if (isTypeUnderTest && typename) {
|
||||
t.is(is(fixture), typename);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue