File tree 3 files changed +15
-7
lines changed
3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 60
60
"vue-eslint-parser" : " ^7.1.0"
61
61
},
62
62
"devDependencies" : {
63
- "@types/eslint" : " ^6.8.1 " ,
63
+ "@types/eslint" : " ^7.2.0 " ,
64
64
"@types/natural-compare" : " ^1.4.0" ,
65
65
"@types/node" : " ^13.13.5" ,
66
66
"@typescript-eslint/parser" : " ^3.0.2" ,
Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ categories.forEach((category) => {
88
88
} )
89
89
90
90
// Format files.
91
- const linter = new eslint . CLIEngine ( { fix : true } )
92
- const report = linter . executeOnFiles ( [ ROOT ] )
93
- eslint . CLIEngine . outputFixes ( report )
91
+ async function format ( ) {
92
+ const linter = new eslint . ESLint ( { fix : true } )
93
+ const report = await linter . lintFiles ( [ ROOT ] )
94
+ eslint . ESLint . outputFixes ( report )
95
+ }
96
+
97
+ format ( )
Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ module.exports = {
43
43
fs . writeFileSync ( filePath , content )
44
44
45
45
// Format files.
46
- const linter = new eslint . CLIEngine ( { fix : true } )
47
- const report = linter . executeOnFiles ( [ filePath ] )
48
- eslint . CLIEngine . outputFixes ( report )
46
+ async function format ( ) {
47
+ const linter = new eslint . ESLint ( { fix : true } )
48
+ const report = await linter . lintFiles ( [ filePath ] )
49
+ eslint . ESLint . outputFixes ( report )
50
+ }
51
+
52
+ format ( )
You can’t perform that action at this time.
0 commit comments