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

Commit 825d266

Browse files
committed
chore: remove unused getConfigPath
1 parent 6433da9 commit 825d266

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/worker-helpers.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -136,28 +136,6 @@ export function getConfigForFile(eslint, filePath) {
136136
}
137137
}
138138

139-
// Unused function
140-
export function getConfigPath(fileDir) {
141-
const configFile = findCached(fileDir, [
142-
'.eslintrc.js', '.eslintrc.yaml', '.eslintrc.yml', '.eslintrc.json', '.eslintrc', 'package.json'
143-
])
144-
if (configFile) {
145-
if (Path.basename(configFile) === 'package.json') {
146-
// eslint-disable-next-line import/no-dynamic-require
147-
if (require(configFile).eslintConfig) {
148-
return configFile
149-
}
150-
// If we are here, we found a package.json without an eslint config
151-
// in a dir without any other eslint config files
152-
// (because 'package.json' is last in the call to findCached)
153-
// So, keep looking from the parent directory
154-
return getConfigPath(Path.resolve(Path.dirname(configFile), '..'))
155-
}
156-
return configFile
157-
}
158-
return null
159-
}
160-
161139
export function getRelativePath(fileDir, filePath, config, projectPath) {
162140
const ignoreFile = config.advanced.disableEslintIgnore ? null : findCached(fileDir, '.eslintignore')
163141

0 commit comments

Comments
 (0)