JS/TS project migration
See original GitHub issueI’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:
- Created a year ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
should be fixed with
enableJavaScriptSpecificRulesInTypeScriptProject
in the next release I hope 😃 docs included https://github.com/ljosberinn/eslint-config-galex#featuresah I believe that actually just needs an additional flag, let me introduce that