developit / developit/greenlet
ESLint/TypeScript: Any way to mark the function as external/scope-less?
- 主要言語
- JavaScript
- スター
- 4.7k
- フォーク
- 97
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
This piece of code passes every static analyzer, ESLint and TS because they don't know that the arrow function is run in a different context:
```js
import greenlet from 'greenlet'
const myFavNumber = 43;
const getFav = greenlet( async () => {
return myFavNumber
});
```
Are you aware of any way to mark the function in a way that linters/parsers know `myFavNumber` is not defined in the function?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start with the greenlet() call and the example's closure over myFavNumber, then check whether the project documents or exposes a way to mark such functions as external or scope-less. Done means identifying a supported annotation for ESLint/TypeScript or documenting that no such marker exists.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100