developit / developit/greenlet

ESLint/TypeScript: Any way to mark the function as external/scope-less?

オープン
#56 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。