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: use eslint-plugin-rulesdir instead of --rulesdir for self-linting #9164

Merged
merged 2 commits into from Oct 28, 2017

Conversation

not-an-aardvark
Copy link
Member

@not-an-aardvark not-an-aardvark commented Aug 26, 2017

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 updates our internal linting build to use eslint-plugin-rulesdir rather than the --rulesdir CLI flag.

We've been talking about deprecating rulesdir for awhile, so I think it would be good for us to dogfood some of the alternatives for using project-specific linting rules.

#9163 is another way of solving the same problem. This PR is mutually exclusive with #9163.

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

We should choose between this approach and the approach in #9163. Which do you prefer?

@not-an-aardvark not-an-aardvark added chore This change is not user-facing evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Aug 26, 2017
@eslintbot
Copy link

LGTM

@mention-bot
Copy link

@not-an-aardvark, thanks for your PR! By analyzing the history of the files in this pull request, we identified @mysticatea, @aladdin-add and @btmills to be potential reviewers.

@eslintbot
Copy link

LGTM

"eslint-plugin/prefer-placeholders": "error",
"eslint-plugin/report-message-format": ["error", "[^a-z].*\\.$"],
"eslint-plugin/test-case-property-ordering": "error",
"eslint-plugin/test-case-shorthand-strings": "error"
Copy link
Member

Choose a reason for hiding this comment

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

"eslint-plugin/no-identical-tests" has been added in recommended.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, but I think we should remove it in a separate PR -- this PR is only supposed to change the format of the config file without modifying how it works.

Copy link
Member

Choose a reason for hiding this comment

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

it has been removed in the master. so I think better not to add it again.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, oops. I hadn't realized that it was removed on master.

@@ -1,3 +1,3 @@
rules:
internal-no-invalid-meta: "error"
internal-consistent-docs-description: "error"
rulesdir/no-invalid-meta: "error"
Copy link
Member

Choose a reason for hiding this comment

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

what about change this to .eslintrc.js -- for consistency.

Copy link
Member Author

Choose a reason for hiding this comment

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

¯\_(ツ)_/¯ I'm fine with this, but I was assuming people would prefer to keep files as .yml wherever possible, and only use .js config files when necessary.

@eslintbot
Copy link

LGTM

@eslintbot
Copy link

LGTM

@eslintbot
Copy link

LGTM

@eslintbot
Copy link

LGTM

@not-an-aardvark not-an-aardvark merged commit 2224733 into master Oct 28, 2017
@not-an-aardvark not-an-aardvark deleted the use-eslint-plugin-rulesdir branch October 28, 2017 08:41
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Apr 27, 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 Apr 27, 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 evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants