sublime text - sublimeLinter - 配置规则

时间:2016-05-21 19:41:28

标签: sublimetext3 sublimetext eslint sublimelinter

我想使用全局linting规则(sublimeLinter)配置ESLINT,因此我的所有javascript文件都将使用这些规则进行处理。我已经ESLINT 已配置并且正在工作(在我的GULP文件中):

"rules": {
    "no-mixed-spaces-and-tabs" : [2, "smart-tabs"],
    "block-spacing"            : [2, "always"],
    "comma-style"              : [2, "last"],
    "no-debugger"              : [2],
    "no-alert"                 : [2],
    "indent"                   : [1, 4],
    "strict"                   : 0,
    "no-undef"                 : 1
},
"ecmaFeatures" : {
    "modules": true,
    "sourceType": "module"
},
"parserOptions": {
    "ecmaVersion" : 6,
    "sourceType": "module",
    "ecmaFeatures": {
        "jsx": false,
        "experimentalObjectRestSpread": true
    }
},
"envs": [
    "browser", "es6"
]

我想知道如何配置sublimeLInter以使用上述设置。

SublimeLinter.sublime-设置

{
    "user": {
        "debug"                 : false,
        "delay"                 : 0.25,
        "error_color"           : "D02000",
        "gutter_theme" : "Packages/SublimeLinter/gutter-themes/Default/Default-theme",
        "gutter_theme_excludes" : [],
        "lint_mode"             : "background",
        "linters"               : {
            "eslint": {
                "@disable" : false,
                "args"     : [],
                "excludes" : []
            }
        },
        "mark_style"                : "solid underline",
        "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",
            "php"           : "html",
            "python django" : "python"
        },
        "warning_color" : "DDB700",
        "wrap_find"     : true
    }
}

谢谢!

0 个答案:

没有答案