Skip to content

Commit

Permalink
Fix failing config check when es6 notation is used
Browse files Browse the repository at this point in the history
  • Loading branch information
veeck committed May 7, 2021
1 parent b31c2a6 commit bf5edca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Special thanks to the following contributors: @B1gG, @codac, @ezeholz, @khassel,
- Fix alert not recognizing multiple alerts (#2522)
- Fix fetch option httpsAgent to agent in calendar module (#466)
- Fix module updatenotification which did not work for repos with many refs (#1907)
- Fix config check failing when encountering let syntax ("Parsing error: Unexpected token config")

## [2.15.0] - 2021-04-01

Expand Down
8 changes: 7 additions & 1 deletion js/check_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ function checkConfigFile() {
// I'm not sure if all ever is utf-8
const configFile = fs.readFileSync(configFileName, "utf-8");

const errors = linter.verify(configFile);
// Explicitly tell linter that he might encounter es6 syntax ("let config = {...}")
const errors = linter.verify(configFile, {
env: {
es6: true
}
});

if (errors.length === 0) {
Log.info(Utils.colors.pass("Your configuration file doesn't contain syntax errors :)"));
} else {
Expand Down

0 comments on commit bf5edca

Please sign in to comment.