mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-05-20 21:49:14 +08:00
build(CI): add lint & build (#4224)
* build(workflows): add lint & build * build(workflows): build:lib * fix(Components): fix typescript type
This commit is contained in:
parent
7979dee465
commit
11e83e5f4d
32
.github/workflows/test.yml
vendored
Normal file
32
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '14.x'
|
||||
|
||||
- name: Install dependencies
|
||||
uses: bahmutov/npm-install@v1
|
||||
|
||||
- name: Run linter
|
||||
run: npm run lint
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '14.x'
|
||||
|
||||
- name: Install dependencies
|
||||
uses: bahmutov/npm-install@v1
|
||||
|
||||
- name: Build
|
||||
run: npm run build:lib
|
@ -1,7 +1,11 @@
|
||||
import { basic } from '../mixins/basic';
|
||||
import { VantComponentOptions } from 'definitions/index';
|
||||
|
||||
function mapKeys(source: object, target: object, map: object) {
|
||||
function mapKeys(
|
||||
source: Record<string, any>,
|
||||
target: Record<string, any>,
|
||||
map: Record<string, any>
|
||||
) {
|
||||
Object.keys(map).forEach((key) => {
|
||||
if (source[key]) {
|
||||
target[map[key]] = source[key];
|
||||
|
@ -1,3 +1,4 @@
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export function isFunction(val: unknown): val is Function {
|
||||
return typeof val === 'function';
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import { VantComponent } from '../common/component';
|
||||
import { pickerProps } from './shared';
|
||||
|
||||
interface Column {
|
||||
values: object[];
|
||||
values: any[];
|
||||
defaultIndex?: number;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user