skip to Main Content

Recently, my text color has been of for js,jsx,ts,tsx files in VS Code.

I don’t really know what happened but it’s not working all of a sudden.

enter image description here

As you see, the file is detected to be a typescript react file, but I do not have any text coloring.

3

Answers


  1. This warn come from Eslint rules when using Nextjs, it advice that you should use component from Nextjs. Follow this post to find your problem!

    Error: Do not use <img>. Use Image from 'next/image' instead. – Next.js using html tag <img /> ( with styled components )

    Login or Signup to reply.
  2. Downgrade plugin JavaScript and TypeScript Nightly to v5.0.20221115

    Login or Signup to reply.
  3. solved by adding following settings :

    "files.associations": {
        "*.tsx": "javascript"
    }
    

    Ref: https://code.visualstudio.com/docs/languages/overview#_adding-a-file-extension-to-a-language

    OR

    This is caused by the Javascript and Typescript Nightly extension. You can either downgrade or disable it to temporarily fix it.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search