Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Description
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';

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
- clone the repo
yarn install
yarn nx run react-components:lint
NOTE: we useESLINT_USE_FLAT_CONFIG=false
under the hood
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | 8.32.0 |
@typescript-eslint/parser | 8.32.0 |
@typescript-eslint/scope-manager | 8.32.0 |
@typescript-eslint/typescript-estree | 8.32.0 |
@typescript-eslint/type-utils | 8.32.0 |
@typescript-eslint/utils | 8.32.0 |
TypeScript | 5.3.3 |
ESLint | 9.17.0 |
node | 20 |