Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit c6494e0

Browse files
committed
Revert "fix: fallback to other methods when global Eslint is not found"
This reverts commit be1a35a.
1 parent 4dd6500 commit c6494e0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/worker-helpers.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ function isDirectory(dirPath) {
4747
return isDir
4848
}
4949

50-
export function findESLintDirectory(modulesDir, config, projectPath, fallback = false) {
50+
export function findESLintDirectory(modulesDir, config, projectPath) {
5151
let eslintDir = null
5252
let locationType = null
53-
if (config.global.useGlobalEslint && !fallback) {
53+
if (config.global.useGlobalEslint) {
5454
locationType = 'global'
5555
const configGlobal = cleanPath(config.global.globalNodePath)
5656
const prefixPath = configGlobal || getNodePrefixPath()
@@ -79,8 +79,7 @@ export function findESLintDirectory(modulesDir, config, projectPath, fallback =
7979
}
8080

8181
if (config.global.useGlobalEslint) {
82-
console.warn('ESLint not found, please ensure the global Node path is set correctly. \n Using other methods to find Eslint...')
83-
findESLintDirectory(modulesDir, config, projectPath, true)
82+
throw new Error('ESLint not found, please ensure the global Node path is set correctly.')
8483
}
8584

8685
return {

0 commit comments

Comments
 (0)