Open andreasmarkussen opened 2 years ago
I dont mind giving a go at it, but I have no idea on where to start.
And if someone wants to do a PR that can enable custom lint plugins in the UI, then let me know. I would be able to sponsor it financially.
I have now been through the NRLint code, and I can see that the loading of custom plugins is not covered by the current code in the nrlint-worker.js file, and I can see perhaps the custom rule needs to be webpacked, in order to get it into the browser?
Thank you for using nrlint!
To use the rule module from the browser, currently nrlint uses Webpack. I've made a simple example of a rule plugin. I hope this will help you to create your own rule plugins.
Current Behavior
I was expecting that I could create a custom NRLint rule, and use it both for web and cli. However, the Web Editor does not take the "plugins" key into account.
Expected Behavior
I would expect that custom rules would be possible to load in the Web editor.
Steps To Reproduce
1) Create a plugin containing a rule 2) See that it works with node_modules/nrlint/bin/nrlint.js 3) See that it does not work on the web
Example flow
Environment
PS. Love the concept of the NRLint.