在 Sublime Text 的 JSLint 插件中容忍 ++ 运算符

Tolerate ++ operator in JSLint plugin for Sublime Text

我为 ST 使用 JSLint 插件(除了 Sublime​Linter-jshint 插件)。

我不同意 ++-- 的使用是邪恶的、狡猾的等理论,并且可以很自由地使用它们。因此,我不喜欢我应该在整个代码中使用 += 1 而不是 ++ 的警告。

我尝试按照 Unexpected '++' in jslint 在我的代码开头添加行 /*jslint plusplus: true */ 但这没有帮助。

如何为 JSLint ST 插件进行全局设置以允许使用 ++--

我搜索了 JSLint repo on Github, and couldn't find any mention of a plusplus option in the current version of jslint.js. So, I did some digging, and found that the plusplus option was removed in this commit on May 1, 2015 (it was still present in the previous commit). Here 是 Crockford 的公告,他将在他的下一个版本中删除该选项等。

因此,由于大约一年前删除了此选项,因此您将无法将它用于当前版本的 JSLint。