fix/optimize wtv-news, wtv-proxy, wtv-register, wtv-search, wtv-setup, wtv-star
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user