Unverified Commit 3821662e authored by matamatanot's avatar matamatanot Committed by GitHub

Replace `CLIEngine` with `ESLint` (#25801)

Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent 38152222
const escape = require('shell-quote').quote const escape = require('shell-quote').quote
const { CLIEngine } = require('eslint') const { ESLint } = require('eslint')
const cli = new CLIEngine({}) const eslint = new ESLint()
const isWin = process.platform === 'win32' const isWin = process.platform === 'win32'
module.exports = { module.exports = {
...@@ -12,7 +12,7 @@ module.exports = { ...@@ -12,7 +12,7 @@ module.exports = {
return [ return [
`prettier --with-node-modules --ignore-path .prettierignore_staged --write ${escapedFileNames}`, `prettier --with-node-modules --ignore-path .prettierignore_staged --write ${escapedFileNames}`,
`eslint --no-ignore --max-warnings=0 --fix ${filenames `eslint --no-ignore --max-warnings=0 --fix ${filenames
.filter((file) => !cli.isPathIgnored(file)) .filter((file) => !eslint.isPathIgnored(file))
.map((f) => `"${f}"`) .map((f) => `"${f}"`)
.join(' ')}`, .join(' ')}`,
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment