airbnb / javascript

JavaScript Style Guide
MIT License
145.28k stars 26.52k forks source link

Documentation for 'import/no-extraneous-dependencies' is missing #2727

Open cseas opened 1 year ago

cseas commented 1 year ago

The rule is set to error in the config: https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/imports.js#L71

But there's no mention of it in the guide: https://github.com/airbnb/javascript/blob/master/README.md

This rule should be mentioned under the Modules section.

ljharb commented 1 year ago

Sure, that's fine. It's been a best practice in node for over a decade so I guess it just went without saying :-)

MohitBansal321 commented 1 year ago

Sure, that's fine. It's been a best practice in node for over a decade so I guess it just went without saying :-)

I didn't find link related to this rule on eslint

ljharb commented 1 year ago

It's part of eslint-plugin-import.

MohitBansal321 commented 1 year ago

It's part of eslint-plugin-import.

Link (this one?) on which part of the modules should be added?

ljharb commented 1 year ago

Yep, that's the rule.

I guess as a new section at the end of Modules?

meddy672 commented 1 year ago

I have a PR up. Please take a look.

Vivek-04022001 commented 1 year ago

Could you please let me know if this issue is still open for contributions? If so, I would be very interested in working on it. Thank you!

ljharb commented 1 year ago

@Vivek-04022001 no, the comment directly above yours links to a PR.

utkarsh-shrivastav77 commented 1 year ago

Hi is this issue still open

ljharb commented 1 year ago

@utkarsh-shrivastav77 yes, but it has a PR open.

cyberwarrior-20 commented 1 year ago

hi @cseas i can solve this issue please assign me

angeloreale commented 6 months ago

My .50 cents? Why is it something should be made a code style pattern if it can directly affect bundle sizes for ES modules?

ljharb commented 6 months ago

Everything can affect that, and that’s just not a rubric anyone should be applying to how your code is written.