Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support different names for code block languages #245

Closed
DMartens opened this issue Mar 25, 2024 · 3 comments · Fixed by #246
Closed

feat: Support different names for code block languages #245

DMartens opened this issue Mar 25, 2024 · 3 comments · Fixed by #246

Comments

@DMartens
Copy link
Contributor

Currently the processor uses the raw language of the code block for the file extension of the block.
This works for using js as language but not for javascript or node as the resulting blocks would be excluded as the linter thinks they do not contain JavaScript.
It would be great for if there would be a normalization for mapping the code block language to the blocks file extension:

javascript -> js
node       -> js
ecmascript -> js
typescript -> ts
markdown   -> md
@nzakas
Copy link
Member

nzakas commented Mar 25, 2024

That seems reasonable to me. Would you like to submit a PR for that?

@nzakas nzakas added breaking tsc agenda This issue will be discussed by ESLint's TSC at the next meeting labels Apr 1, 2024
@nzakas
Copy link
Member

nzakas commented Apr 1, 2024

TSC Summary: This change seeks to use recognizable filename extensions for common code block types like node, javascript, ecmascript to .js, markdown to .md, and typescript to .ts. Currently, the plugin would use the code block type as the filename extension, so javascript becomes 0.javascript, which is a bit confusing.

TSC Question: This represents a breaking change, do we want to accept this and publish a new major version?

@sam3k
Copy link

sam3k commented Apr 8, 2024

Per TSC 2024-04-04 meeting, we've agreed to accept this proposal but will omit node option at this time.

@sam3k sam3k removed the tsc agenda This issue will be discussed by ESLint's TSC at the next meeting label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants