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

Internal consistent-docs-url rule crashes if meta.docs isn't present #10722

Closed
platinumazure opened this issue Aug 2, 2018 · 1 comment
Closed
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly good first issue Good for people who haven't worked on ESLint before infrastructure Relates to the tools used in the ESLint development process rule Relates to ESLint's core rules

Comments

@platinumazure
Copy link
Member

Tell us about your environment

  • ESLint Version: master
  • Node Version: n/a
  • npm Version: n/a

What parser (default, Babel-ESLint, etc.) are you using?

Default

Please show your full configuration:

According to the internal ESLint config around rules:

rules:
    rulesdir/consistent-docs-url: "error"

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

module.exports = {
    meta: {}
};
npm run lint

What did you expect to happen?

Either a lint error about the lack of meta.docs (or meta.docs.url), or nothing if that is covered by another rule.

What actually happened? Please include the actual, raw output from ESLint.

ESLint crashes, with an error message from context.report that the node location must be passed if the node is not passed.


I believe the problem is in this area, where we check for the absence of metaDocsUrl but don't check that metaDocs is non-null before sending it to context.report.

@platinumazure platinumazure added bug ESLint is working incorrectly rule Relates to ESLint's core rules infrastructure Relates to the tools used in the ESLint development process accepted There is consensus among the team that this change meets the criteria for inclusion good first issue Good for people who haven't worked on ESLint before labels Aug 2, 2018
@s4san
Copy link
Contributor

s4san commented Aug 9, 2018

PR - #10749

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 8, 2019
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly good first issue Good for people who haven't worked on ESLint before infrastructure Relates to the tools used in the ESLint development process rule Relates to ESLint's core rules
Projects
None yet
Development

No branches or pull requests

2 participants