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

Add eslint-plugin-eslint-plugin internally and fix violations #1620

Merged
merged 2 commits into from
Jan 26, 2020

Conversation

bmish
Copy link
Contributor

@bmish bmish commented Jan 20, 2020

This PR adds eslint-plugin-eslint-plugin (a popular plugin for linting eslint plugins), enables relevant rules from it, and fixes violations.

The primary changes included are:

  1. Adds missing rule schemas (require-meta-schema).
    1a. Note that schema: [] is added to enforce when a rule should have no schema.
    1b. Removed the es6-only option from a test case for the named rule since that option was removed a long time ago.
  2. Adds missing rule type property to no-unused-modules rule (require-meta-type).
  3. Removes duplicate test cases (autofixed by no-identical-tests).

This PR adds [eslint-plugin-eslint-plugin](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin) (a popular plugin for linting eslint plugins), enables relevant rules from it, and fixes violations.

The primary changes included are:
1. Adds missing rule schemas ([require-meta-schema](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/docs/rules/require-meta-schema.md)). Note that `schema: []` is added to enforce when a rule should have no schema.
2. Adds missing rule `type` property to `no-unused-modules` rule ([require-meta-type](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/docs/rules/require-meta-type.md)).
3. Removes duplicate test cases ([no-identical-tests](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/docs/rules/no-identical-tests.md)).
@bmish bmish force-pushed the eslint-plugin-eslint-plugin branch from d87a5c0 to 084a02d Compare January 20, 2020 20:15
@coveralls
Copy link

Coverage Status

Coverage decreased (-4.1%) to 93.717% when pulling 084a02d on bmish:eslint-plugin-eslint-plugin into f84d457 on benmosher:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-4.1%) to 93.717% when pulling 084a02d on bmish:eslint-plugin-eslint-plugin into f84d457 on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.1%) to 93.717% when pulling 084a02d on bmish:eslint-plugin-eslint-plugin into f84d457 on benmosher:master.

@coveralls
Copy link

coveralls commented Jan 20, 2020

Coverage Status

Coverage remained the same at 97.837% when pulling 2d42464 on bmish:eslint-plugin-eslint-plugin into 99647f1 on benmosher:master.

@bmish bmish force-pushed the eslint-plugin-eslint-plugin branch 2 times, most recently from dd564cb to d296ecf Compare January 20, 2020 23:58
@bmish bmish requested a review from ljharb January 25, 2020 19:26
@bmish
Copy link
Contributor Author

bmish commented Jan 25, 2020

It looks like there are some Node 4 + eslint 2/3 failures due to incompatibility with eslint-plugin-eslint-plugin. As a path forward, I could still fix all the violations without actually adding the new dev dependency on eslint-plugin-eslint-plugin?

src/rules/no-nodejs-modules.js Show resolved Hide resolved
tests/src/rules/no-commonjs.js Outdated Show resolved Hide resolved
@bmish bmish force-pushed the eslint-plugin-eslint-plugin branch from d296ecf to 16ac399 Compare January 25, 2020 23:47
@ljharb ljharb force-pushed the eslint-plugin-eslint-plugin branch from 16ac399 to 1c7bb29 Compare January 26, 2020 07:44
@ljharb
Copy link
Member

ljharb commented Jan 26, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants