Skip to content

Chore: refactor directive comment processing#10007

Merged
not-an-aardvark merged 1 commit intomasterfrom
refactor-directive-comments
Feb 24, 2018
Merged

Chore: refactor directive comment processing#10007
not-an-aardvark merged 1 commit intomasterfrom
refactor-directive-comments

Conversation

@not-an-aardvark
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants