Skip to content

Commit 6e49a58

Browse files
JounQinljharb
authored andcommitted
[Refactor] order: remove unnecessary negative check
1 parent 243606d commit 6e49a58

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
2525
- [Docs] add flat config guide for using `tseslint.config()` ([#3125], thanks [@lnuvy])
2626
- [Docs] add missing comma ([#3122], thanks [@RyanGst])
2727
- [readme] Update flatConfig example to include typescript config ([#3138], thanks [@intellix])
28+
- [Refactor] [`order`]: remove unnecessary negative check ([#3167], thanks [@JounQin])
2829

2930
## [2.31.0] - 2024-10-03
3031

@@ -1174,6 +1175,7 @@ for info on changes for earlier releases.
11741175

11751176
[`memo-parser`]: ./memo-parser/README.md
11761177

1178+
[#3167]: https://github.com/import-js/eslint-plugin-import/pull/3167
11771179
[#3166]: https://github.com/import-js/eslint-plugin-import/pull/3166
11781180
[#3151]: https://github.com/import-js/eslint-plugin-import/pull/3151
11791181
[#3138]: https://github.com/import-js/eslint-plugin-import/pull/3138

src/rules/order.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ function makeNewlinesBetweenReport(context, imported, newlinesBetweenImports_, n
770770

771771
if (shouldAssertNewlineBetweenGroups) {
772772
if (currentImport.rank !== previousImport.rank && emptyLinesBetween === 0) {
773-
if (distinctGroup || !distinctGroup && isStartOfDistinctGroup) {
773+
if (distinctGroup || isStartOfDistinctGroup) {
774774
alreadyReported = true;
775775
context.report({
776776
node: previousImport.node,

0 commit comments

Comments
 (0)