palantir/blueprint

Dynamic imports false positive on class-constants ESLint rule

开放

#6,209 创建于 2023年6月7日

 (0 条评论) (0 个反应) (0 位负责人)TypeScript (2,167 个派生)batch import
Domain: toolingP2Type: bughelp wanted

仓库指标

星标
 (20,263 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Normal imports don't seem to be impacted by this, though dynamic imports are. Packages imported dynamically that include pt in their name seem to trigger an ESLint rule related to Blueprint.

root@______ # ./gradlew :subproject:eslint

> Task :subproject:eslint
error: use Blueprint `Classes` constant instead of string literal (@blueprintjs/classes-constants) at <redacted_filename>:

  49 | 
> 50 |         const { compileTypeScript } = await import("@example/pt-typescript");
     |                                                    ^

1 error found.
1 error potentially fixable with the `--fix` option.

> Task :subproject:eslint FAILED

FAILURE: Build failed with an exception.```

贡献者指南