question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JS/TS project migration

See original GitHub issue

I’m currently working on a project with a lot of legacy JS code. We’re slowly converting JS files to TS, but it’s gonna take a while.

I’ve noticed that some typical linting problems, like undeclared variables (no-undef), are not reported. It seems to be because of ternaries like this one: https://github.com/ljosberinn/eslint-config-galex/blob/master/src/plugins/eslint-core.ts#L1057

The project does have TypeScript, but we can’t enable checkJs in tsconfig.json at this point, as this would be a nightmare. So we basically have legacy JS files that aren’t fully linted.

Perhaps a better approach for galex would be to move all those core ESLint rules that are shadowed by equivalent TypeScript rules into a JS-only override (*.{js,jsx}) and to enable them only if typescript is installed and checkJs is enabled?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ljosberinncommented, Aug 8, 2022

should be fixed with enableJavaScriptSpecificRulesInTypeScriptProject in the next release I hope 😃 docs included https://github.com/ljosberinn/eslint-config-galex#features

1reaction
ljosberinncommented, Aug 8, 2022

ah I believe that actually just needs an additional flag, let me introduce that

Read more comments on GitHub >

github_iconTop Results From Across the Web

bjornharrtell/jsts: JavaScript Topology Suite - GitHub
The primary goal of the project is to provide web mapping applications with a complete library for processing and analyzing simple geometries but...
Read more >
migrating a large JavaScript project from DOM spaghetti to ...
This post explores patterns, techniques, and common pitfalls in migrating from vanilla JavaScript to Backbone.js. It covers moving routers, ...
Read more >
JSTS 2002 Photo Gallery - Wilson Center
Matt Lungerhausen takes the opportunity to discuss his project in more detail ... issues: digital transformation, climate, migration, global governance.
Read more >
State of JTS | GeoMesa
Support projects migrating. • Java Roadmap Compatibility. • module names for “jigsaw” packaging. • Fixes. • Geometry.clone() → Geometry.copy() ...
Read more >
Best Practices to Migrate a JavaScript Project to TypeScript
This year I have migrated several JavaScript projects to TypeScript. The latest one is the RingCentral Softphone SDK.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found