Duplicated auto-generated rules header on Windows
Issue
eslint-doc-generator duplicates auto-generated rules headers leading to duplicate visible sections such as the following:
💼 This rule is enabled in the ✅ `recommended` config.
<!-- end auto-generated rule header -->
💼 This rule is enabled in the ✅ `recommended` config.
<!-- end auto-generated rule header -->
This problem seems to affect Windows only. I could not reproduce it on Ubuntu 22.04.4 LTS for example.
Versions
Operating System: Windows 11
Node.js: 20.12.2 LTS
eslint: 8.57.0
eslint-doc-generator: 1.7.0
Steps to reproduce
On Windows 11 with Node.js 20.12.2 LTS
git clone --branch show/doc-generation https://github.com/MikeMcC399/eslint-plugin-cypress --single-branch
cd eslint-plugin-cypress
npm ci
npx eslint-doc-generator
View the top of the file docs/rules/no-assigning-return-values.md.
For example, using the Git Bash shell:
head docs/rules/no-assigning-return-values.md
and note that the auto-generated rule header appears twice.
Thanks for the detailed report. I haven't been able to test on Windows yet but I suspect I have a fix in #524.
@bmish
- Thanks for picking this up in #524! I missed that it had already been reported in #510 as that issue was closed and I only recognized it as a duplicate after watching the video.
Let me know if https://github.com/bmish/eslint-doc-generator/releases/tag/v1.7.1 fixes this.
@bmish
Thank you very much for fixing this issue! I ran it on the production version of eslint-plugin-cypress and it's working perfectly now:
git clone https://github.com/cypress-io/eslint-plugin-cypress
cd eslint-plugin-cypress
npm ci
npm install [email protected] -D
npx eslint-doc-generator
No duplication of headers anymore!