{ "sublimelinter": "save-only", "jshint_options": { // To fix column positions for JSHint errors you may want to add `"indent": 1` to your // **User** "jshint_options". This issue affects users with tabs for indentation. // This fix was reverted due to a conflict with using the `"white": true` option. // "indent": 1, // 设置 JS 执行环境为浏览器 "browser": true, // 加载 jQuery 的全局变量(jQuery、$) "jquery": true, //禁止下划线的变量名 "nomen":true, // 行尾不要分号,false表示强制需要分号结尾 "asi": false, "white":true, // 其他全局变量,我用了 SeaJS "predef": [ "define", "seajs", "console" ] }, "sublimelinter_executable_map": { "javascript":"C:/Program Files/nodejs/node.exe", "css":"C:/Program Files/nodejs/node.exe" } }
6、jsformat 和jslint的配合使用(主要使格式化操作复合jslint的要求)
preference-》package setting-》jsformat-》setting user添加一下配置,主要把jslint_happy改为true。
{ // exposed jsbeautifier options "indent_with_tabs": false, "preserve_newlines": true, "max_preserve_newlines": 4, "space_in_paren": false, "jslint_happy": true, "brace_style": "collapse", "keep_array_indentation": false, "keep_function_indentation": false, "eval_code": false, "unescape_strings": false, "break_chained_methods": false, "e4x": false, "wrap_line_length": 0, // jsformat options "format_on_save": false, "format_selection": true, "jsbeautifyrc_files": false, "ignore_sublime_settings": true }