sarbbottam / eslint-find-rules

Find built-in ESLint rules you don't have in your custom config
http://npm.im/eslint-find-rules
MIT License
201 stars 33 forks source link

fix(rule-finder): Support scoped packages with dashes #305

Closed chrisblossom closed 4 years ago

chrisblossom commented 5 years ago

Use eslint's internal functions to support shorthand eslint plugin naming.

fix #303

chrisblossom commented 5 years ago

Are there any other requested changes to get this PR moving along?

ljharb commented 4 years ago

@chrisblossom I'm afraid that now that this is rebased on top of eslint 6 support, the eslint 6 tests are failing.

chrisblossom commented 4 years ago

I'm afraid that now that this is rebased on top of eslint 6 support, the eslint 6 tests are failing.

I’ll look into this soon.

chrisblossom commented 4 years ago

Looks like one of the issues is that eslint moved the naming file in 6.1.0.

v6.0.1: lib/cli-engine/naming.js v6.1.0: lib/shared/naming.js

ljharb commented 4 years ago

Sigh. Let’s do another try/catch require on that then.

chrisblossom commented 4 years ago

Tests pass now. Also increased the mocha timeout in test/lib/rule-finder.js because tests would randomly fail.

...
    ✓ no specifiedFile - all available rules including deprecated
    1) specifiedFile (relative path) - unused rules
    ✓ specifiedFile (relative path) - unused rules including deprecated (1756ms)
    ✓ specifiedFile (relative path) - current rules (1697ms)
    ✓ specifiedFile (relative path) - current rule config (1722ms)
    ✓ specifiedFile (relative path) - plugin rules (1717ms)

...

  64 passing (39s)
  1 failing

  1) rule-finder specifiedFile (relative path) - unused rules:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
      at processImmediate (internal/timers.js:439:21)
chrisblossom commented 4 years ago

Who else needs to review this PR to get it merged and released? I'd like to be able to start using this with my typescript eslint config.