Skip to content

INVALID_PACKAGE_NAME & empty root workspace name #222

@kachkaev

Description

@kachkaev

👋 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions