You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(naming): add opt-in allowedWords for Roblox names (#662)
strictCamelCase and StrictPascalCase reject two capitals in a row, so a
CFrame had to be stored in targetCframe and the identifier stopped
matching the type it held. flawless 1.7.0 adds allowedWords, which lets
listed words keep their own casing while the rest of the name is still
checked.
Bumps flawless 1.5.1 -> 1.7.0 and adds `naming: { allowedWords }`, off by
default. `true` uses the generated Roblox list, an array uses exactly
those words. Set once as settings.flawless.namingConvention.allowedWords
on isentinel/naming/setup, so it reaches the TS and TSX blocks and any
user selectors; a selector opts out with its own `allowedWords: []`.
The list is generated, not hand-maintained. Only names holding two
capitals in a row can trip the strict formats, which is 82 of the 1534
names @rbxts/types declares. Pruning names a shorter word already
resolves - CFrame absorbs CFrameValue, CFrameConstructor and UserCFrame,
UDim absorbs UDim2 - leaves 67. roblox-allowed-words-shared.ts mirrors
flawless's own applyAllowedWords so the pruning asks the question the
rule asks at lint time.
@rbxts/types is a devDependency and the scrape runs at build time: a
consumer may pin a different version, or none, and parsing ~4MB of .d.ts
on every config load to answer a question that only changes on a bump is
not worth it. `nr check:roblox-words` runs in CI before the build, since
`pnpm gen` would otherwise repair a stale snapshot in place and the drift
would never be reported.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments