You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(napi/oxlint): introduce Context class (#12440)
Part of #12437. Use a class `Context` for context objects passed to lint rules' `create` function. Creating a class instance is cheaper than creating a new `report` closure for each file.
We have to use a private property `#ruleId`, but it's only accessed when an error is reported (cold path).
Also, reuse a single `diagnostics` array, rather than creating a new array for each file that's linted.
0 commit comments