Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 14, 2019
1 parent 7bf407f commit ffc6ce4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -85,6 +86,8 @@
"BigUint64Array"
],
"rules": {
"import/first": "off",
"import/newline-after-import": "off",
"@typescript-eslint/explicit-function-return-type": "off"
}
}
Expand Down
1 change: 0 additions & 1 deletion source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
15 changes: 7 additions & 8 deletions test/test.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ffc6ce4

Please sign in to comment.