fix/optimize wtv-news, wtv-proxy, wtv-register, wtv-search, wtv-setup, wtv-star

This commit is contained in:
zefie
2025-08-12 19:19:23 -04:00
parent d5f41837c0
commit 74ec365ae1
20 changed files with 141 additions and 133 deletions

View File

@@ -138,6 +138,13 @@ function checkScopeErrors(file) {
// Check if either service name exists and is privileged
const service = config.services[serviceNameWithPrefix] || config.services[serviceNameWithoutPrefix];
if (serviceName === "wtv-news") {
eslintConfig.globals = {
...eslintConfig.globals,
"wtvnewsserver": "readonly"
};
}
if (service && service.privileged === true) {
// Add additional globals for privileged services
@@ -150,12 +157,12 @@ function checkScopeErrors(file) {
"classPath": "readonly",
"session_data": "readonly",
};
if (service.modules) {
for (const moduleName of service.modules) {
eslintConfig.globals[moduleName] = "readonly";
}
}
}
if (service.modules) {
for (const moduleName of service.modules) {
eslintConfig.globals[moduleName] = "readonly";
}
}
}
} catch (e) {
// If we can't load config, just continue with basic globals