mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
[readme] update eslint plugin repo URLs
This commit is contained in:
10
README.md
10
README.md
@@ -1373,7 +1373,7 @@ Other Style Guides
|
||||
|
||||
<a name="modules--no-mutable-exports"></a>
|
||||
- [10.5](#modules--no-mutable-exports) Do not export mutable bindings.
|
||||
eslint: [`import/no-mutable-exports`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md)
|
||||
eslint: [`import/no-mutable-exports`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md)
|
||||
> Why? Mutation should be avoided in general, but in particular when exporting mutable bindings. While this technique may be needed for some special cases, in general, only constant references should be exported.
|
||||
|
||||
```javascript
|
||||
@@ -1388,7 +1388,7 @@ Other Style Guides
|
||||
|
||||
<a name="modules--prefer-default-export"></a>
|
||||
- [10.6](#modules--prefer-default-export) In modules with a single export, prefer default export over named export.
|
||||
eslint: [`import/prefer-default-export`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md)
|
||||
eslint: [`import/prefer-default-export`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md)
|
||||
> Why? To encourage more files that only ever export one thing, which is better for readability and maintainability.
|
||||
|
||||
```javascript
|
||||
@@ -1401,7 +1401,7 @@ Other Style Guides
|
||||
|
||||
<a name="modules--imports-first"></a>
|
||||
- [10.7](#modules--imports-first) Put all `import`s above non-import statements.
|
||||
eslint: [`import/first`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md)
|
||||
eslint: [`import/first`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/first.md)
|
||||
> Why? Since `import`s are hoisted, keeping them all at the top prevents surprising behavior.
|
||||
|
||||
```javascript
|
||||
@@ -1440,7 +1440,7 @@ Other Style Guides
|
||||
|
||||
<a name="modules--no-webpack-loader-syntax"></a>
|
||||
- [10.9](#modules--no-webpack-loader-syntax) Disallow Webpack loader syntax in module import statements.
|
||||
eslint: [`import/no-webpack-loader-syntax`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md)
|
||||
eslint: [`import/no-webpack-loader-syntax`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md)
|
||||
> Why? Since using Webpack syntax in the imports couples the code to a module bundler. Prefer using the loader syntax in `webpack.config.js`.
|
||||
|
||||
```javascript
|
||||
@@ -1455,7 +1455,7 @@ Other Style Guides
|
||||
|
||||
<a name="modules--import-extensions"></a>
|
||||
- [10.10](#modules--import-extensions) Do not include JavaScript filename extensions
|
||||
eslint: [`import/extensions`](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md)
|
||||
eslint: [`import/extensions`](https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/extensions.md)
|
||||
> Why? Including extensions inhibits refactoring, and inappropriately hardcodes implementation details of the module you're importing in every consumer.
|
||||
|
||||
```javascript
|
||||
|
||||
Reference in New Issue
Block a user