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

Updating TODO's deletes ember-template-lint TODOs #80

Closed
achambers opened this issue Feb 1, 2021 · 8 comments · Fixed by #86
Closed

Updating TODO's deletes ember-template-lint TODOs #80

achambers opened this issue Feb 1, 2021 · 8 comments · Fixed by #86
Assignees
Labels
bug Something isn't working

Comments

@achambers
Copy link

What I expected to happen

Run UPDATE_TODO=1 eslint --format @scalvert/eslint-formatter-todo and see a list of new eslint TODOs

What actually happened

I ran UPDATE_TODO=1 eslint --format @scalvert/eslint-formatter-todo and saw a list of new eslint TODOs but also all existing ember-template-lint TODOs were deleted.


It looks like running eslint with this formatter deletes any TODOs that were created by https://github.com/ember-template-lint/ember-template-lint which I was not expecting to happen.

I see that you're involved with ember-template-lint so I imagine your intention would be to have them co-exist.

I see in the todo json file that an engine property is present which suggests that tools like this should be able to target only TODOs generated for this tool.

Am I doing something wrong or is this a legit bug?

@achambers
Copy link
Author

I got around this by passing in ESLINT_TODO_DIR to use a different directory than .lint-todo which works. However, it feels like this shouldn't be necessary as the engine prop of the stored json files should be enough to allow the tool to work out which TODO's apply to it.

ESLINT_TODO_DIR="./.eslint-todo" UPDATE_TODO=1 yarn lint:js --format @scalvert/eslint-formatter-todo

@rwjblue
Copy link
Collaborator

rwjblue commented Feb 4, 2021

Thanks for reporting @achambers!

@rwjblue
Copy link
Collaborator

rwjblue commented Feb 4, 2021

I see that you're involved with ember-template-lint so I imagine your intention would be to have them co-exist.

Ya, they absolutely are being developed to work well together (and "feel" the same in both worlds). This is a bug for sure.

@scalvert
Copy link
Collaborator

scalvert commented Feb 4, 2021

Oh wow this was a massive oversight on my part! Sorry for that, @achambers! I'll work on fixing this tomorrow. Thanks for reporting.

@achambers
Copy link
Author

Thanks folks. Very much appreciated. Love your work :)

@achambers
Copy link
Author

achambers commented Feb 4, 2021

I’m happy to submit a PR myself, if that helps, if you can give me a steer on where to look.

@scalvert
Copy link
Collaborator

scalvert commented Feb 4, 2021

It's all good. I should have this fixed by end of day. Was just testing an api to support this in the underlying todo-utils lib that both linting libraries use.

@scalvert
Copy link
Collaborator

scalvert commented Feb 5, 2021

Fixed in https://github.com/scalvert/eslint-formatter-todo/releases/tag/v1.3.1

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.

3 participants