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
merged 1 commit into from Feb 24, 2018

Conversation

not-an-aardvark
Copy link
Member

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

@not-an-aardvark not-an-aardvark added the chore This change is not user-facing label Feb 23, 2018
@ilyavolodin
Copy link
Member

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.

@not-an-aardvark
Copy link
Member Author

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
@not-an-aardvark not-an-aardvark deleted the refactor-directive-comments branch February 24, 2018 19:40
This was referenced Mar 22, 2018
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Aug 25, 2018
@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 Aug 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion chore This change is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants