Definition for rule was not found

David Dietrich1
Tera Expert

Some of the developers on my team have noticed that recently ServiceNow code linter has begun throwing the following errors on new script includes using the default boilerplate code that gets auto-populated after the user enters a name for the script include:

 

Definition for rule 'sn-no-async-await' was not found.
Definition for rule 'sn-no-generator-functions' was not found.

Definition for rule 'sn-no-promises' was not found.

 

Screenshot:

DavidDietrich1_0-1746626235830.png

 

These warnings appear on every script include I've read in the platform recently, and although it doesn't seem to have any effect on the code output, it is annoying. Does anybody know how to resolve these warnings?

 

2 REPLIES 2

Abhijit4
Mega Sage

Hi @David Dietrich1 

 

These error comes up if there are issues with ESLint configuration.

 

To remove these errors, you can update system property glide.ui.syntax_editor.linter.eslint_config.ecmascript2021 to have below settings at the end.

 

"sn-no-async-await":"off",
"sn-no-generator-functions":"off",
"sn-no-promises":"off"

 

Abhijit4_1-1746628662892.png

 

If this doesn't work then update the same in below property as well ( most probably not needed assuming that you have latest ServiceNow version )

glide.ui.syntax_editor.linter.eslint_config

 

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

Hi @David Dietrich1 

 

I would love to know if your issue is resolved.

 

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP