Skip to content

Commit

Permalink
Replace CLIEngine with ESLint (vercel#25801)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
matamatanot and kodiakhq[bot] authored Jun 9, 2021
1 parent 3815222 commit 3821662
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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'

module.exports = {
Expand All @@ -12,7 +12,7 @@ module.exports = {
return [
`prettier --with-node-modules --ignore-path .prettierignore_staged --write ${escapedFileNames}`,
`eslint --no-ignore --max-warnings=0 --fix ${filenames
.filter((file) => !cli.isPathIgnored(file))
.filter((file) => !eslint.isPathIgnored(file))
.map((f) => `"${f}"`)
.join(' ')}`,
]
Expand Down

0 comments on commit 3821662

Please sign in to comment.