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

Rule request: kebab-case scripts #61

Open
Zamiell opened this issue Oct 30, 2023 · 1 comment
Open

Rule request: kebab-case scripts #61

Zamiell opened this issue Oct 30, 2023 · 1 comment
Labels
status: in discussion Not yet ready for implementation or a pull request type: feature New enhancement or request

Comments

@Zamiell
Copy link
Contributor

Zamiell commented Oct 30, 2023

It is conventional for scripts in the "package.json" file to be in kebab-case, as evidenced here:

Thus, this plugin should warn when incorrectly named scripts exist such as "fooBar" (i.e. camelCase) or "FooBar" (i.e. PascalCase) or "foo_bar" (i.e. snake_case) or "FOO_BAR" (i.e. SCREAMING_SNAKE_CASE).

@JoshuaKGoldberg
Copy link
Owner

Makes sense! I can see value in having a naming conventions rule that enforces kebab-case. Other efforts have popped up to standardize them too:

I think for the first few iterations of this rule we probably wouldn't want it to be enabled by default - as it's rather pedantic and doesn't directly catch runtime issues (only indirectly). But strong +1 to it existing.

Questions that I think would need to be resolved:

  • What other conventions exist?
  • What "preset" conventions should it allow?
  • How should it be configured, in general?

@JoshuaKGoldberg JoshuaKGoldberg added status: in discussion Not yet ready for implementation or a pull request type: feature New enhancement or request labels Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: in discussion Not yet ready for implementation or a pull request type: feature New enhancement or request
Projects
None yet
Development

No branches or pull requests

2 participants