Problem
AbuseFilter has its own domain-specific language. This language must be learned by admins and maintained by developers.
Proposed Solution
If admins are more familiar with JavaScript, perhaps it would be better to allow them to write JavaScript. These scripts could be executed in a secure vm and function similar to a Service Worker:
addEventListener('filter', (event) => ( event.action === 'edit' && event.old_wikitext.length > 0 && event.new_wikitext.length === 0 && !event.user_groups.includes('user') ));
or we could even make the script itself the handler and the event object as the global, which would make it like this:
action === 'edit' && old_wikitext.length > 0 && new_wikitext.length === 0 && !user_groups.includes('user')
Or ideally, both syntax options would be allowed with a config when creating the filter.
This would give admins the ability to write filters in standard JavaScript while also maintaining a secure environment for our infrastructure. Doing this should open up the number admins who can write filters, provide additional linting and testing tools, and also remove the amount of code that AbuseFilter has to maintain.