ci: add lint to ci

This commit is contained in:
07akioni 2021-06-05 09:51:57 +08:00
parent 48760addcb
commit 5e72ea718a
3 changed files with 4 additions and 3 deletions

View File

@ -26,4 +26,5 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
- run: npm run test

View File

@ -17,7 +17,7 @@
"lint:code": "eslint --fix \"{src,build,scripts,demo}/**/*.{ts,tsx,js,vue,md}\"",
"format": "npm run format:code && npm run format:md",
"format:code": "prettier --write \"(src|demo)/**/*.(vue|js)\"",
"format:md": "prettier --write --parser markdown --prose-wrap never \"demo/**/*.md\"",
"format:md": "prettier --write --parser markdown --prose-wrap never \"(src|demo)/**/*.md\"",
"test": "cross-env NODE_ENV=test jest --collectCoverage=false",
"test:cov": "cross-env NODE_ENV=test jest",
"gen-version": "node scripts/gen-version",
@ -90,7 +90,7 @@
"eslint-plugin-markdown": "^2.0.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-standard": "^4.1.0",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-vue": "^7.6.0",
"express": "^4.17.1",
"fs-extra": "^9.0.1",

View File

@ -38,7 +38,7 @@ export default defineComponent({
pLineHeight,
pMargin,
pTextColor,
[`pTextColor${typeSafeDepth}Depth` as `pTextColor${typeof typeSafeDepth}Depth`]: depthTextColor
[`pTextColor${typeSafeDepth}Depth` as const]: depthTextColor
}
} = themeRef.value
return {