File tree 3 files changed +3290
-42
lines changed
3 files changed +3290
-42
lines changed Original file line number Diff line number Diff line change 7
7
" index.js" ,
8
8
" recommended.js"
9
9
],
10
+ "scripts" : {
11
+ "test" : " jest"
12
+ },
10
13
"publishConfig" : {
11
14
"access" : " public"
12
15
},
29
32
"@typescript-eslint/parser" : " ^2.7.0" ,
30
33
"eslint" : " ^6.6.0" ,
31
34
"eslint-plugin-vue" : " ^6.0.1" ,
35
+ "execa" : " ^3.3.0" ,
36
+ "jest" : " ^24.9.0" ,
32
37
"typescript" : " ^3.7.2" ,
33
38
"vue" : " ^2.6.10" ,
34
39
"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