JSLint (CLI):选项?

发布于 2024-07-14 07:06:03 字数 292 浏览 4 评论 0原文

我正在运行 JSLintRhino 版本 从 Ubuntu 命令行如下所示:

$ rhino jslint.js myScript.js

虽然 Web 界面提供了各种选项,但我不知道如何通过命令行调用这些选项。 我是否忽略了文档中的任何内容?

I'm running JSLint's Rhino version from the Ubuntu command line like so:

$ rhino jslint.js myScript.js

While the web interface offers various options, I couldn't figure out how to invoke those via the command line.
Am I overlooking anything in the documentation?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

烦人精 2024-07-21 07:06:03

是的! 你确实错过了。 您可以在 .js 文件顶部指定 jslint 的选项。 请参阅文档页面并阅读选项部分以获取示例。

Yes! You did miss it. You can specify the options for jslint at the top of your .js file. See the doc page and read the options section for an example.

不如归去 2024-07-21 07:06:03

我的 jslint4java 项目包含一个命令行工具,允许您添加诸如 --undef 之类的标志。 这可能比手动运行更有用。

My jslint4java project includes a command line tool that allows you to add in flags like --undef. This may be more useful than running it by hand.

亢潮 2024-07-21 07:06:03

我受到上面讨论的启发,并扩展了我的 JSLint 包装器 相应地编写脚本。
这是相当原始的,但似乎可以完成工作。

I was inspired by the discussion above, and extended my JSLint wrapper script accordingly.
It's fairly primitive, but seems to do the job.

¢蛋碎的人ぎ生 2024-07-21 07:06:03

jslint 有一个 perl+js 包装器,Cory Bennet 组合在一起(基于 Ian Bicking 的 现有技术)。 它有命令行选项等。他甚至详细介绍了一些通过编译模式挂钩进行的 Emacs 集成。

我遇到了一些麻烦,并在让它在 Cygwin 和 Emacs32 中工作上写了一些注释。

类似的问题还有一些其他选项: Is there an Offline version of用于 Windows 的 jslint?

There is a perl+js wrapper for jslint that Cory Bennet put together (based on Ian Bicking's prior art). It's got command-line options, etc. He even details some Emacs integration via a compile-mode hook.

I had some trouble, and put some notes up on getting it to work in Cygwin and Emacs32.

There are some other options in a similar question: Is there an offline version of jslint for windows?

九厘米的零° 2024-07-21 07:06:03

我想出了一个基于 jQuery 的命令行 jslint 解决方案 jslint- check.js 脚本,通过其 Makefile

I came up with a command line jslint solution based on jQuery's jslint-check.js script, which is executed within Rhino via their Makefile.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文