Skip to content

feat: Support plugins with scoped names - #104

Merged
ta2edchimp merged 2 commits into
sarbbottam:masterfrom
scottnonnenberg:support-scoped
Jun 9, 2016
Merged

feat: Support plugins with scoped names#104
ta2edchimp merged 2 commits into
sarbbottam:masterfrom
scottnonnenberg:support-scoped

Conversation

@scottnonnenberg

Copy link
Copy Markdown
Contributor

I was getting this error:

Error: Cannot find module 'eslint-plugin-@scottnonnenberg/thehelp'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at getPluginRule (node_modules/eslint-find-rules/src/lib/rule-finder.js:41:26)
    ...

@codecov-io

codecov-io commented Jun 8, 2016

Copy link
Copy Markdown

Current coverage is 100%

Merging #104 into master will not change coverage

@@           master   #104   diff @@
====================================
  Files           9      9          
  Lines         199    206     +7   
  Methods         0      0          
  Messages        0      0          
  Branches        0      0          
====================================
+ Hits          199    206     +7   
  Misses          0      0          
  Partials        0      0          

Powered by Codecov. Last updated by 851d6e3...878a7f1

Comment thread test/lib/rule-finder.js Outdated
'react/bar-rule',
'react/baz-rule',
'react/foo-rule',
'something/two-rule',

@sarbbottam sarbbottam Jun 8, 2016

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Should something/two-rule to be @someone/something/two-rule?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As I understand the ESLint docs, the rules are to be referenced by their containing plugin's name (regardless of their possibly scoped package's name).

So for eslint-plugin-<plugin-name>'s rules, as well as @scope/eslint-plugin-<plugin-name>, its rules should be configured via <plugin-name>/<rule-name>.

Please correct me, if I'm wrong.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

May not be a practical use case, curious to know, how does eslint handle, two or more scoped plugins, of the same name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ta2edchimp I tested it in another project as I was working on this, and yes, for configuration rules take only the plugin name and not the scope name. Wasn't my first guess.

@sarbbottam

Copy link
Copy Markdown
Owner

@scottnonnenberg Thanks for the PR!

@scottnonnenberg

Copy link
Copy Markdown
Contributor Author

That should take care of all the feedback - let me know if you've got anything else!

@sarbbottam

sarbbottam commented Jun 8, 2016

Copy link
Copy Markdown
Owner

👍 looks great! Thanks!

@ta2edchimp please have a look and merge if you don't have any comments.

@sarbbottam

Copy link
Copy Markdown
Owner

Ohh, @scottnonnenberg please add yourself to the contributors list

@ta2edchimp
ta2edchimp merged commit 2443474 into sarbbottam:master Jun 9, 2016
@ta2edchimp

Copy link
Copy Markdown
Collaborator

Really cool, thanks for the PR!

scottnonnenberg added a commit to scottnonnenberg/eslint-config-thehelp that referenced this pull request Jun 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants