Use let instead of var, fix failing test.
This commit is contained in:
+4
-2
@@ -16,14 +16,16 @@ type ConfigurationOptions = {
|
||||
|
||||
export function readConfigFile(filePath: string = CONFIG_FILEPATH): ConfigurationOptions {
|
||||
// By default we want to fail on all severities and allow all licenses.
|
||||
var defaultOptions: ConfigurationOptions = {
|
||||
const defaultOptions: ConfigurationOptions = {
|
||||
fail_on_severity: "low",
|
||||
allow_licenses: ['all'],
|
||||
deny_licenses: []
|
||||
}
|
||||
|
||||
let data
|
||||
|
||||
try {
|
||||
var data = fs.readFileSync(path.resolve(filePath), "utf-8");
|
||||
data = fs.readFileSync(path.resolve(filePath), "utf-8");
|
||||
} catch (error: any) {
|
||||
if (error.code && error.code === 'ENOENT') {
|
||||
return defaultOptions
|
||||
|
||||
Reference in New Issue
Block a user