-
-
Notifications
You must be signed in to change notification settings - Fork 798
Closed
Labels
Description
Is it possible to use ES module in custom rules? I’m running into this error when I use const urlExist = require(‘url-exist’);
:
Must use import to load ES module
When I use import urlExist from ‘url-exist’
I get
Cannot use import statement outside of a module
When I change the custom rule to a .mjs I get:
Property ‘names’ of custom rule at index 0 is incorrect
I believe that happens because the rules are imported by markdowlint by require
.
Is there a work around for this?