Skip to content

Commit 2cdfc19

Browse files
golopotljharb
authored andcommittedOct 18, 2019
[Docs] no-useless-path-segments: add docs for option commonjs
1 parent 568ca43 commit 2cdfc19

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
 

‎CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
1919
- [`prefer-default-export`]: fix false positive with type export ([#1506], thanks [@golopot])
2020
- [`extensions`]: Fix `ignorePackages` to produce errors ([#1521], thanks [@saschanaz])
2121

22+
### Docs
23+
- [`no-useless-path-segments`]: add docs for option `commonjs` ([#1507], thanks [@golopot])
24+
2225
## [2.18.2] - 2019-07-19
2326
- Skip warning on type interfaces ([#1425], thanks [@lencioni])
2427

@@ -614,6 +617,7 @@ for info on changes for earlier releases.
614617

615618
[#1521]: https://github.com/benmosher/eslint-plugin-import/pull/1521
616619
[#1519]: https://github.com/benmosher/eslint-plugin-import/pull/1519
620+
[#1507]: https://github.com/benmosher/eslint-plugin-import/pull/1507
617621
[#1506]: https://github.com/benmosher/eslint-plugin-import/pull/1506
618622
[#1495]: https://github.com/benmosher/eslint-plugin-import/pull/1495
619623
[#1472]: https://github.com/benmosher/eslint-plugin-import/pull/1472

‎docs/rules/no-useless-path-segments.md

+4
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,7 @@ import "./pages/index.js"; // should be "./pages" (auto-fixable)
7373
```
7474

7575
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.
76+
77+
### commonjs
78+
79+
When set to `true`, this rule checks CommonJS imports. Default to `false`.

0 commit comments

Comments
 (0)
Please sign in to comment.