(xoConfig: XoConfigItem[])
| 86 | @param xoConfig - The flat XO config to validate. |
| 87 | */ |
| 88 | export const validateXoConfig = (xoConfig: XoConfigItem[]): void => { |
| 89 | // Skip the first item (internal base config prepended by XO) |
| 90 | for (const config of xoConfig.values().drop(1)) { |
| 91 | for (const key of Object.keys(config)) { |
| 92 | const hint = legacyPropertyHints[key]; |
| 93 | if (hint !== undefined) { |
| 94 | throw new Error(`Invalid XO config property \`${key}\`. ${hint}`); |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | }; |
| 99 | |
| 100 | /** |
| 101 | Once a config is resolved, it is pre-processed to ensure that all properties are set correctly. |
no outgoing calls
no test coverage detected
searching dependent graphs…