简体   繁体   English

为之前的提交禁用 eslint

[英]Disable eslint for previous commits

I am new to eslint and prettier.我是 eslint 和漂亮的新手。 I am trying to set these up and wondering if there is a way to disable eslint and prettier for previous commits in the repo and run it only on the new code or new checkins?我正在尝试设置这些并想知道是否有办法为 repo 中的先前提交禁用 eslint 和 prettier,并仅在新代码或新签入上运行它? Thanks in advance for the help.在此先感谢您的帮助。

Maybe can try this https://github.com/grvcoelho/lint-diff .也许可以试试这个https://github.com/grvcoelho/lint-diff

And check:并检查:

..., it cannot be used to enforce the styleguide on a Continuous Integration service like Travis, because the changes are already commited. ...,它不能用于在像 Travis 这样的持续集成服务上强制执行样式指南,因为更改已经提交。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM