Skip to content
Permalink
Browse files

Chore: Update references to old methods/types in hint

  • Loading branch information
sarvaje committed Nov 20, 2019
1 parent b43b60f commit f044c9b5a1ef400ab50a6065cea7a8c9758db8bc
@@ -14,13 +14,15 @@ import { promisify } from 'util';

import * as inquirer from 'inquirer';

import { ResourceType, UserConfig, utils } from 'hint';
import { utils } from 'hint';
import {
appInsights,
getOfficialPackages,
installPackages,
logger,
NpmPackage
NpmPackage,
ResourceType,
UserConfig
} from '@hint/utils';
import { cwd } from '@hint/utils-fs';
import { debug as d } from '@hint/utils-debug';
@@ -1,9 +1,7 @@
import * as Handlebars from 'handlebars';

import { readFileAsync } from '@hint/utils-fs';
import { utils } from 'hint';

const { packages: { loadHintPackage } } = utils;
import { loadHintPackage } from '@hint/utils';

const pkg = loadHintPackage();

@@ -10,13 +10,12 @@ import {
restoreReferences,
traverse
} from '@hint/utils-dom';

import {
ConnectorOptionsConfig,
IConnector,
FetchEnd,
NetworkData
} from 'hint/dist/src/lib/types';
import { ConnectorOptionsConfig } from '@hint/utils';

import { browser, document, eval, location, window } from '../shared/globals';
import { Events } from '../shared/types';
@@ -5,7 +5,8 @@ import { URL } from 'url';

import { Engine } from 'hint/dist/src/lib/engine';
import { Configuration } from 'hint/dist/src/lib/config';
import { HintResources, HintsConfigObject, IHintConstructor } from 'hint/dist/src/lib/types';
import { HintResources, IHintConstructor } from 'hint/dist/src/lib/types';
import { HintsConfigObject } from '@hint/utils';

import CSSParser from '@hint/parser-css';
import HTMLParser from '@hint/parser-html';
@@ -48,6 +48,7 @@
},
"description": "Run webhint in Visual Studio Code.",
"devDependencies": {
"@hint/utils": "^6.1.0",
"@hint/utils-telemetry": "^0.0.1",
"@hint/utils-types": "^0.0.1",
"@types/node": "^12.7.5",
@@ -1,4 +1,4 @@
const defaultConfig: import('hint').UserConfig = { extends: ['development'] };
const defaultConfig: import('@hint/utils').UserConfig = { extends: ['development'] };

export const getUserConfig = (hintModule: typeof import('hint'), directory: string) => {
const userConfig = hintModule.getUserConfig(directory) || defaultConfig;
@@ -15,7 +15,7 @@ export const getUserConfig = (hintModule: typeof import('hint'), directory: stri
* `iltorb` if it was compiled for a different version of `node` and the
* `local` connector doesn't support it anyway.
*/
(userConfig.hints as import('hint').HintsConfigObject)['http-compression'] = 'off';
(userConfig.hints as import('@hint/utils').HintsConfigObject)['http-compression'] = 'off';

// Remove formatters because the extension doesn't use them.
userConfig.formatters = [];
@@ -14,6 +14,7 @@
],
"references": [
{ "path": "../hint" },
{ "path": "../utils" },
{ "path": "../utils-telemetry" },
{ "path": "../utils-types" }
]
@@ -9,8 +9,8 @@ import anyTest, { TestInterface, ExecutionContext } from 'ava';
import { IServer, Server } from '@hint/utils-create-server';
import { readFileAsync } from '@hint/utils-fs';
import { asPathString, getAsUri, requestAsync } from '@hint/utils-network';

import { Configuration, Engine, HintsConfigObject, IHintConstructor, utils } from 'hint';
import { HintsConfigObject } from '@hint/utils';
import { Configuration, Engine, IHintConstructor, utils } from 'hint';
import { Problem, ProblemLocation } from '@hint/utils-types';

import { HintTest, HintLocalTest, Report, MatchProblemLocation } from './hint-test-type';
@@ -12,8 +12,7 @@ export * from './formatter';

export * from './config';
export * from './has-yarnlock';
export * from './types/config';
export * from './types/npm';
export * from './types';

export const appInsights = appInsightsUtils;
export const logger = loggingUtils;
@@ -0,0 +1,5 @@
export * from './config';
export * from './npm';
export * from './resource-error';
export * from './resource-error-status';
export * from './resource-type';
@@ -36,6 +36,7 @@ const ignoredDependencies = new Set([
'eslint-plugin-import',
'eslint-plugin-markdown',
'eslint-plugin-react-hooks',
'hint',
'npm-run-all',
'nyc',
'rimraf',

0 comments on commit f044c9b

Please sign in to comment.
You can’t perform that action at this time.