Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated auto-generated rules header on Windows #522

Closed
MikeMcC399 opened this issue Apr 27, 2024 · 4 comments ยท Fixed by #524
Closed

Duplicated auto-generated rules header on Windows #522

MikeMcC399 opened this issue Apr 27, 2024 · 4 comments ยท Fixed by #524
Labels
bug Something isn't working

Comments

@MikeMcC399
Copy link

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.

@bmish bmish added the bug Something isn't working label Apr 28, 2024
@bmish
Copy link
Owner

bmish commented Apr 28, 2024

Thanks for the detailed report. I haven't been able to test on Windows yet but I suspect I have a fix in #524.

@MikeMcC399
Copy link
Author

@bmish

@bmish
Copy link
Owner

bmish commented May 8, 2024

@MikeMcC399
Copy link
Author

@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 eslint-doc-generator@1.7.1 -D
npx eslint-doc-generator

No duplication of headers anymore!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants