Add oxlint for type-aware linting that Biome cannot cover
Install oxlint with tsgolint for TypeScript type information. Enable rules for unnecessary type assertions, deprecated API usage, preferring replaceAll over replace with global regex, and String.raw for escaped backslashes. Fix all violations: remove redundant as-casts, replace deprecated FormEvent with SubmitEvent, convert replace(/g) to replaceAll, and use String.raw in escapeRegExp. Add oxlint to the pnpm check gate alongside Biome. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -373,8 +373,8 @@ function extractCr(cr: string | { cr: string } | undefined): string {
|
||||
function makeCreatureId(source: string, name: string): CreatureId {
|
||||
const slug = name
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9]+/g, "-")
|
||||
.replace(/(^-|-$)/g, "");
|
||||
.replaceAll(/[^a-z0-9]+/g, "-")
|
||||
.replaceAll(/(^-|-$)/g, "");
|
||||
return creatureId(`${source.toLowerCase()}:${slug}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user