你先得告诉俺们你用的 checker 是什么?Syntastic 并不提供语法检查的规则,它只是一个语法检查运行器,每一种语言都有语法检查工具,Syntastic 只是负责使用它们而已。对应的规则应该去哪些语法检查工具里查看或修改。
#2 楼 @booobstar 试一下 coffeelint 吧,coffee 自己貌似蛮严格,也不知道可不可以调整。
曾经有一段时间我写 coffeescript 的,一直用的 coffeelint,感觉还不错,后来回归 Vanilla Javascript 了,也不知道 coffeelint 现在是否还好用?
看看我的配置(注释掉的 coffeelint)
还有 coffee-lint.json 的配置:
{
"coffeescript_error": {
"level": "error"
},
"arrow_spacing": {
"name": "arrow_spacing",
"level": "ignore"
},
"no_tabs": {
"name": "no_tabs",
"level": "error"
},
"no_trailing_whitespace": {
"name": "no_trailing_whitespace",
"level": "error",
"allowed_in_comments": false,
"allowed_in_empty_lines": true
},
"max_line_length": {
"name": "max_line_length",
"value": 80,
"level": "ignore",
"limitComments": true
},
"line_endings": {
"name": "line_endings",
"level": "ignore",
"value": "unix"
},
"no_trailing_semicolons": {
"name": "no_trailing_semicolons",
"level": "error"
},
"indentation": {
"name": "indentation",
"value": 2,
"level": "error"
},
"camel_case_classes": {
"name": "camel_case_classes",
"level": "error"
},
"colon_assignment_spacing": {
"name": "colon_assignment_spacing",
"level": "ignore",
"spacing": {
"left": 0,
"right": 0
}
},
"no_implicit_braces": {
"name": "no_implicit_braces",
"level": "ignore",
"strict": true
},
"no_plusplus": {
"name": "no_plusplus",
"level": "ignore"
},
"no_throwing_strings": {
"name": "no_throwing_strings",
"level": "error"
},
"no_backticks": {
"name": "no_backticks",
"level": "ignore"
},
"no_implicit_parens": {
"name": "no_implicit_parens",
"strict": true,
"level": "ignore"
},
"no_empty_param_list": {
"name": "no_empty_param_list",
"level": "ignore"
},
"no_stand_alone_at": {
"name": "no_stand_alone_at",
"level": "ignore"
},
"space_operators": {
"name": "space_operators",
"level": "ignore"
},
"duplicate_key": {
"name": "duplicate_key",
"level": "error"
},
"empty_constructor_needs_parens": {
"name": "empty_constructor_needs_parens",
"level": "ignore"
},
"cyclomatic_complexity": {
"name": "cyclomatic_complexity",
"value": 10,
"level": "ignore"
},
"newlines_after_classes": {
"name": "newlines_after_classes",
"value": 3,
"level": "ignore"
},
"no_unnecessary_fat_arrows": {
"name": "no_unnecessary_fat_arrows",
"level": "warn"
},
"missing_fat_arrows": {
"name": "missing_fat_arrows",
"level": "ignore"
},
"non_empty_constructor_needs_parens": {
"name": "non_empty_constructor_needs_parens",
"level": "ignore"
},
"no_unnecessary_double_quotes": {
"name": "no_unnecessary_double_quotes",
"level": "ignore"
},
"no_debugger": {
"name": "no_debugger",
"level": "ignore"
},
"no_interpolation_in_single_quotes": {
"name": "no_interpolation_in_single_quotes",
"level": "ignore"
},
"no_empty_functions": {
"name": "no_empty_functions",
"level": "ignore"
}
}
关于视频,是的我一直在录,只是还没有公开发布,还没有到我满意的程度