[英]Is there an indent option for jslint or has it been removed?
缩进选项似乎不再被识别。
http://linterrors.com/js/option-indent
这仍然是 jslint 的一个选项还是已被删除?
我尝试在此处使用 web 接口以多种语法对其进行设置,但我一直收到错误消息。
错误的选项“缩进”。
/*jslint
bitwise,
browser:true,
indent: 2
*/
function test () {
const test = "hello SO";
}
研究:
github上的更改日志似乎很小,并没有提及。
编辑: jslint最近使用指令/*jslint indent2*/
添加了 2-space 缩进支持
我是jslint维护者。 玩弄了一个补丁重新引入指令/*jslint indent2*/
以使 jslint 更容易被已经使用 2-space indents here的项目访问。
您可以为它发布功能请求@ https://github.com/jslint-org/jslint/issues以加快进程。
最新的 jslint 具有以下指令:
// Optional directives.
// .... /*jslint beta*/ .......... Enable experimental features.
// .... /*jslint bitwise*/ ....... Allow bitwise operators.
// .... /*jslint browser*/ ....... Assume browser environment.
// .... /*jslint convert*/ ....... Allow conversion operators.
// .... /*jslint couch*/ ......... Assume CouchDb environment.
// .... /*jslint debug*/ ......... Include jslint stack-trace in warnings.
// .... /*jslint devel*/ ......... Allow console.log() and friends.
// .... /*jslint eval*/ .......... Allow eval().
// .... /*jslint for*/ ........... Allow for-statement.
// .... /*jslint getset*/ ........ Allow get() and set().
// .... /*jslint long*/ .......... Allow long-lines.
// .... /*jslint name*/ .......... Allow weird property-names.
// .... /*jslint node*/ .......... Assume Node.js environment.
// .... /*jslint single*/ ........ Allow single-quote strings.
// .... /*jslint test_internal_error*/ ... Test jslint's internal-error
// ........................................... handling-ability.
// .... /*jslint this*/ .......... Allow 'this'.
// .... /*jslint unordered*/ ..... Allow unordered cases, params, properties.
// .... /*jslint variable*/ ...... Allow unordered const and let declarations
// ................................... that are not at top of function-scope.
// .... /*jslint white: true...... Allow messy whitespace.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.