Skip to content

chore: migrate from TSLint to ESLint - #6318

Draft
Pyatakov wants to merge 3 commits into
developfrom
chore/migrate-tslint-to-eslint
Draft

Pyatakov wants to merge 3 commits into
developfrom
chore/migrate-tslint-to-eslint

Conversation

@Pyatakov

@Pyatakov Pyatakov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

  • Replace end-of-life TSLint with ESLint 10, using a single flat config at the repo root (eslint.config.mjs) built with defineConfig and preset extends.
  • Extend eslint:recommended and typescript-eslint recommended, keeping the TSLint rules no preset covers (eqeqeq, curly, no-var, no-throw-literal, no-shadow, kebab-case filenames and the @stylistic formatting group). Formatting is enforced through @stylistic rather than Prettier, so no mass reformat is needed.
  • Opt into eslint-plugin-unicorn one rule at a time rather than through a preset. The presets enable roughly 200 rules, of which several emit incorrect code when autofixed: no-new-array drops the generic type argument and breaks the build, and no-useless-coercion strips String() from the non-string branch of a typeof check, silently changing hash inputs. Listing rules explicitly also keeps plugin upgrades from enabling new rules unreviewed.
  • Drop TSLint rules that add no value here: max-classes-per-file, no-bitwise, default-case, dot-notation, no-caller, object-shorthand, one-var and yoda.
  • Keep no-explicit-any and no-undef off, matching TSLint: the former reports 5,449 violations, and the latter only false-positives on TypeScript-only global types.
  • Remove both tslint.json files, the tslint/tslint-config-standard dependencies and the per-package lint scripts; add root lint and lint:fix scripts.
  • Replace the per-package CI lint loop with a single yarn lint step.
  • Apply eslint --fix across the in-scope packages.
  • Ignore packages that were never enforced in CI, along with test files, so they can be cleaned up and re-enabled incrementally.

1,039 violations remain and are not yet addressed, so the lint step is expected to fail until they are.

@Pyatakov
Pyatakov force-pushed the chore/migrate-tslint-to-eslint branch from 6b2374f to c07e50f Compare July 3, 2026 12:43
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Test Results

 32 files   64 suites   4m 6s ⏱️
 35 tests  34 ✅ 0 💤 1 ❌
165 runs  164 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit c6be66f.

♻️ This comment has been updated with latest results.

@Pyatakov
Pyatakov force-pushed the chore/migrate-tslint-to-eslint branch from c07e50f to 0ce2a66 Compare July 3, 2026 12:53
@Pyatakov Pyatakov self-assigned this Jul 3, 2026
@Pyatakov
Pyatakov force-pushed the chore/migrate-tslint-to-eslint branch from 0ce2a66 to 365e001 Compare July 3, 2026 15:36
@Pyatakov
Pyatakov force-pushed the chore/migrate-tslint-to-eslint branch 3 times, most recently from 70f5c9e to 8fab39f Compare July 15, 2026 21:49
@Pyatakov
Pyatakov deleted the branch develop August 5, 2026 11:55
@Pyatakov Pyatakov closed this Aug 5, 2026
@Pyatakov Pyatakov reopened this Aug 5, 2026
@Pyatakov
Pyatakov force-pushed the chore/migrate-tslint-to-eslint branch 3 times, most recently from af68761 to 86501ad Compare August 17, 2026 22:56
Pyatakov and others added 3 commits August 18, 2026 00:38
Replace end-of-life TSLint with ESLint 10 using a single flat config at the repo root (eslint.config.mjs). Rules are ported from tslint.json to keep coverage equivalent (quotes, eqeqeq, curly, no-bitwise, no-shadow, unused vars, kebab-case filenames, etc.); formatting is handled by @Stylistic rather than Prettier.

- Remove tslint.json files, tslint dependencies, and per-package lint scripts; add root lint and lint:fix scripts.
- Replace the per-package CI lint loop with a single yarn lint step.
- Ignore packages not previously enforced in CI and test files, to be cleaned up and re-enabled incrementally.

Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
Signed-off-by: Alex Piatakov <alex.piatakov@hashgraph.com>
Signed-off-by: Alex Piatakov <alex.piatakov@hashgraph.com>
@Pyatakov
Pyatakov force-pushed the chore/migrate-tslint-to-eslint branch from 86501ad to c6be66f Compare August 17, 2026 23:38
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