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

INVALID_PACKAGE_NAME & empty root workspace name #222

Open
kachkaev opened this issue Sep 1, 2024 · 1 comment
Open

INVALID_PACKAGE_NAME & empty root workspace name #222

kachkaev opened this issue Sep 1, 2024 · 1 comment

Comments

@kachkaev
Copy link

kachkaev commented Sep 1, 2024

👋 folks!

I wonder if you would be interested in a small change to INVALID_PACKAGE_NAME.ts. The rule is triggered even if the root workspace is not named, but turning this rule off makes all workspace names non-lintable.

We could allow root package name to be empty. It's not referred to from other namespaces and not published on npm, so the name is not used anywhere in practice.

Suggestion:

validate: (workspace) => {
if (!workspace.packageJson.name) {

 validate: (workspace) => { 
-   if (!workspace.packageJson.name) { 
+   if (!workspace.packageJson.name && workspace.relativeDir !== ".") { 

WYDT?

@kachkaev kachkaev changed the title INVALID_PACKAGE_NAME & empty root package name INVALID_PACKAGE_NAME & empty root workspace name Sep 1, 2024
@Andarist
Copy link
Collaborator

Andarist commented Sep 1, 2024

We could allow root package name to be empty. It's not referred to from other namespaces and not published on npm, so the name is not used anywhere in practice.

It's not used-used but IIRC some package managers still require it. Perhaps we could double-check which ones do and which ones don't and allow anonymous roots with those that don't. I'm not inclined to do that investigation myself though :p

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

2 participants