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

Commit

Permalink
fix: fail silently if config finder fails
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Jan 22, 2020
1 parent 1430175 commit ceeda1a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ module.exports = (filePath, source, isLiterate, linterConfig) => {

// eslint-disable-next-line import/no-dynamic-require
let configFinder = require(`${coffeeLintPath}/lib/configfinder`);
let config = configFinder.getConfig(filePath);
let config;
try {
config = configFinder.getConfig(filePath);
} catch (ex) {
// this version of coffeelint could not find a config file
// fail silently
}

if (!showUpgradeError) {
if (configImportsModules(config) && semver.lt(coffeelint.VERSION, '1.9.5')) {
Expand Down

0 comments on commit ceeda1a

Please sign in to comment.