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
A short "shopping list" of potential changes/optimizations to JS linter plugins.
The first is a potential edge case bug. The rest are not urgent or important, but I just wanted to note them down somewhere.
ExternalPluginStore should not contain plugin_names.
Plugin name to plugin ID should be resolved on a per-config basis
(because 2 plugins can have same name but be different plugins).
Configs should store plugin IDs.
Remove registered_plugin_paths from ExternalPluginStore. It's only needed while building configs, but never used again after that stage.
external_rules_for_override in OxlintRules::override_rules could be a FixedBitSet?
There probably aren't that many external rules, so FxHashMap<ExternalRuleId, AllowWarnDeny> is inefficient.
Use only 1 Resolver for all nested configs - creating a Resolver is not cheap, and if there's only one, they'll all use the same cache.
When JS plugin creates an error, code to get severity for rule is not optimal:
It has to search through external_rules to find the entry with RuleId
A short "shopping list" of potential changes/optimizations to JS linter plugins.
The first is a potential edge case bug. The rest are not urgent or important, but I just wanted to note them down somewhere.
ExternalPluginStoreshould not containplugin_names.(because 2 plugins can have same name but be different plugins).
registered_plugin_pathsfromExternalPluginStore. It's only needed while building configs, but never used again after that stage.external_rules_for_overrideinOxlintRules::override_rulescould be aFixedBitSet?There probably aren't that many external rules, so
FxHashMap<ExternalRuleId, AllowWarnDeny>is inefficient.Resolverfor all nested configs - creating aResolveris not cheap, and if there's only one, they'll all use the same cache.external_rulesto find the entry withRuleIdContext. refactor(napi/oxlint): introduceContextclass #12440Contextobjects. perf(napi/oxlint): singleContextobject per rule #12475idproperty (rule name) toContext. feat(napi/oxlint): addidtoContext#12480