From 2cdfc19d44cbe4a7faa22dc00a91291340bacca5 Mon Sep 17 00:00:00 2001 From: Chiawen Chen Date: Fri, 18 Oct 2019 18:25:16 +0800 Subject: [PATCH] [Docs] `no-useless-path-segments`: add docs for option `commonjs` --- CHANGELOG.md | 4 ++++ docs/rules/no-useless-path-segments.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33f926785..81ca85214 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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]) @@ -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 diff --git a/docs/rules/no-useless-path-segments.md b/docs/rules/no-useless-path-segments.md index 6a02eab9f..19b772585 100644 --- a/docs/rules/no-useless-path-segments.md +++ b/docs/rules/no-useless-path-segments.md @@ -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`.