react-navigation.github.io icon indicating copy to clipboard operation
react-navigation.github.io copied to clipboard

Suggested way to specifying default types for useNavigation, Link, ref etc. is against a recommended eslint rule

Open janschloss opened this issue 4 years ago • 2 comments

Hello,

in this document it is suggested to declare a module for specifying default types for useNavigation, Link, ref etc.: https://github.com/react-navigation/react-navigation.github.io/blob/main/versioned_docs/version-6.x/typescript.md#specifying-default-types-for-usenavigation-link-ref-etc

However the eslint rule no-namespace which is part of the recommended rules for the TypeScript plugin disapproves of it: https://github.com/typescript-eslint/typescript-eslint/blob/v5.2.0/packages/eslint-plugin/docs/rules/no-namespace.md

janschloss avatar Oct 30 '21 16:10 janschloss

Is there any opinion on this?

janschloss avatar Jun 11 '22 17:06 janschloss

while already on the topic of these types, it also gives an error for extending to an empty interface, referring to this rule:

https://github.com/typescript-eslint/typescript-eslint/blob/v5.2.0/packages/eslint-plugin/docs/rules/no-empty-interface.md

Adnan-Bacic avatar Sep 19 '22 10:09 Adnan-Bacic

I would also like to know of a way to achieve this without adding some ts-ignore

ChromeQ avatar Apr 03 '24 07:04 ChromeQ

Linter warnings are about potential issues, and in this case purely code-style and not actual problems.

satya164 avatar Apr 05 '24 01:04 satya164