Skip to content

fix: resolve all ESLint linting errors#82

Merged
rubensworks merged 4 commits intomasterfrom
copilot/migrate-from-tslint
Apr 13, 2026
Merged

fix: resolve all ESLint linting errors#82
rubensworks merged 4 commits intomasterfrom
copilot/migrate-from-tslint

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 13, 2026

  • Understand current tslint setup
  • Install @rubensworks/eslint-config and eslint@^8, remove tslint/tslint-eslint-rules
  • Create eslint.config.js
  • Create tsconfig.eslint.json
  • Update lint script in package.json
  • Remove tslint.json and test/tslint.json
  • Fix remaining linting errors in lib/ParseError.ts, lib/RdfXmlParser.ts, test/RdfXmlParser-test.ts
  • All 220 tests passing, 0 lint errors

Copilot AI and others added 2 commits April 13, 2026 08:49
…nd 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>
- 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>
Comment thread .eslintcache Outdated
@@ -0,0 +1 @@
[{"/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/index.ts":"1","/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/package.json":"2","/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/renovate.json":"3","/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/tsconfig.eslint.json":"4","/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/tsconfig.json":"5","/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/lib/ParseError.ts":"6","/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/lib/RdfXmlParser.ts":"7","/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/perf/RdfXmlParser-perf.ts":"8","/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/spec/earl-meta.json":"9","/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/test/RdfXmlParser-test.ts":"10","/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/test/tsconfig.json":"11"},{"size":36,"mtime":1776069305977,"results":"12","hashOfConfig":"13"},{"size":3529,"mtime":1776069947711,"results":"14","hashOfConfig":"15"},{"size":68,"mtime":1776069305977,"results":"16","hashOfConfig":"17"},{"size":190,"mtime":1776070105260,"results":"18","hashOfConfig":"19"},{"size":582,"mtime":1776071755949,"results":"20","hashOfConfig":"19"},{"size":493,"mtime":1776071616787,"results":"21","hashOfConfig":"13"},{"size":37559,"mtime":1776071766111,"results":"22","hashOfConfig":"13"},{"size":782,"mtime":1776069305977,"results":"23","hashOfConfig":"24"},{"size":753,"mtime":1776069947711,"results":"25","hashOfConfig":"17"},{"size":140142,"mtime":1776071712524,"results":"26","hashOfConfig":"27"},{"size":222,"mtime":1776071830175,"results":"28","hashOfConfig":"19"},{"filePath":"29","messages":"30","suppressedMessages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"cfd5eh",{"filePath":"32","messages":"33","suppressedMessages":"34","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1wd811y",{"filePath":"35","messages":"36","suppressedMessages":"37","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1gvqy43",{"filePath":"38","messages":"39","suppressedMessages":"40","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1e12k0q",{"filePath":"41","messages":"42","suppressedMessages":"43","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","suppressedMessages":"46","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"47","messages":"48","suppressedMessages":"49","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"50","messages":"51","suppressedMessages":"52","errorCount":1,"fatalErrorCount":1,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"14v75ax",{"filePath":"53","messages":"54","suppressedMessages":"55","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","suppressedMessages":"58","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1w96qen",{"filePath":"59","messages":"60","suppressedMessages":"61","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/index.ts",[],[],"/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/package.json",[],[],"/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/renovate.json",[],[],"/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/tsconfig.eslint.json",[],[],"/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/tsconfig.json",[],[],"/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/lib/ParseError.ts",[],[],"/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/lib/RdfXmlParser.ts",[],[],"/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/perf/RdfXmlParser-perf.ts",["62"],[],"/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/spec/earl-meta.json",[],[],"/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/test/RdfXmlParser-test.ts",[],["63"],"/home/runner/work/rdfxml-streaming-parser.js/rdfxml-streaming-parser.js/test/tsconfig.json",[],[],{"ruleId":null,"fatal":true,"severity":2,"message":"64","nodeType":null},{"ruleId":"65","severity":2,"message":"66","line":1952,"column":1,"nodeType":"67","messageId":"68","endLine":1952,"endColumn":124,"suppressions":"69"},"Parsing error: ESLint was configured to run on `<tsconfigRootDir>/perf/RdfXmlParser-perf.ts` using `parserOptions.project`: <tsconfigRootDir>/tsconfig.eslint.json\nHowever, that TSConfig does not include this file. Either:\n- Change ESLint's list of included files to not include this file\n- Change that TSConfig to include this file\n- Create a new TSConfig that includes this file and include it in your parserOptions.project\nSee the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file","max-len","This line has a length of 123. Maximum allowed is 120.","Program","max",["70"],{"kind":"71","justification":"72"},"directive",""] No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file from the PR, and add it to .gitignore.

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 13, 2026

Coverage Report for CI Build 24336446186

Coverage remained the same at 100.0%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 155 of 155 lines across 2 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 373
Covered Lines: 373
Line Coverage: 100.0%
Relevant Branches: 376
Covered Branches: 376
Branch Coverage: 100.0%
Branches in Coverage %: Yes
Coverage Strength: 751.98 hits per line

💛 - Coveralls

@rubensworks rubensworks marked this pull request as ready for review April 13, 2026 09:39
@rubensworks rubensworks merged commit ae3c4d1 into master Apr 13, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants