Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support folders in require-meta-docs-url rule #86

Open
constgen opened this issue Nov 7, 2019 · 0 comments
Open

Support folders in require-meta-docs-url rule #86

constgen opened this issue Nov 7, 2019 · 0 comments

Comments

@constgen
Copy link

constgen commented Nov 7, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant