Skip to content

Commit f8fd333

Browse files
committed
simplify validateNoBreakingConfig options
1 parent f50623e commit f8fd333

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/server/lib/config.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const convertRelativeToAbsolutePaths = (projectRoot, obj, defaults = {}) => {
6363
, {})
6464
}
6565

66-
const validateNoBreakingConfig = ({ config, configFile }) => {
66+
const validateNoBreakingConfig = (config) => {
6767
breakingOptions.forEach(({ name, errorKey, newName, isWarning, value }) => {
6868
if (config.hasOwnProperty(name)) {
6969
if (value && config[name] !== value) {
@@ -76,15 +76,15 @@ const validateNoBreakingConfig = ({ config, configFile }) => {
7676
name,
7777
newName,
7878
value,
79-
configFile,
79+
configFile: config.configFile,
8080
})
8181
}
8282

8383
return errors.throw(errorKey, {
8484
name,
8585
newName,
8686
value,
87-
configFile,
87+
configFile: config.configFile,
8888
})
8989
}
9090
})
@@ -317,7 +317,7 @@ export function mergeDefaults (config: Record<string, any> = {}, options: Record
317317
return errors.throw('CONFIG_VALIDATION_ERROR', errMsg)
318318
})
319319

320-
validateNoBreakingConfig({ config, configFile: options.configFile })
320+
validateNoBreakingConfig(config)
321321

322322
return setSupportFileAndFolder(config)
323323
.then(setPluginsFile)

0 commit comments

Comments
 (0)