Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(eslint-plugin): report deprecations used in default export #10330

Merged
merged 1 commit into from
Nov 16, 2024

Conversation

wszydlak
Copy link
Contributor

PR Checklist

Overview

Report deprecations which are used in default exports - this is the way typescript compiler reports deprecations.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @wszydlak!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented Nov 14, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 3c93715
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/67383777b1ff1c0008abb432
😎 Deploy Preview https://deploy-preview-10330--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 98 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

nx-cloud bot commented Nov 14, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 3c93715. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for starting this! 🙌

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Nov 14, 2024
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.69%. Comparing base (0f9a2a3) to head (3c93715).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10330   +/-   ##
=======================================
  Coverage   86.69%   86.69%           
=======================================
  Files         434      434           
  Lines       15222    15222           
  Branches     4445     4445           
=======================================
  Hits        13196    13196           
  Misses       1670     1670           
  Partials      356      356           
Flag Coverage Δ
unittest 86.69% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/eslint-plugin/src/rules/no-deprecated.ts 94.11% <ø> (ø)

@wszydlak wszydlak force-pushed the wszydlak-patch-1 branch 3 times, most recently from b13473b to 1c0fa10 Compare November 14, 2024 20:36
@github-actions github-actions bot removed the awaiting response Issues waiting for a reply from the OP or another party label Nov 14, 2024
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good invalid test, thanks! Just asking about valid.

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Nov 15, 2024
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 thanks!

@JoshuaKGoldberg JoshuaKGoldberg added 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge and removed awaiting response Issues waiting for a reply from the OP or another party labels Nov 16, 2024
@@ -100,6 +100,16 @@ ruleTester.run('no-deprecated', rule, {

a('b');
`,
`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is a fine test of overloaded function signature logic! I'm happy for us to keep it around, but I think for the sake of this issue we should also have a test purely for the default export usage that's as simple as

function notDeprecated() {
  return {};
}

export default notDeprecated();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added additional valid test 🙂

Copy link
Member

@kirkwaiblinger kirkwaiblinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

@bradzacher bradzacher merged commit ab83198 into typescript-eslint:main Nov 16, 2024
61 of 62 checks passed
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this pull request Nov 18, 2024
##### [v8.15.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8150-2024-11-18)

##### 🚀 Features

-   **eslint-plugin:** \[prefer-nullish-coalescing] fix detection of `ignoreConditionalTests` involving boolean `!` operator ([#10299](typescript-eslint/typescript-eslint#10299))
-   **eslint-plugin:** new rule `no-unsafe-type-assertion` ([#10051](typescript-eslint/typescript-eslint#10051))
-   **eslint-plugin:** added related-getter-setter-pairs rule ([#10192](typescript-eslint/typescript-eslint#10192))

##### 🩹 Fixes

-   **utils:** add defaultOptions to meta in rule ([#10339](typescript-eslint/typescript-eslint#10339))
-   **eslint-plugin:** report deprecations used in default export ([#10330](typescript-eslint/typescript-eslint#10330))
-   **eslint-plugin:** \[explicit-module-boundary-types] and \[explicit-function-return-type] don't report on `as const satisfies` ([#10315](typescript-eslint/typescript-eslint#10315))
-   **eslint-plugin:** \[await-thenable, return-await] don't flag awaiting unconstrained type parameter as unnecessary ([#10314](typescript-eslint/typescript-eslint#10314))
-   **eslint-plugin:** \[consistent-indexed-object-style] handle circular mapped types ([#10301](typescript-eslint/typescript-eslint#10301))

##### ❤️  Thank You

-   Josh Goldberg ✨
-   Kim Sang Du [@developer-bandi](https://github.com/developer-bandi)
-   Luis Sebastian Urrutia Fuentes [@LuisUrrutia](https://github.com/LuisUrrutia)
-   Phillip Huang
-   Ronen Amiel
-   Szydlak [@wszydlak](https://github.com/wszydlak)

You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 19, 2024
| datasource | package                          | from   | to     |
| ---------- | -------------------------------- | ------ | ------ |
| npm        | @typescript-eslint/eslint-plugin | 8.14.0 | 8.15.0 |
| npm        | @typescript-eslint/parser        | 8.14.0 | 8.15.0 |


## [v8.15.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8150-2024-11-18)

##### 🚀 Features

-   **eslint-plugin:** \[prefer-nullish-coalescing] fix detection of `ignoreConditionalTests` involving boolean `!` operator ([#10299](typescript-eslint/typescript-eslint#10299))
-   **eslint-plugin:** new rule `no-unsafe-type-assertion` ([#10051](typescript-eslint/typescript-eslint#10051))
-   **eslint-plugin:** added related-getter-setter-pairs rule ([#10192](typescript-eslint/typescript-eslint#10192))

##### 🩹 Fixes

-   **utils:** add defaultOptions to meta in rule ([#10339](typescript-eslint/typescript-eslint#10339))
-   **eslint-plugin:** report deprecations used in default export ([#10330](typescript-eslint/typescript-eslint#10330))
-   **eslint-plugin:** \[explicit-module-boundary-types] and \[explicit-function-return-type] don't report on `as const satisfies` ([#10315](typescript-eslint/typescript-eslint#10315))
-   **eslint-plugin:** \[await-thenable, return-await] don't flag awaiting unconstrained type parameter as unnecessary ([#10314](typescript-eslint/typescript-eslint#10314))
-   **eslint-plugin:** \[consistent-indexed-object-style] handle circular mapped types ([#10301](typescript-eslint/typescript-eslint#10301))

##### ❤️  Thank You

-   Josh Goldberg ✨
-   Kim Sang Du [@developer-bandi](https://github.com/developer-bandi)
-   Luis Sebastian Urrutia Fuentes [@LuisUrrutia](https://github.com/LuisUrrutia)
-   Phillip Huang
-   Ronen Amiel
-   Szydlak [@wszydlak](https://github.com/wszydlak)

You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: [no-deprecated] Rule doesn't report on call inside default export
4 participants