Skip to content

Replace tslint with ESLint and lint in CI - #360

Draft
isc-klu wants to merge 1 commit into
intersystems-community:masterfrom
isc-klu:eslint
Draft

isc-klu wants to merge 1 commit into
intersystems-community:masterfrom
isc-klu:eslint

Conversation

@isc-klu

@isc-klu isc-klu commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

npm run lint has been unusable: tslint 5 (deprecated since 2019) crashes on TypeScript 5 (no-shadowed-variable "threw an error" ×20), and tslint:recommended demands space indentation while .editorconfig and every file use tabs, so it reported 2679 indent errors plus 132 others. It is not run in CI, so nothing caught this.

Changes

  • tslinteslint + typescript-eslint, both recommended presets, in a flat eslint.config.mjs. The stale .eslintrc.json/.eslintignore copied from vscode-objectscript years ago (and never wired up) are removed with tslint.json.
  • Rules relaxed to match the codebase's existing conventions: no-explicit-any off, unused function args and catch bindings allowed (tsconfig already has noUnusedParameters: false), ignoreRestSiblings for the { accessToken: _, ...rest } idiom, empty catch {} allowed. Everything else is default.
  • The 21 findings fixed with no behavior change: Function → a GetChildren signature, namespace StorageIds → a const object, {} header type → Record<string, string>, hasOwnProperty via a hasServer helper, new Array()[], one letconst, one non-null assertion on an optional chain, and a targeted disable for the lazy require("node-cmd"). 13 dead // tslint:disable-next-line comments removed.
  • npm run lint added to main.yml and prerelease.yml before compile.
  • skipLibCheck in tsconfig.json: ESLint 10's bundled types conflict with @types/eslint-scope pulled in by webpack. (Integration tests against IRIS containers for release-preparation PRs #359 needs the same flag for @vscode/test-electron 3, so the two PRs will touch the same line.)

Not changed

Formatting is left to .editorconfig; no Prettier, so no reformatting diff. tsfmt.json is untouched.

🤖 Generated with Claude Code

tslint has been deprecated since 2019 and crashes on TypeScript 5; its
recommended config also demanded spaces while the codebase uses tabs, so
`npm run lint` reported 2679 indent errors and nobody ran it. Switch to
ESLint + typescript-eslint recommended, fix the 21 findings and drop the
dead tslint directives, then run lint on every push.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.

1 participant