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

Support the ESLint Suggestions API #441

Open
sindresorhus opened this issue Nov 23, 2019 · 6 comments
Open

Support the ESLint Suggestions API #441

sindresorhus opened this issue Nov 23, 2019 · 6 comments

Comments

@sindresorhus
Copy link
Owner

sindresorhus commented Nov 23, 2019

There have been many cases where we could not provide auto-fixers because it was either not safe or there were multiple possible fixes. The Suggestions API enables us to provide multiple fixes that can be manually chosen by a user in an editor.

We should go through existing rules with no auto-fixers or with incomplete auto-fixers and make them support the Suggestions API.


This will be especially useful for #460 (comment)

@fisker
Copy link
Collaborator

fisker commented Nov 23, 2019

we need eslint-ava-rule-tester support, right?

@sindresorhus
Copy link
Owner Author

Maybe. Could simply be that we need to add a condition for it here: https://github.com/jfmengels/eslint-ava-rule-tester/blob/67878c62376c0f45e534eef00202be49d3c37fc5/index.js#L30-L32

@fisker
Copy link
Collaborator

fisker commented Dec 10, 2020

We already using this API, we'll try to use it if other rules need it, let's close this.

@fisker fisker closed this as completed Dec 10, 2020
@sindresorhus
Copy link
Owner Author

sindresorhus commented Dec 10, 2020

I think we should still keep it open until we have reviewed each rule to see if we could add suggestion API to any. Before the suggestion API existed, we chose to leave out autofixing on many rules, and they could now get a suggestion instead. We could then open an issue for each rule where we could add it.

Help welcome with gathering a list of rules that could have suggestions.

@fisker fisker reopened this Dec 10, 2020
@fisker
Copy link
Collaborator

fisker commented Dec 10, 2020

Sure

@fisker
Copy link
Collaborator

fisker commented Nov 19, 2022

I may accidentally unpinned a pinned issue when scrolling issue list on mobile, and it's not showing in recent updated. Not sure what is it.

@sindresorhus sindresorhus unpinned this issue Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants