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

[Docs] no-useless-path-segments: add docs for option commonjs #1507

Merged
merged 1 commit into from Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -19,6 +19,9 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
- [`prefer-default-export`]: fix false positive with type export ([#1506], thanks [@golopot])
- [`extensions`]: Fix `ignorePackages` to produce errors ([#1521], thanks [@saschanaz])

### Docs
- [`no-useless-path-segments`]: add docs for option `commonjs` ([#1507], thanks [@golopot])

## [2.18.2] - 2019-07-19
- Skip warning on type interfaces ([#1425], thanks [@lencioni])

Expand Down Expand Up @@ -614,6 +617,7 @@ for info on changes for earlier releases.

[#1521]: https://github.com/benmosher/eslint-plugin-import/pull/1521
[#1519]: https://github.com/benmosher/eslint-plugin-import/pull/1519
[#1507]: https://github.com/benmosher/eslint-plugin-import/pull/1507
[#1506]: https://github.com/benmosher/eslint-plugin-import/pull/1506
[#1495]: https://github.com/benmosher/eslint-plugin-import/pull/1495
[#1472]: https://github.com/benmosher/eslint-plugin-import/pull/1472
Expand Down
4 changes: 4 additions & 0 deletions docs/rules/no-useless-path-segments.md
Expand Up @@ -73,3 +73,7 @@ import "./pages/index.js"; // should be "./pages" (auto-fixable)
```

Note: `noUselessIndex` only avoids ambiguous imports for `.js` files if you haven't specified other resolved file extensions. See [Settings: import/extensions](https://github.com/benmosher/eslint-plugin-import#importextensions) for details.

### commonjs

When set to `true`, this rule checks CommonJS imports. Default to `false`.