Eslint Rule to show warn message whenever we use gs.log in our scripts

Rajat_Singhal
Tera Expert
Is there a way we can create custom eslint rule in servicenow which can through warning message whenever we use gs.log function in any Script?
1 ACCEPTED SOLUTION

Rajat_Singhal
Tera Expert

Updated the eslint property with below code snippet and it worked..

 

"no-restricted-properties": [ "warn", {
"object": "gs",
"property": "log",
"message": "optional explanation to the recurring problems we've had"
}]

View solution in original post

1 REPLY 1

Rajat_Singhal
Tera Expert

Updated the eslint property with below code snippet and it worked..

 

"no-restricted-properties": [ "warn", {
"object": "gs",
"property": "log",
"message": "optional explanation to the recurring problems we've had"
}]