Skip to content

Fix typescript only rules are being checked against pure js files#511

Open
georgekaran wants to merge 5 commits into
croct-tech:masterfrom
georgekaran:fix-Typescript-only-rules-are-being-checked-against-pure-JS-files
Open

Fix typescript only rules are being checked against pure js files#511
georgekaran wants to merge 5 commits into
croct-tech:masterfrom
georgekaran:fix-Typescript-only-rules-are-being-checked-against-pure-JS-files

Conversation

@georgekaran

@georgekaran georgekaran commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Linting raw JS files in a project that uses the exported TypeScript config no longer fails with:

Error: Error while loading rule '@typescript-eslint/await-thenable': You have used a rule which requires type information, but don't have parserOptions set to generate type information for this file.

This happened because the recommendedTypeChecked config from typescript-eslint is spread without a filter for only TS files, so its type-aware rules were applied to pure JS files too, where the required type information isn't available.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@pkg-pr-new

pkg-pr-new Bot commented Jun 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@croct/eslint-plugin@511

commit: 67b5e9b

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.

Typescript-only rules are being checked against pure JS files

1 participant