Commit d797398
fix: resolve all ESLint linting errors
- lib/ParseError.ts: Add public constructor modifier, fix type assertion syntax
- lib/RdfXmlParser.ts:
- Fix NCNAME_MATCHER regex (misleading char class, long line) using RegExp constructor
- Add public/return type annotations throughout (constructor, _transform, validateNcname, attachSaxListeners, onTag, onTagResource, onTagProperty, emitTriple, claimNodeId, onText, onCloseTag, onDoctype, setDirection, setVersion)
- Fix unsafe type assertions using angle-bracket syntax
- Fix SaxesParser field type to SaxesParser<{ xmlns: true }> for type safety
- Fix no-fallthrough in switch statement with 'Falls through' comment
- Fix capitalized-comments violations
- Refactor createLiteral to avoid indentation/ternary issues
- Format all emitTriple/push calls with consistent multi-line argument style
- Fix onDoctype regex: add u flag, use replaceAll, type callback params
- Fix validateUri defaulting to true when not specified
- Add es2021.string to tsconfig lib arrays for replaceAll support
- test/RdfXmlParser-test.ts:
- Replace all return expect(...) with await expect(...)
- Make non-async callbacks async
- Fix duplicate test title
- Fix toThrow() missing message
- Add eslint-disable-next-line for unavoidably long test title
Co-authored-by: Copilot <[email protected]>
Co-authored-by: rubensworks <[email protected]>1 parent e15ee30 commit d797398
5 files changed
Lines changed: 384 additions & 222 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
0 commit comments