types(cli): reduce ts-ignore

This commit is contained in:
chenjiahan
2020-03-14 19:00:19 +08:00
parent 637f2de35e
commit a9e94a29c6
12 changed files with 25 additions and 207 deletions

View File

@@ -2,7 +2,6 @@ import { join } from 'path';
import { ROOT } from '../common/constant';
import { ora, slimPath } from '../common/logger';
import { createWriteStream, readFileSync } from 'fs-extra';
// @ts-ignore
import conventionalChangelog from 'conventional-changelog';
const DIST_FILE = join(ROOT, './changelog.generated.md');

View File

@@ -1,4 +1,3 @@
// @ts-ignore
import execa from 'execa';
import { ora } from '../common/logger';
import { SCRIPT_EXTS } from '../common/constant';

View File

@@ -1,5 +1,4 @@
/* eslint-disable no-template-curly-in-string */
// @ts-ignore
import releaseIt from 'release-it';
import { join } from 'path';

View File

@@ -1,4 +1,3 @@
// @ts-ignore
import execa from 'execa';
import { consola } from './logger';
import { execSync } from 'child_process';

View File

@@ -1,4 +1,3 @@
// @ts-ignore
import { render, FileManager } from 'less';
import { readFileSync } from 'fs-extra';

View File

@@ -1,4 +1,3 @@
// @ts-ignore
import markdownVetur from '@vant/markdown-vetur';
import { join } from 'path';
import { get } from 'lodash';

View File

@@ -1,4 +1,3 @@
// @ts-ignore
import releaseIt from 'release-it';
import { build } from '../commands/build';
import { changelog } from '../commands/changelog';

View File

@@ -1,6 +1,5 @@
// @ts-ignore
import FriendlyErrorsPlugin from '@nuxt/friendly-errors-webpack-plugin';
import sass from 'sass';
import FriendlyErrorsPlugin from '@nuxt/friendly-errors-webpack-plugin';
import { VueLoaderPlugin } from 'vue-loader';
import {
CACHE_DIR,

View File

@@ -1,7 +1,6 @@
import merge from 'webpack-merge';
import HtmlWebpackPlugin from 'html-webpack-plugin';
// @ts-ignore
import WebpackBar from 'webpackbar';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import { get } from 'lodash';
import { join } from 'path';
import { baseConfig } from './webpack.base';

11
packages/vant-cli/src/module.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
// some modules with missing type definitions
declare module 'less';
declare module 'sass';
declare module 'execa';
declare module 'clean-css';
declare module 'webpackbar';
declare module 'release-it';
declare module 'html-webpack-plugin';
declare module 'conventional-changelog';
declare module '@vant/markdown-vetur';
declare module '@nuxt/friendly-errors-webpack-plugin';