[Fix] export: False positive for exported overloaded functions in TS by liuxingbaoyu · Pull Request #3065 · import-js/eslint-plugin-import (original) (raw)
This currently fails when there is only one TSDeclareFunction, this PR fixes that.
Codecov Report
All modified and coverable lines are covered by tests ✅
Project coverage is 95.36%. Comparing base (d66933c) to head (7f7fbd3).
Report is 3 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@ ## main #3065 +/- ##
Coverage 85.25% 95.36% +10.11%
Files 82 82
Lines 3560 3563 +3
Branches 1249 1248 -1- Hits 3035 3398 +363
- Misses 525 165 -360
| Flag | Coverage Δ | |
|---|---|---|
| 95.36% <100.00%> (+10.11%) | ⬆️ |
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
What do you think of the new changes? :)
This greatly simplifies the implementation.
It also additionally avoids reporting overloads Multiple default exports., which could confuse people.
Now overloads and other types of conflicts will not be reported, which I think is reasonable, because anyway overloads cannot appear alone, must be followed by an implementation to be legal TS code.
ljharb changed the title
[fix] False positive for exported overloaded functions in TS [Fix] export: False positive for exported overloaded functions in TS
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request
| datasource | package | from | to |
|---|---|---|---|
| npm | eslint-plugin-import | 2.30.0 | 2.31.0 |
v2.31.0
Added
- support eslint v9 ([#2996], thanks [@G-Rath] [@michaelfaith])
- [
order]: allow validating named imports ([#3043], thanks [@manuth]) - [
extensions]: add thecheckTypeImportsoption ([#2817], thanks [@phryneas])
Fixed
ExportMap/ flat config: includelanguageOptionsin context ([#3052], thanks [@michaelfaith])- [
no-named-as-default]: Allow using an identifier if the export is both a named and a default export ([#3032], thanks [@akwodkiewicz]) - [
export]: False positive for exported overloaded functions in TS ([#3065], thanks [@liuxingbaoyu]) exportMap: export map cache is tainted by unreliable parse results ([#3062], thanks [@michaelfaith])exportMap: improve cacheKey when using flat config ([#3072], thanks [@michaelfaith])- adjust "is source type module" checks for flat config ([#2996], thanks [@G-Rath])
Changed
- [Docs] [
no-relative-packages]: fix typo ([#3066], thanks [@joshuaobrien]) - [Performance] [
no-cycle]: dont scc for each linted file ([#3068], thanks [@soryy708]) - [Docs] [
no-cycle]: adddisableSccto docs ([#3070], thanks [@soryy708]) - [Tests] use re-exported
RuleTester([#3071], thanks [@G-Rath]) - [Docs] [
no-restricted-paths]: fix grammar ([#3073], thanks [@unbeauvoyage]) - [Tests] [
no-default-export], [no-named-export]: add test case (thanks [@G-Rath])
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request
| datasource | package | from | to |
|---|---|---|---|
| npm | eslint-plugin-import | 2.30.0 | 2.31.0 |
v2.31.0
Added
- support eslint v9 ([#2996], thanks [@G-Rath] [@michaelfaith])
- [
order]: allow validating named imports ([#3043], thanks [@manuth]) - [
extensions]: add thecheckTypeImportsoption ([#2817], thanks [@phryneas])
Fixed
ExportMap/ flat config: includelanguageOptionsin context ([#3052], thanks [@michaelfaith])- [
no-named-as-default]: Allow using an identifier if the export is both a named and a default export ([#3032], thanks [@akwodkiewicz]) - [
export]: False positive for exported overloaded functions in TS ([#3065], thanks [@liuxingbaoyu]) exportMap: export map cache is tainted by unreliable parse results ([#3062], thanks [@michaelfaith])exportMap: improve cacheKey when using flat config ([#3072], thanks [@michaelfaith])- adjust "is source type module" checks for flat config ([#2996], thanks [@G-Rath])
Changed
- [Docs] [
no-relative-packages]: fix typo ([#3066], thanks [@joshuaobrien]) - [Performance] [
no-cycle]: dont scc for each linted file ([#3068], thanks [@soryy708]) - [Docs] [
no-cycle]: adddisableSccto docs ([#3070], thanks [@soryy708]) - [Tests] use re-exported
RuleTester([#3071], thanks [@G-Rath]) - [Docs] [
no-restricted-paths]: fix grammar ([#3073], thanks [@unbeauvoyage]) - [Tests] [
no-default-export], [no-named-export]: add test case (thanks [@G-Rath])
qdraw mentioned this pull request
This was referenced
Oct 28, 2024
renovate Bot added a commit to mmkal/eslint-plugin-mmkal that referenced this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})