mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-24 15:39:15 +08:00
[improvement] lint ts/tsx files (#2776)
This commit is contained in:
parent
29fad2235a
commit
0013185d38
@ -16,7 +16,7 @@
|
||||
"scripts": {
|
||||
"bootstrap": "yarn || npm i",
|
||||
"dev": "npm run build:entry && webpack-serve --config build/webpack.dev.js",
|
||||
"lint": "eslint ./packages --ext .js,.vue && stylelint \"packages/*.css\"",
|
||||
"lint": "eslint ./packages --ext .js,.vue,.ts,.tsx && stylelint \"packages/*.css\"",
|
||||
"build:entry": "node build/build-entry.js",
|
||||
"build:components": "node build/build-components.js --color",
|
||||
"build:vant": "cross-env NODE_ENV=production webpack --color --config build/webpack.build.js && cross-env NODE_ENV=production webpack -p --color --config build/webpack.build.js",
|
||||
@ -76,7 +76,7 @@
|
||||
"@babel/preset-env": "^7.3.1",
|
||||
"@babel/preset-typescript": "^7.1.0",
|
||||
"@vant/doc": "^1.0.23",
|
||||
"@vant/eslint-config": "^1.0.8",
|
||||
"@vant/eslint-config": "^1.1.0",
|
||||
"@vant/markdown-loader": "^1.0.3",
|
||||
"@vue/babel-preset-jsx": "^1.0.0-beta.2",
|
||||
"@vue/server-test-utils": "^1.0.0-beta.29",
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { use } from '../utils';
|
||||
import { emit, inherit } from '../utils/functional';
|
||||
import { routeProps, functionalRoute } from '../mixins/router';
|
||||
import { routeProps, RouteProps, functionalRoute } from '../mixins/router';
|
||||
import Loading from '../loading';
|
||||
|
||||
// Types
|
||||
import { RouteProps } from '../mixins/router';
|
||||
import { FunctionalComponent } from '../utils/use/sfc';
|
||||
|
||||
const [sfc, bem] = use('button');
|
||||
|
@ -1,11 +1,10 @@
|
||||
import { use, isDef } from '../utils';
|
||||
import { cellProps } from './shared';
|
||||
import { cellProps, SharedCellProps } from './shared';
|
||||
import { emit, inherit } from '../utils/functional';
|
||||
import { routeProps, functionalRoute } from '../mixins/router';
|
||||
import Icon from '../icon';
|
||||
|
||||
// Types
|
||||
import { SharedCellProps } from './shared';
|
||||
import { FunctionalComponent } from '../utils/use/sfc';
|
||||
import { Mods } from '../utils/use/bem';
|
||||
|
||||
@ -78,7 +77,7 @@ const Cell: FunctionalComponent<CellProps> = function(h, props, slots, ctx) {
|
||||
{slots.extra && slots.extra()}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export type CellProps = SharedCellProps & {
|
||||
size?: string;
|
||||
|
@ -28,7 +28,7 @@ export type ModelOptions = {
|
||||
export interface VantComponentOptions extends ComponentOptions<Vue> {
|
||||
functional?: boolean;
|
||||
install?: (Vue: VueConstructor) => void;
|
||||
};
|
||||
}
|
||||
|
||||
export type DefaultProps = Record<string, any>;
|
||||
|
||||
|
50
yarn.lock
50
yarn.lock
@ -777,6 +777,32 @@
|
||||
"@types/unist" "*"
|
||||
"@types/vfile-message" "*"
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^1.3.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.3.0.tgz#e64c859a3eec10d96731eb5f72b5f48796a2f9ad"
|
||||
integrity sha512-s+vjO9+PvYS2A6FnQC/imyEDOkrEKIzSpPf2OEGnkKqa5+1d0cuXgCi/oROtuBht2/u/iK22nrYcO/Ei4R8F/g==
|
||||
dependencies:
|
||||
"@typescript-eslint/parser" "1.3.0"
|
||||
requireindex "^1.2.0"
|
||||
tsutils "^3.7.0"
|
||||
|
||||
"@typescript-eslint/parser@1.3.0", "@typescript-eslint/parser@^1.3.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.3.0.tgz#e61e795aa050351b7312a757e0864b6d90b84078"
|
||||
integrity sha512-Q5cz9nyEQyRrtItRElvQXdNs0Xja1xvOdphDQR7N6MqUdi4juWVNxHKypdHQCx9OcEBev6pWHOda8lwg/2W9/g==
|
||||
dependencies:
|
||||
"@typescript-eslint/typescript-estree" "1.3.0"
|
||||
eslint-scope "^4.0.0"
|
||||
eslint-visitor-keys "^1.0.0"
|
||||
|
||||
"@typescript-eslint/typescript-estree@1.3.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.3.0.tgz#1d1f36680e5c32c3af38c1180153f018152f65f9"
|
||||
integrity sha512-h6UxHSmBUopFcxHg/eryrA+GwHMbh7PxotMbkq9p2f3nX60CKm5Zc0VN8krBD3IS5KqsK0iOz24VpEWrP+JZ2Q==
|
||||
dependencies:
|
||||
lodash.unescape "4.0.1"
|
||||
semver "5.5.0"
|
||||
|
||||
"@vant/doc@^1.0.23":
|
||||
version "1.0.23"
|
||||
resolved "https://registry.yarnpkg.com/@vant/doc/-/doc-1.0.23.tgz#401752f576f39e46ac8dacf6225906a2355b8093"
|
||||
@ -789,11 +815,13 @@
|
||||
nprogress "^0.2.0"
|
||||
shelljs "^0.8.2"
|
||||
|
||||
"@vant/eslint-config@^1.0.8":
|
||||
version "1.0.9"
|
||||
resolved "https://registry.yarnpkg.com/@vant/eslint-config/-/eslint-config-1.0.9.tgz#c72460dc134366208461a1ec8643317c035cde28"
|
||||
integrity sha512-DgBBKRugX6GU/CVp0UsR2426iZtQa8sOHZgBuRwdEWS5O7OlSlSO849EVXT4ACCriDzWCgJL8zpQGNGeUA3GlA==
|
||||
"@vant/eslint-config@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@vant/eslint-config/-/eslint-config-1.1.0.tgz#27b7f3892a0859245186fd415deca1e2be5cb954"
|
||||
integrity sha512-3c+A4PUQIn/7gDV1N2yaUv27wb24LwX0RPBMvH2sdV336ZYotL9XgdzelgtdaxLA4dq/77UsyVzvuGzjJUKUKQ==
|
||||
dependencies:
|
||||
"@typescript-eslint/eslint-plugin" "^1.3.0"
|
||||
"@typescript-eslint/parser" "^1.3.0"
|
||||
babel-eslint "^10.0.1"
|
||||
eslint-config-airbnb-base "^13.1.0"
|
||||
eslint-plugin-import "^2.14.0"
|
||||
@ -8614,6 +8642,11 @@ require-main-filename@^1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
|
||||
integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=
|
||||
|
||||
requireindex@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef"
|
||||
integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==
|
||||
|
||||
requirejs-config-file@^3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/requirejs-config-file/-/requirejs-config-file-3.1.1.tgz#ccb8efbe2301c24ac0cf34dd3f3c862741750f5c"
|
||||
@ -9770,11 +9803,18 @@ ts-jest@^23.10.5:
|
||||
semver "^5.5"
|
||||
yargs-parser "10.x"
|
||||
|
||||
tslib@^1.9.0:
|
||||
tslib@^1.8.1, tslib@^1.9.0:
|
||||
version "1.9.3"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
|
||||
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==
|
||||
|
||||
tsutils@^3.7.0:
|
||||
version "3.8.0"
|
||||
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.8.0.tgz#7a3dbadc88e465596440622b65c04edc8e187ae5"
|
||||
integrity sha512-XQdPhgcoTbCD8baXC38PQ0vpTZ8T3YrE+vR66YIj/xvDt1//8iAhafpIT/4DmvzzC1QFapEImERu48Pa01dIUA==
|
||||
dependencies:
|
||||
tslib "^1.8.1"
|
||||
|
||||
tty-browserify@0.0.0:
|
||||
version "0.0.0"
|
||||
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
|
||||
|
Loading…
x
Reference in New Issue
Block a user