pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/airbnb/javascript/pull/2748

hub.githubassets.com/assets/actions-902e75f4f51a80db.css" /> added rule import/no-extraneous-dependencies to docs by meddy672 · Pull Request #2748 · airbnb/javascript · GitHub
Skip to content

added rule import/no-extraneous-dependencies to docs#2748

Draft
meddy672 wants to merge 4 commits intoairbnb:masterfrom
meddy672:editorial-fix-missing-import/no-extraneous-dependencies
Draft

added rule import/no-extraneous-dependencies to docs#2748
meddy672 wants to merge 4 commits intoairbnb:masterfrom
meddy672:editorial-fix-missing-import/no-extraneous-dependencies

Conversation

@meddy672
Copy link
Copy Markdown

@meddy672 meddy672 commented Mar 23, 2023

Added the eslint rule import/no-extraneous-dependencies to the modules section. Fixes #2727

Comment thread README.md

```

<a name="modules--import/no-extraneous-dependencies"></a><a name="10.11"></a>
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.

new sections don't get numbered links.

Suggested change
<a name="modules--import/no-extraneous-dependencies"></a><a name="10.11"></a>
<a name="modules--import/no-extraneous-dependencies"></a>

Comment thread README.md
<a name="modules--import/no-extraneous-dependencies"></a><a name="10.11"></a>

- [10.11](#modules--import/no-extraneous-dependencies) Forbid the use of extraneous packages.
eslint: [`import/no-extraneous-dependencies`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md)
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.

Suggested change
eslint: [`import/no-extraneous-dependencies`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md)
eslint: [`import/no-extraneous-dependencies`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md)

Comment thread README.md
Comment on lines +1483 to +1490
// Not declared in package.json - es6.js
import es6 from 'es6';
const es6 = require('es6');

// good
// Declared in package.json es6.js
import es6 from 'es6';
const es6 = require('es6');
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.

let's use a package name someone's actually likely to use here.

but also, i'm not sure how helpful this example is since it's not showing package.json. but maybe that'd be overkill?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I added this lint rule in our project when someone tried to use "axios" without mentioning it in package.json. That can be used as an example.

@ljharb ljharb marked this pull request as draft May 15, 2023 17:17
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.

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

3 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy