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

Add support for eslint-plugin-redux-saga #33

Merged
merged 1 commit into from
Jan 25, 2019

Conversation

amercier
Copy link
Contributor

@amercier amercier commented Jan 25, 2019

Description

This PR adds support for eslint-plugin-redux-saga.

Note: eslint-plugin-redux-saga supports the https://github.com/USERNAME/eslint-plugin-PLUGINNAME/blob/master/docs/rules/RULENAME.md convention.

Ex: redux-saga/no-yield-in-race.

PR

@amercier
Copy link
Contributor Author

amercier commented Jan 25, 2019

/cc @pke This PR unlocks documentation support for eslint-plugin-redux-saga in multiple places, including Atom's Linter (through linter-eslint). I hope you're ok with that :)

image
Example in Atom. After this PR is merged and plugin updated, the 🔗 link will point to the corresponding .md file in your repo.

@pke
Copy link

pke commented Jan 25, 2019

👍 absolutely @amercier, thanks for the info.
Thats what open source is all about! Building on top of each others contributions.
If there is anything I can do to help improving the docs, give me a hint.

I wonder however where the text from your screenshot is derived from?

@amercier
Copy link
Contributor Author

amercier commented Jan 25, 2019

Thanks! Do you mean, the A saga must [...] (use try/catch) error message? It's coming through ESLint from your plugin itself, I suppose: https://github.com/pke/eslint-plugin-redux-saga/blob/develop/lib/rules/no-unhandled-errors.js#L58

@pke
Copy link

pke commented Jan 25, 2019

Yes, I thought it extracts it from the documentation somehow.

@amercier
Copy link
Contributor Author

Yep, errors are extracted from ESLint output and processed here: https://github.com/AtomLinter/linter-eslint/blob/master/src/helpers.js#L240-L334

@Arcanemagus
Copy link
Collaborator

Please note that this package is only a legacy workaround for this functionality. The correct way to specify documentation is to specify the meta.docs.url property as shown in the documentation for rules.

linter-eslint at least supports both methods of specifying the documentation location, but ideally you should be using the official method!

Copy link
Collaborator

@Arcanemagus Arcanemagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this is a legacy workaround, there's nothing against merging this 😉.

@Arcanemagus Arcanemagus merged commit 51af88f into jfmengels:master Jan 25, 2019
@amercier amercier deleted the patch-1 branch January 25, 2019 17:43
@amercier
Copy link
Contributor Author

@Arcanemagus Thanks for merging and the explanation! Good to know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants