Skip to content

Commit 0123434

Browse files
committed
chore(tools): use ESLint class
1 parent f3224ba commit 0123434

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

tools/update-lib-configs.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ categories.forEach((category) => {
8888
})
8989

9090
// Format files.
91-
const linter = new eslint.CLIEngine({ fix: true })
92-
const report = linter.executeOnFiles([ROOT])
93-
eslint.CLIEngine.outputFixes(report)
91+
async function main() {
92+
const linter = new eslint.ESLint({ fix: true })
93+
const report = await linter.lintFiles([ROOT])
94+
eslint.ESLint.outputFixes(report)
95+
}
96+
97+
main()

tools/update-lib-index.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ module.exports = {
4343
fs.writeFileSync(filePath, content)
4444

4545
// Format files.
46-
const linter = new eslint.CLIEngine({ fix: true })
47-
const report = linter.executeOnFiles([filePath])
48-
eslint.CLIEngine.outputFixes(report)
46+
async function main() {
47+
const linter = new eslint.ESLint({ fix: true })
48+
const report = await linter.lintFiles([filePath])
49+
eslint.ESLint.outputFixes(report)
50+
}
51+
52+
main()

0 commit comments

Comments
 (0)