Commit ae3c4d1
Migrate to eslint (#82)
* chore: install eslint with rubensworks config, add eslint.config.js and tsconfig.eslint.json
Agent-Logs-Url: https://github.com/rdfjs/rdfxml-streaming-parser.js/sessions/46b14265-34c1-4bd0-b41d-2a2e1a911a1d
Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
* 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>
* chore: fix all eslint errors after tslint migration
Agent-Logs-Url: https://github.com/rdfjs/rdfxml-streaming-parser.js/sessions/46b14265-34c1-4bd0-b41d-2a2e1a911a1d
Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
* Ignore .eslintcache
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
Co-authored-by: Ruben Taelman <ruben.taelman@ugent.be>1 parent 84c395b commit ae3c4d1
File tree
14 files changed
+3981
-1235
lines changed- lib
- perf
- spec
- test
14 files changed
+3981
-1235
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 8 | + | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
14 | 12 | | |
0 commit comments