palantir/blueprint

Dynamic imports false positive on class-constants ESLint rule

オープン

#6,209 opened on 2023/06/07

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (2,167 件のフォーク)batch import
Domain: toolingP2Type: bughelp wanted

Repository metrics

Stars
 (20,263 個のスター)
PR merge metrics
 (平均マージ 43d 10h) (30d で 27 merged PRs)

説明

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.```

コントリビューターガイド