Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug: [no-deprecated] doesn't work on export/re-export statements #11197

Open
microsoft/fluentui
#34443
Labels
accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@Hotell

Description

@Hotell

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I havesearched for related issues and found none that matched my issue.
  • I haveread the FAQ and my problem is not listed.

Issue Description

no-deprecate won't process re-exports and ignores them completely.

Our barrel file contains re-exports from sub-packages, which some are deprecated and thus need to be disabled inline ( e.g.https://github.com/microsoft/fluentui/blob/master/packages/react-components/react-components/src/index.ts#L106 )

Recently we migrated fromhttps://github.com/gund/eslint-plugin-deprecation to officialno-deprecate rule, but it appears the feature parity is not 100%.

Example 1:

All following APIs contain@deprecated pragma but nothing is being reported

//@filename react-components/src/index.tsexport{InfoButton,infoButtonClassNames,renderInfoButton_unstable,useInfoButtonStyles_unstable,useInfoButton_unstable,}from'@fluentui/react-infobutton';exporttype{InfoButtonProps,InfoButtonSlots,InfoButtonState}from'@fluentui/react-infobutton';
showcase of re-exported apis containing @deprecated jsdoc pragma

Example 2:

Wrong report for implicit inlineno-deprecate

/Users/fluentui/packages/react-components/react-components/src/index.ts  106:3   warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-deprecated')  111:3   warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-deprecated')  118:3   warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-deprecated')  137:3   warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-deprecated')  140:3   warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-deprecated')  244:3   warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-deprecated')  377:3   warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-deprecated')  565:3   warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-deprecated')  581:3   warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-deprecated')  633:34  warning  Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-deprecated')

Reproduction Repository Link

https://github.com/microsoft/fluentui

Repro Steps

  1. clone the repo
  2. yarn install
  3. yarn nx run react-components:lint

NOTE: we useESLINT_USE_FLAT_CONFIG=false under the hood

Versions

packageversion
@typescript-eslint/eslint-plugin8.32.0
@typescript-eslint/parser8.32.0
@typescript-eslint/scope-manager8.32.0
@typescript-eslint/typescript-estree8.32.0
@typescript-eslint/type-utils8.32.0
@typescript-eslint/utils8.32.0
TypeScript5.3.3
ESLint9.17.0
node20

Related issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp