Skip to main content

ban-types

已弃用

旧的 ban-types 规则涵盖了多个功能字段,因此被分成了几个规则。

¥The old ban-types rule encompassed multiple areas of functionality, and so has been split into several rules.

no-restricted-types 是禁止可配置类型名称列表的新规则。默认情况下,它没有启用任何选项,类似于 no-restricted-globalsno-restricted-propertiesno-restricted-syntax 等规则。

¥no-restricted-types is the new rule for banning a configurable list of type names. It has no options enabled by default and is akin to rules like no-restricted-globals, no-restricted-properties, and no-restricted-syntax.

ban-types 中的默认选项现在涵盖:

¥The default options from ban-types are now covered by:

ban-types 本身在 typescript-eslint v8 中被删除。请参阅 宣布 typescript-eslint v8 Beta 以了解更多详细信息。

¥ban-types itself is removed in typescript-eslint v8. See Announcing typescript-eslint v8 Beta for more details.