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

No extraneous dependencies, also documentation improvements #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

boutell
Copy link
Member

@boutell boutell commented Jul 11, 2018

No description provided.

@boutell boutell changed the title No extraneous dependencies No extraneous dependencies, also documentation improvements Jul 11, 2018
@boutell
Copy link
Member Author

boutell commented Jul 11, 2018

The "no extraneous dependencies" rule detects the situation where your project is depending on modules it doesn't have listed in package.json, and you are skating by because one of your other dependencies "just happens" to depend on that package... for now.

I think this one is highly valuable because a nested dependency like that can go away at any moment, like the lodash issue we had with a few client projects and apostrophe.

This is a really easy mistake to make — I added it because today someone pointed out that one newer file in apostrophe still depended on lodash and not @sailshq/lodash.... so I added this eslint rule... and found out that Apostrophe is requiring bluebird all over the place but doesn't have a dependency on it! 😱 That is only working because a dependency "just happens" to use Bluebird, this week. Yikes.

@boutell
Copy link
Member Author

boutell commented Jul 11, 2018

(Apostrophe has its own eslint package now, but I thought this was worth contributing back because it's going to be frequent with client projects too.)

README.md Outdated
@@ -1,6 +1,6 @@
## Install

This module is for advanced users looking for a shareable configuration across projects for ESLint.
This module is standard in all P'unk Avenue apostrophe projects. It provides warnings of potential bugs and errors in your code. It is recommended for developers of all skill levels working with Apostrophe.
Copy link
Contributor

Choose a reason for hiding this comment

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

ApostropheCMS instead of "apostrophe"

@bgantick
Copy link
Contributor

This doesn't seem to be a stock eslint rule. Is there a plugin required for this @boutell ?

@bgantick
Copy link
Contributor

bgantick commented Jul 11, 2018

Ah, I see it's part of eslint-config-standard - should we add all of our deps to package.json?: eslint-plugin-promise eslint-plugin-standard eslint-plugin-react eslint-config-standard

@boutell
Copy link
Member Author

boutell commented Jul 11, 2018 via email

abea
abea previously requested changes Jul 11, 2018
Copy link

@abea abea left a comment

Choose a reason for hiding this comment

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

Retracting as this plays out.

@bgantick
Copy link
Contributor

Gotcha, in that case does eslint-plugin-import not need to be installed since it's part of eslint-plugin-standard?

@punkhub
Copy link

punkhub commented Jul 11, 2018 via email

@bgantick
Copy link
Contributor

@boutell
Copy link
Member Author

boutell commented Jul 11, 2018 via email

@boutell
Copy link
Member Author

boutell commented Jul 12, 2018

I tested this. It works fine in a real project because our client-boilerplate already depends on eslint-plugin-import.

@austinstarin @abea there's been a bunch of discussion, I think matters are resolved, I still see "requested changes" from you guys. Can you update your reviews or let me know what is still actionable? Thanks!


In the project root directory run:

```bash
npm install eslint eslint-plugin-promise eslint-plugin-standard eslint-plugin-react eslint-config-standard eslint-config-punkave --save-dev
npm install eslint eslint-plugin-promise eslint-plugin-import
Copy link
Contributor

Choose a reason for hiding this comment

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

revert these lines?

@abea abea dismissed their stale review July 12, 2018 13:34

Letting others take the discussion.

@abea abea requested review from abea and removed request for abea August 30, 2019 15:09
@plantainrain plantainrain removed their request for review January 15, 2021 16:37
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.

5 participants