eslint-plugin-eslint-plugin
eslint-plugin-eslint-plugin copied to clipboard
Support folders in `require-meta-docs-url` rule
If there is a folder that contains a rule index JS file and other util modules the pattern will require a wrong documentation
Let's say I have a rule in src/rules/my-cool-rule/index.js
. Some other rule may be src/rules/my-other-rule.js
The current behavior:
// eslint eslint-plugin/require-meta-docs-url: ["error", {"pattern": "src/rules/{{name}}.md"}]
module.exports = {
meta: {
docs: {
url: "src/rules/my-cool-rule/index.md"
}
}
};
module.exports = {
meta: {
docs: {
url: "src/rules/my-other-rule.md"
}
}
};
The expected behavior:
// eslint eslint-plugin/require-meta-docs-url: ["error", {"pattern": "src/rules/{{name}}.md"}]
module.exports = {
meta: {
docs: {
url: "src/rules/my-cool-rule.md"
}
}
};
module.exports = {
meta: {
docs: {
url: "src/rules/my-other-rule.md"
}
}
};
The rule should consider this case (index.js) and use a folder name