Skip to content

Commit

Permalink
[Docs] order: improve the documentation for the `pathGroupsExcluded…
Browse files Browse the repository at this point in the history
…ImportTypes` option
  • Loading branch information
liby authored and ljharb committed Jul 22, 2021
1 parent bfab4cc commit b236748
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -15,6 +15,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
### Changed
- [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])

## [2.23.4] - 2021-05-29

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

[#2160]: https://github.com/benmosher/eslint-plugin-import/pull/2160
[#2158]: https://github.com/benmosher/eslint-plugin-import/pull/2158
[#2156]: https://github.com/benmosher/eslint-plugin-import/pull/2156
[#2138]: https://github.com/benmosher/eslint-plugin-import/pull/2138
[#2121]: https://github.com/benmosher/eslint-plugin-import/pull/2121
[#2099]: https://github.com/benmosher/eslint-plugin-import/pull/2099
Expand Down Expand Up @@ -1347,6 +1349,7 @@ for info on changes for earlier releases.
[@lencioni]: https://github.com/lencioni
[@leonardodino]: https://github.com/leonardodino
[@Librazy]: https://github.com/Librazy
[@liby]: https://github.com/liby
[@lilling]: https://github.com/lilling
[@ljharb]: https://github.com/ljharb
[@ljqx]: https://github.com/ljqx
Expand Down
21 changes: 21 additions & 0 deletions docs/rules/order.md
Expand Up @@ -148,6 +148,27 @@ Example:
}]
}
```

You can also use `patterns`(e.g., `react`, `react-router-dom`, etc).

Example:
```json
{
"import/order": [
"error",
{
"pathGroups": [
{
"pattern": "react",
"group": "builtin",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"]
}
]
}
```
The default value is `["builtin", "external"]`.

### `newlines-between: [ignore|always|always-and-inside-groups|never]`:
Expand Down

0 comments on commit b236748

Please sign in to comment.