Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 454 Bytes

pkg-name.md

File metadata and controls

63 lines (49 loc) · 454 Bytes

Enforces a valid package name

Enforces the use of a valid package name in package.json.

Fail

{
  "name": ".foo"
}
{
  "name": "node_modules"
}
{
  "name": "favicon.ico"
}
{
  "name": "foo bar"
}
{
  "name": "foo%bar"
}
{
  "name": "@fo@/bar"
}

Pass

{
  "name": "foo-bar"
}
{
  "name": "foo_bar"
}
{
  "name": "@foo/bar"
}