Previously rule names like myplugin/folder/rule would get converted to
self/rule - cutting off any folder structure. Slicing at the first / rather than the last one shall preserve the full path.
Handle cases where a config defined in a plugin enables the plugin. Previously the logic didn't switch plugin names out for 'self'
Consider a plugin named 'myplugin' that is defined like so:
Handle case where a rule name contains a
/
Previously rule names like
myplugin/folder/rule
would get converted toself/rule
- cutting off any folder structure. Slicing at the first/
rather than the last one shall preserve the full path.Handle cases where a config defined in a plugin enables the plugin. Previously the logic didn't switch plugin names out for 'self'
Consider a plugin named 'myplugin' that is defined like so:
Consumers of the plugin can do
extends: ['plugin:myplugin/myconfig]
to enable the plugin and configure its rules.Prior to this PR trying to use eslint-plugin-self resulted in a "myplugin could not be found" error as references to it were not replaced.
Handle cases where rules are defined in an override (e.g. because I only want to enable a rule for typescript files)
Consider a plugin that looks like:
Prior to this PR the "myplugin/myrule" rule within the overrides would not be transformed into "self/myrule"