diff --git a/CHANGELOG.md b/CHANGELOG.md index 349167e83..e569fe33f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel - [`extensions`]/`importType`: fix isScoped treating @/abc as scoped module ([#2146], thanks [@rperello]) ### Changed +- [Docs] [`extensions`]: improved cases for using `@/...` ([#2140], thanks [@wenfangdu]) - [Docs] [`extensions`]: removed incorrect cases ([#2138], thanks [@wenfangdu]) - [Tests] [`order`]: add tests for `pathGroupsExcludedImportTypes: ['type']` ([#2158], thanks [@atav32]) - [Docs] [`order`]: improve the documentation for the `pathGroupsExcludedImportTypes` option ([#2156], thanks [@liby]) @@ -892,6 +893,7 @@ for info on changes for earlier releases. [#2158]: https://github.com/import-js/eslint-plugin-import/pull/2158 [#2156]: https://github.com/import-js/eslint-plugin-import/pull/2156 [#2146]: https://github.com/import-js/eslint-plugin-import/pull/2146 +[#2140]: https://github.com/import-js/eslint-plugin-import/pull/2140 [#2138]: https://github.com/import-js/eslint-plugin-import/pull/2138 [#2121]: https://github.com/import-js/eslint-plugin-import/pull/2121 [#2112]: https://github.com/import-js/eslint-plugin-import/pull/2112 diff --git a/docs/rules/extensions.md b/docs/rules/extensions.md index bf29dbe5f..575895c5a 100644 --- a/docs/rules/extensions.md +++ b/docs/rules/extensions.md @@ -109,6 +109,8 @@ import foo from './foo'; import bar from './bar'; import Component from './Component'; + +import foo from '@/foo'; ``` The following patterns are not considered problems when configuration set to "always": @@ -121,6 +123,8 @@ import bar from './bar.json'; import Component from './Component.jsx'; import * as path from 'path'; + +import foo from '@/foo.js'; ``` The following patterns are considered problems when configuration set to "ignorePackages": @@ -145,6 +149,7 @@ import Component from './Component.jsx'; import express from 'express'; +import foo from '@/foo' ``` The following patterns are not considered problems when configuration set to `['error', 'always', {ignorePackages: true} ]`: @@ -156,6 +161,7 @@ import baz from 'foo/baz.js'; import express from 'express'; +import foo from '@/foo'; ``` ## When Not To Use It