我正在使用 wdio 和 mocha 框架以及我的 linter 包编写一些测试 https://atom.io/packages/linter和 https://atom.io/packages/linter-eslint显示一些问题(见评论):
describe('[On Board]', () => { //describe is not defined
before(() => { // before is not defined
browser.waitUntil() //browser is not defined
....
未定义的东西将由 wdio/mocha Testrunner 处理,所以我想告诉我的 linter/es-lint 包忽略这个问题。
这可能吗?
最佳答案
有两个选项:
- 包含定义
describe
和其他变量的命名空间。 - 或者您可以更新 .jshintrc 以使 linter 知道您正在使用 mocha 框架并忽略错误。 可能有帮助的链接:LINK
关于javascript - Atom linter/es-lint 禁用一些警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46421712/