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

Chore: refactor directive comment processing #10007

merged 1 commit into from Feb 24, 2018


Copy link

@not-an-aardvark not-an-aardvark commented Feb 23, 2018

What is the purpose of this pull request? (put an "X" next to item)

[x] Other, please explain:

What changes did you make? (Give an overview)

This makes a few improvements to directive comment processing in linter.js:

  • Avoids internally adding some unrelated properties to config objects
  • Fixes some code duplication
  • Avoids some unnecessary branches

Note: it might be useful to view the diff with whitespace changes omitted (link)

Is there anything you'd like reviewers to focus on?

Nothing in particular

Copy link

@ilyavolodin ilyavolodin commented Feb 24, 2018

I know this is not directly related, but I would love to move comment processing out of linter completely. They are not related, and comments processing shares a lot of logic with config processing.

Copy link
Member Author

@not-an-aardvark not-an-aardvark commented Feb 24, 2018

I agree. At the moment the function's API is still a bit cluttered because the function gets a lot of information from various places, but maybe it can be simplified and extracted.

@not-an-aardvark not-an-aardvark merged commit 558ccba into master Feb 24, 2018
5 checks passed
@not-an-aardvark not-an-aardvark deleted the refactor-directive-comments branch Feb 24, 2018
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Aug 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants