I think this was caused by the extension called JavaScript and TypeScript Nightly. This was causing the syntax highlighting for .js and .ts files (.jsx and .tsx too). This was more of a bug with the latest version (currently 1.73.1).

You can disable the extension to enable the syntax highlighting.


This extension has now been updated and this issue is fixed.

Answer from Haneen on Stack Overflow
🌐
Developer Community
developercommunity.visualstudio.com › content › problem › 32425 › javascript-syntax-highlighting-it-not-working.html
Javascript syntax highlighting it not working
May 9, 2017 - Skip to main content · Visual Studio · Guidelines Problems Suggestions Code of Conduct · Downloads · Visual Studio IDE Visual Studio Code Azure DevOps Team Foundation Server Accounts and Subscriptions · Subscriber Access · Microsoft Security Azure Dynamics 365 Microsoft 365 Microsoft ...
🌐
Reddit
reddit.com › r/vscode › vscode js no syntax highlighting at all
r/vscode on Reddit: Vscode js no syntax highlighting at all
November 17, 2022 -

The syntax highlighting disappeared suddenly when I was coding, I don't know what went wrong and I'm loving every single brain cell googling and not finding any solution to my problem. I have tried :

- reloading vscode

- reinstalling the babel extension

- change themes

No problem with HTML/CSS files, only javascript

🌐
GitHub
github.com › Microsoft › vscode › issues › 47713
JavaScript syntax highlighting not working · Issue #47713 · microsoft/vscode
April 12, 2018 - VSCode Version: 1.22.1 OS Version: macOS 10.13.3 Steps to Reproduce: Follow along with these vscode+React tutorial steps After create-react-app my-app step, open index.js I was expecting syntax highlighting matching the tutorial screensh...
Author   microsoft
🌐
Visual Studio Code
code.visualstudio.com › api › language-extensions › syntax-highlight-guide
Syntax Highlight Guide | Visual Studio Code Extension API
November 3, 2021 - Each token is associated with a scope that defines the context of the token. A scope is a dot separated list of identifiers that specify the context of the current token. The + operation in JavaScript, for example, has the scope keyword.operator.arithmetic.js. Themes map scopes to colors and styles to provide syntax highlighting.
🌐
GitHub
github.com › Microsoft › vscode › issues › 49705
Syntax highlighting isn't working on one Javascript file · Issue #49705 · microsoft/vscode
May 11, 2018 - Issue Type: Bug Hi. I tried to open my JavaScript file, and for some reason all the lines were blue instead of having their syntax highlighted however, this other javascript file which is in the same folder is properly highlighted I have...
Author   microsoft
🌐
GitHub
github.com › microsoft › vscode › issues › 92308
TypeScript / JavaScript syntax highlighting changes after a few seconds · Issue #92308 · microsoft/vscode
March 10, 2020 - I just updated and my javascript syntax highlighting broke. VSCode Version: 1.43 OS Version: Windows 10 Does this issue occur when all extensions are disabled?: Yes EDIT: I rolled back to January. Much better now Edit by @aeschli (VSCode...
Author   microsoft
Find elsewhere
🌐
Developer Community
developercommunity.visualstudio.com › content › problem › 186988 › javascript-highlighting-does-not-work.html
Javascript Highlighting Does Not Work
Skip to main content · Visual Studio · Guidelines Problems Suggestions Code of Conduct · Downloads · Visual Studio IDE Visual Studio Code Azure DevOps Team Foundation Server Accounts and Subscriptions · Subscriber Access · Microsoft Security Azure Dynamics 365 Microsoft 365 Microsoft ...
🌐
YouTube
youtube.com › peter schneider
Visual Studio Code Syntax Highlighting not working for Javascript and Typescript [closed] - YouTube
Visual Studio Code Syntax Highlighting not working for Javascript and Typescript [closed]I hope you found a solution that worked for you :) The Content (exce...
Published   December 10, 2022
Views   594
🌐
Developer Community
developercommunity.visualstudio.com › content › problem › 757381 › syntax-highlighting-stopped-working-for-javascript.html
Syntax highlighting stopped working for javascript files in ...
October 2, 2019 - Skip to main content · Visual Studio · Guidelines Problems Suggestions Code of Conduct · Downloads · Visual Studio IDE Visual Studio Code Azure DevOps Team Foundation Server Accounts and Subscriptions · Subscriber Access · Microsoft Security Azure Dynamics 365 Microsoft 365 Microsoft ...
🌐
GitHub
github.com › microsoft › vscode › issues › 150171
Syntax highlighting doesn't work with "text/jsx" script tags · Issue #150171 · microsoft/vscode
May 23, 2022 - Observe that syntax highlighting doesn't work inside the tag as long as script type is set to text/jsx. If it is changed to text/javascript then syntax highlighting works.
Author   microsoft
🌐
Pratik Pathak
pratikpathak.com › home › [updated] syntax highlighting not working vs code
[UPDATED] Syntax Highlighting Not working VS Code - Pratik Pathak
August 12, 2024 - If installed, Uninstalled/Disable the extension, “JavaScript and TypeScript Nightly Extension” is a syntax highlighting extension.
🌐
GitHub
github.com › Microsoft › vscode › issues › 50293
.js syntax highlighting not working · Issue #50293 · microsoft/vscode
May 22, 2018 - Issue Type: Bug download https://github.com/mishoo/UglifyJS2/blob/master/test/compress/evaluate.js open it in VSCode observe that syntax highlighting is mostly dysfunctional It works without a glitch a few versions ago. VS Code version: ...
Author   microsoft
🌐
Developer Community
developercommunity.visualstudio.com › content › problem › 32425 › javascript-syntax-highlighting-it-not-working.html
Developer Community
October 8, 2020 - Skip to main content · Microsoft · Visual Studio · Sign in · You need to enable JavaScript to run this app · Sorry this browser is no longer supported · Please use any other modern browser like 'Microsoft Edge'
🌐
GitHub
github.com › microsoft › vscode › issues › 165225
VSCode syntax highlighting is gone! · Issue #165225 · microsoft/vscode
November 2, 2022 - I've been facing this for the last couple of months in Windows and macOS. I'm not sure exactly when this starts happening, perhaps after a VSCode update or an OS update. Here's a screenshot for demonstration, which contains a TypeScript ...
Author   microsoft
🌐
GitHub
github.com › Microsoft › vscode › issues › 16029
JavaScript syntax highlighting not used for inline script in HTML files · Issue #16029 · microsoft/vscode
November 24, 2016 - The inline JavaScript is shown using colorization that does not match the colorization used for JavaScript files.
Author   microsoft
🌐
SheCodes
shecodes.io › athena › 1850-troubleshooting-syntax-highlighting-in-visual-studio-code
[VS Code] - Troubleshooting Syntax Highlighting in Visual Studio Code
Learn how to solve the issue of multiple-line lists appearing united by a single underline in the code editor Visual Studio Code.