我安装了SublimeLinter和SublimeLinter-jshint,JSHint本身也可以。但是,我无法配置JSHint。我试图将jshint设置添加到SublimeLinter.sublime-settings,但似乎对JSHint没有影响。 这就是我的设置(首选项>包设置> SublimeLinter>设置 - 用户)看起来像:
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"jshint": {
"@disable": false,
"args": [],
"excludes": [],
"maxdepth": 1,
"strict": "global",
"sub": true
}
},
"mark_style": "outline",
"no_column_highlights_line": false,
"passive_warnings": false,
"paths": {
"linux": [],
"osx": [],
"windows": []
},
"python_paths": {
"linux": [],
"osx": [],
"windows": []
},
"rc_search_limit": 3,
"shell_timeout": 10,
"show_errors_on_save": false,
"show_marks_in_minimap": true,
"syntax_map": {
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"javascript (babel)": "javascript",
"magicpython": "python",
"php": "html",
"python django": "python",
"pythonimproved": "python"
},
"warning_color": "DDB700",
"wrap_find": true
}
}
我添加了一些示例设置,例如'“maxdepth”:1',但这些规则不适用。这里缺少什么?
答案 0 :(得分:1)
来自Github上README的Settings部分,也可在Package Control page上找到:
您可以使用
来完成此操作jshint
文件以命令行的方式配置.jshintrc
个选项。有关更多信息,请参阅jshint docs。 linter插件通过搜索.jshintrc
文件[...]
阅读所有说明的完整部分和链接文档,然后在适合您项目的位置放置.jshintrc
文件。