File tree Expand file tree Collapse file tree
src/built-in-plugins/command-test/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " pri" ,
3- "version" : " 4.0.20-beta.1 " ,
3+ "version" : " 4.0.20" ,
44 "types" : " src/node/index.ts" ,
55 "main" : " built/node/index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as path from 'path';
22import { pri } from '../../../node' ;
33import { testsPath } from '../../../utils/structor-config' ;
44import { typeChecker } from '../../../utils/type-checker' ;
5+ import { IOpts } from './interface' ;
56
67pri . project . whiteFileRules . add ( file => {
78 return path . format ( file ) . startsWith ( path . join ( pri . projectRootPath , testsPath . dir ) ) ;
@@ -16,13 +17,21 @@ pri.packages.forEach(eachPackage => {
1617pri . commands . registerCommand ( {
1718 name : [ 'test' ] ,
1819 description : 'Run tests.' ,
19- action : async ( ) => {
20- await pri . project . lint ( {
21- lintAll : false ,
22- needFix : true ,
23- showBreakError : true ,
24- } ) ;
25- typeChecker ( ) ;
20+ options : {
21+ skipLint : {
22+ description : 'Skip lint' ,
23+ } ,
24+ } ,
25+ action : async ( options : IOpts ) => {
26+ if ( ! options . skipLint ) {
27+ await pri . project . lint ( {
28+ lintAll : false ,
29+ needFix : true ,
30+ showBreakError : true ,
31+ } ) ;
32+ typeChecker ( ) ;
33+ }
34+
2635 await pri . project . ensureProjectFiles ( ) ;
2736 await pri . project . checkProjectFiles ( ) ;
2837
Original file line number Diff line number Diff line change 1+ export interface IOpts {
2+ skipLint ?: boolean ;
3+ }
You can’t perform that action at this time.
0 commit comments