-
Notifications
You must be signed in to change notification settings - Fork 8
fix: resolve all ESLint linting errors #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e15ee30
chore: install eslint with rubensworks config, add eslint.config.js a…
Copilot d797398
fix: resolve all ESLint linting errors
Copilot 383b5d9
chore: fix all eslint errors after tslint migration
Copilot 1c52322
Ignore .eslintcache
rubensworks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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",""] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| const config = require('@rubensworks/eslint-config'); | ||
|
|
||
| module.exports = config([ | ||
| { | ||
| ignores: [ | ||
| 'node_modules', | ||
| 'coverage', | ||
| '**/*.js', | ||
| '**/*.d.ts', | ||
| '**/*.js.map', | ||
| '**/*.yml', | ||
| '**/*.yaml', | ||
| '**/*.md', | ||
| 'perf/**', | ||
| ], | ||
| }, | ||
| { | ||
| files: [ '**/*.ts' ], | ||
| languageOptions: { | ||
| parserOptions: { | ||
| tsconfigRootDir: __dirname, | ||
| project: [ './tsconfig.eslint.json' ], | ||
| }, | ||
| }, | ||
| }, | ||
| { | ||
| // Project-specific overrides for TypeScript files | ||
| files: [ '**/*.ts' ], | ||
| rules: { | ||
| // Project uses strictNullChecks: false, so this rule cannot be applied | ||
| 'ts/prefer-nullish-coalescing': 'off', | ||
| // This is a Node.js library that legitimately imports Node.js built-in modules | ||
| 'import/no-nodejs-modules': 'off', | ||
| // Allow UPPER_CASE for class properties (public API constants) and enum members | ||
| 'ts/naming-convention': [ | ||
| 'error', | ||
| { | ||
| selector: 'default', | ||
| format: [ 'camelCase' ], | ||
| leadingUnderscore: 'forbid', | ||
| trailingUnderscore: 'forbid', | ||
| }, | ||
| { | ||
| selector: 'import', | ||
| format: null, | ||
| }, | ||
| { | ||
| selector: 'variable', | ||
| format: [ 'camelCase', 'UPPER_CASE' ], | ||
| leadingUnderscore: 'forbid', | ||
| trailingUnderscore: 'forbid', | ||
| }, | ||
| { | ||
| selector: 'classProperty', | ||
| format: [ 'camelCase', 'UPPER_CASE' ], | ||
| leadingUnderscore: 'forbid', | ||
| trailingUnderscore: 'forbid', | ||
| }, | ||
| { | ||
| selector: 'enumMember', | ||
| format: [ 'camelCase', 'UPPER_CASE' ], | ||
| }, | ||
| { | ||
| selector: 'typeLike', | ||
| format: [ 'PascalCase' ], | ||
| }, | ||
| { | ||
| selector: [ 'typeParameter' ], | ||
| format: [ 'PascalCase' ], | ||
| prefix: [ 'T' ], | ||
| }, | ||
| { | ||
| selector: 'interface', | ||
| format: [ 'PascalCase' ], | ||
| custom: { | ||
| regex: '^I[A-Z]', | ||
| match: true, | ||
| }, | ||
| }, | ||
| { | ||
| // Allow leading underscore for Node.js Transform stream override methods | ||
| selector: 'method', | ||
| format: [ 'camelCase' ], | ||
| leadingUnderscore: 'allow', | ||
| trailingUnderscore: 'forbid', | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
| ]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,12 @@ | ||
| import {SaxesParser} from "@rubensworks/saxes"; | ||
| import {RdfXmlParser} from "./RdfXmlParser"; | ||
| import type { SaxesParser } from '@rubensworks/saxes'; | ||
| import type { RdfXmlParser } from './RdfXmlParser'; | ||
|
|
||
| /** | ||
| * An error that includes line and column in the error message. | ||
| */ | ||
| export class ParseError extends Error { | ||
|
|
||
| constructor(parser: RdfXmlParser, message: string) { | ||
| const saxParser: SaxesParser = (<any>parser).saxParser; | ||
| public constructor(parser: RdfXmlParser, message: string) { | ||
| const saxParser: SaxesParser = (<{ saxParser: SaxesParser }><unknown>parser).saxParser; | ||
| super(parser.trackPosition ? `Line ${saxParser.line} column ${saxParser.column + 1}: ${message}` : message); | ||
| } | ||
|
|
||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.