SonarJS - how to avoid “Non-existent variables sho

2019-02-21 01:34发布

I have a JavaScript project that consists of several source files. These files are referenced in <script> tags in index.html page. There are functions and variables defined in those source files and used in other source files. The problem is that Sonar treats those files as independent and I got

Non-existent variables should not be referenced (javascript:S3827)

issue. Can anybody help how to avoid this?

Thanks

Pavel

1条回答
趁早两清
2楼-- · 2019-02-21 02:16

This rule requires configuration. List names of variables and functions shared across files in "sonar.javascript.globals" project property.

查看更多
登录 后发表回答