我如何在下一个开发(Next.js)中查看棉布消息
当我使用 next dev
(来自 next.js 库的命令)时,很高兴看到我在 watch/ 中运行 next lint
时收到的警告编译/服务“循环”。这可能吗?
When I use next dev
(a command from the next.js library) it would be nice to see the warnings I get when I run next lint
as part of the watch/compile/serve "loop". Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有点骇客,但是我的解决方案是在
下一个dev
之前始终运行下一个lint
。我在我的package.json
中添加了一个新命令:现在,如果
下一个lint
通过(无错误,仅警告),它运行news dev ;否则,该过程停止到达那里,直到固定错误为止。
It's a bit hacky, but my solution is to always run
next lint
beforenext dev
. I added a new command in mypackage.json
like so:Now, if
next lint
passes (no errors, only warnings), it runsnext dev
; otherwise, the process stops there until the errors are fixed.将这些设置添加到包装。这将确保检查文件&在拥有运行应用程序的同时,有覆盖。
Add these settings to the package.json and run
npm run dev:ts
. This will ensure files are checked & linted while having a running app.