我已经花了几个小时没有太大的进步。我正在使用SublimeLinter v1.7 [1]运行Sublime Text 2.0.2。它可以实时地发布Python,但对于许多其他语言,我使用日常[Javascript,Ruby,CSS / SCSS等],它只会在保存时通过控制台显示格式错误的警告[2]。我已经为可执行映射尝试了许多设置。我目前有:
"sublimelinter_executable_map":
{
"javascript": "/usr/local/bin/node",
"node": "/usr/local/bin/node"
},
我也有“javascript”:“/ usr / local / bin / node”。我也尝试使用jshint和jslint作为“javascript_linter”选项。
控制台显示SublimeLinter加载并启用javascript,CSS和Ruby(分别使用node,ruby和node)。
在控制台上启用消息后,我得到:
Traceback (most recent call last):
File "./SublimeLinter.py", line 431, in _update_view
File "./SublimeLinter.py", line 143, in run_once
File "./sublimelinter/modules/base_linter.py", line 291, in run
File "./sublimelinter/modules/javascript.py", line 72, in parse_errors
ValueError: Error from jslint: util.puts: Use console.log instead
也:
SublimeLinter: css enabled (using node.js)
Traceback (most recent call last):
File "./SublimeLinter.py", line 431, in _update_view
File "./SublimeLinter.py", line 143, in run_once
File "./sublimelinter/modules/base_linter.py", line 291, in run
File "./sublimelinter/modules/css.py", line 24, in parse_errors
ValueError: Error from csslint: util.puts: Use console.log instead
接下来是原始linting消息,例如:
[{"id":"(error)","raw":"Use spaces, not tabs.","evidence":"\t\"published\":
\"#444444\",","line":4,"character":1,"reason":"Use spaces, not tabs."},{"id":"
(error)","raw":"Expected '{a}' at column {b}, not column
{c}.","evidence":"\t\"published\":
[1]根据https://github.com/SublimeLinter/SublimeLinter/issues/512我回滚到v1.7以获得PEP8 linting工作。
[2] Coffeescript得到实时linting,这很好。
答案 0 :(得分:1)
显然,这已在Sublime 3中修复:
https://github.com/SublimeLinter/SublimeLinter-for-ST2/issues/560