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 <223556219+Copilot@users.noreply.github.com>
Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>1 parent e15ee30 commit d797398
File tree
5 files changed
+384
-222
lines changed- lib
- test
5 files changed
+384
-222
lines changed| 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