Skip to content

noRestrictedImports

诊断类别:lint/nursery/noRestrictedImports

¥Diagnostic Category: lint/nursery/noRestrictedImports

自从:v1.6.0

¥Since: v1.6.0

来源:

¥Sources:

当通过 import 或 require 加载时,禁止指定模块。

¥Disallow specified modules when loaded by import or require.

¥Options

{
"noRestrictedImports": {
"options": {
"paths": {
"lodash": "Using lodash is not encouraged",
"underscore": "Using underscore is not encouraged"
}
}
}
}

¥Related links