File tree Expand file tree Collapse file tree 3 files changed +3290
-42
lines changed Expand file tree Collapse file tree 3 files changed +3290
-42
lines changed Original file line number Diff line number Diff line change 77 " index.js" ,
88 " recommended.js"
99 ],
10+ "scripts" : {
11+ "test" : " jest"
12+ },
1013 "publishConfig" : {
1114 "access" : " public"
1215 },
2932 "@typescript-eslint/parser" : " ^2.7.0" ,
3033 "eslint" : " ^6.6.0" ,
3134 "eslint-plugin-vue" : " ^6.0.1" ,
35+ "execa" : " ^3.3.0" ,
36+ "jest" : " ^24.9.0" ,
3237 "typescript" : " ^3.7.2" ,
3338 "vue" : " ^2.6.10" ,
3439 "vue-property-decorator" : " ^8.3.0"
Original file line number Diff line number Diff line change 1+ const path = require ( 'path' )
2+ const execa = require ( 'execa' )
3+
4+ const eslintPath = path . resolve ( __dirname , '../node_modules/.bin/eslint' )
5+
6+ async function lintProject ( name ) {
7+ const projectPath = path . resolve ( __dirname , name )
8+ const filesToLint = path . resolve ( projectPath , '**' )
9+
10+ return await execa ( eslintPath , [ `${ filesToLint } ` ] , {
11+ cwd : projectPath
12+ } )
13+ }
14+
15+ test ( 'a default project should pass lint' , async ( ) => {
16+ await lintProject ( 'default' )
17+ } )
18+
19+ test ( 'should lint .ts file' , async ( ) => {
20+ // TODO:
21+ } )
22+
23+ test ( 'should lint vue sfc' , async ( ) => {
24+ // TODO:
25+ } )
26+
27+ test ( 'should lint .tsx' , async ( ) => {
28+ // TODO:
29+ } )
You can’t perform that action at this time.
0 commit comments