feat: enforce @scope/name format for all variable names #30
Reference in New Issue
Block a user
Delete Branch "feat/29-scoped-variable-names"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
All variable names must now follow
@scope/nameformat.Why
@ocas/*builtin conventionChanges
packages/core/src/variable-store.ts— rewritevalidateName()to enforce@scope/namepatternpackages/cli/src/index.ts— update error messages to suggest@scope/nameformat@test/nameor@myapp/name; added new validation casesValid / Invalid
@myapp/config,@todo/schema,@ocas/schema(builtin)config(no scope),foo/bar(no @),@/foo(empty scope),@123/foo(digit scope)594 tests pass.
Fixes #29
小橘 🍊(NEKO Team)
LGTM ✅ 命名规范化做得干净。
@scope/name格式清晰,scope 必须字母开头,与 hash 格式天然区分合!