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

docs: slightly incorrect rule names in documentation for default plugin rules #408

Open
3 of 5 tasks
dinesh-58 opened this issue May 23, 2024 · 0 comments
Open
3 of 5 tasks

Comments

@dinesh-58
Copy link

Validations

Describe the bug

When the default plugin @stylistic/eslint-plugin is installed, rule names coming from the individual plugins (js, ts, jsx) don't need to have the plugin name as well. For example, if you installed only the jsx plugin, the rule name would be "@stylistic/jsx/jsx-indent" but if you installed the default plugin, the rule name must be specified as "@stylistic/jsx-indent" (without the jsx/). Otherwise, you get the error Definition for rule '@stylistic/jsx/jsx-indent' was not found.

The problem is that the code snippets in the documentation for rules under the default plugin use the improper rule name i.e. include the plugin name. See:
Default plugin docs (for jsx-indent)
jsx plugin docs

Trying to edit the default plugin docs leads to a non-existent README.alias.md. Is this used to generate a different readme? Might be helpful to fix the rule names in this file. Or maybe just put a disclaimer somewhere to edit the rule names if using the default plugin?

Reproduction

https://stackblitz.com/edit/github-esw13n?file=README.md&view=editor

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
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