Skip to content

Conversation

@DMartens
Copy link

Prerequisites checklist

What is the purpose of this pull request?

Removing the special behaviour for the TypeScript parser.

What changes did you make? (Give an overview)

This PR includes two fixes:

  1. remove the hardcoded sourceType of "module" for the TypeScript parser (refs Bug: Playground ignores sourceType when using @typescript-eslint/parser #910)
  2. Fixes Suggestion: Move languageOptions properties from nested parserOptions #891 by setting the sourceType on languageOptions instead of languageOptions.parserOptions when swapping the parser.

Related Issues

Fixes #891 and #910.

Is there anything you'd like reviewers to focus on?

Please also try various variations of updating the configuration and the resulting configuration file.

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for ja-eslint ready!

Name Link
🔨 Latest commit e3b383a
🔍 Latest deploy log https://app.netlify.com/projects/ja-eslint/deploys/697406c647be06000894f50e
😎 Deploy Preview https://deploy-preview-915--ja-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for es-eslint ready!

Name Link
🔨 Latest commit e3b383a
🔍 Latest deploy log https://app.netlify.com/projects/es-eslint/deploys/697406c63749720008639798
😎 Deploy Preview https://deploy-preview-915--es-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for new-eslint ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e3b383a
🔍 Latest deploy log https://app.netlify.com/projects/new-eslint/deploys/697406c6ef78520008ba12d8
😎 Deploy Preview https://deploy-preview-915--new-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for zh-hans-eslint ready!

Name Link
🔨 Latest commit e3b383a
🔍 Latest deploy log https://app.netlify.com/projects/zh-hans-eslint/deploys/697406c62b9c6d000817754f
😎 Deploy Preview https://deploy-preview-915--zh-hans-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for fr-eslint ready!

Name Link
🔨 Latest commit e3b383a
🔍 Latest deploy log https://app.netlify.com/projects/fr-eslint/deploys/697406c63063b60008b05424
😎 Deploy Preview https://deploy-preview-915--fr-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for pt-br-eslint ready!

Name Link
🔨 Latest commit e3b383a
🔍 Latest deploy log https://app.netlify.com/projects/pt-br-eslint/deploys/697406c6aa435700081299d5
😎 Deploy Preview https://deploy-preview-915--pt-br-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for hi-eslint ready!

Name Link
🔨 Latest commit e3b383a
🔍 Latest deploy log https://app.netlify.com/projects/hi-eslint/deploys/697406c6d6146200082a8be2
😎 Deploy Preview https://deploy-preview-915--hi-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for de-eslint ready!

Name Link
🔨 Latest commit e3b383a
🔍 Latest deploy log https://app.netlify.com/projects/de-eslint/deploys/697406c647be06000894f513
😎 Deploy Preview https://deploy-preview-915--de-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Tanujkanti4441 Tanujkanti4441 moved this from Needs Triage to Triaging in Triage Jan 20, 2026
Copy link
Contributor

@Tanujkanti4441 Tanujkanti4441 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

@mdjermanovic mdjermanovic moved this from Triaging to Implementing in Triage Jan 22, 2026
@mdjermanovic
Copy link
Member

I think the following should be updated to use languageOptions.sourceType if we are no longer setting parserOptions.sourceType:

https://github.com/DMartens/eslint.org/blob/fd870ab13462a53b84bb0b5d5ffb9f6aeed4f693/src/playground/components/configuration.jsx#L398-L401

@mdjermanovic
Copy link
Member

Also, the following doesn't seem necessary if we are no longer using parserOptions.sourceType:

https://github.com/DMartens/eslint.org/blob/fd870ab13462a53b84bb0b5d5ffb9f6aeed4f693/src/playground/components/configuration.jsx#L526-L527

Copy link
Contributor

@Tanujkanti4441 Tanujkanti4441 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Right now on selecting @typescript-eslint/paser the Source Type option is empty, as #915 (comment) suggests to use the default value for sourceType, so can we also add (default) option on Source Type for tsparser as well like we have for espree?

@mdjermanovic
Copy link
Member

Image Right now on selecting `@typescript-eslint/paser` the `Source Type` option is empty, as [#915 (comment)](https://github.com//pull/915#discussion_r2725504081) suggests to use the default value for `sourceType`, so can we also add `(default)` option on `Source Type` for tsparser as well like we have for espree?

Looks like we don't need separate lists of Source Type values for Espree and @typescript-eslint/paser?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted bug Something isn't working

Projects

Status: Implementing

Development

Successfully merging this pull request may close these issues.

Suggestion: Move languageOptions properties from nested parserOptions

3 participants