最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Prettier: Run for only the changed lines of the file - Stack Overflow

programmeradmin4浏览0评论

I have a legacy codebase without eslint/prettier. I want to introduce formatting on pre-mit hooks. Lint staged will let you run prettier for only changed files. Is it possible to only run the prettier just for changed lines? Like IntelliJ's inbuild formatting allows for only VCS changed text formatting.

I have a legacy codebase without eslint/prettier. I want to introduce formatting on pre-mit hooks. Lint staged will let you run prettier for only changed files. Is it possible to only run the prettier just for changed lines? Like IntelliJ's inbuild formatting allows for only VCS changed text formatting.

Share Improve this question edited Jun 29, 2022 at 15:38 BuZZ-dEE 6,99116 gold badges74 silver badges105 bronze badges asked Oct 15, 2020 at 1:16 sreejithsreejith 2532 silver badges8 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 2

Hope you have solved the issue by now. For others, A fix for this was introduced in the August 2020 (version 1.49) update. Check out this link for more info. link

发布评论

评论列表(0)

  1. 暂无评论