question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autofix lightbulb not shown in TypeScript

See original GitHub issue

The fixes lightbulb with suppress options does not show up in TypeScript files. If I manually change the language mode of a file to JavaScript, it shows up, and then disappears again if I change it back to TypeScript. The error shows as expected and I have the following settings enabled:

    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact"
    ],

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:17
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

95reactions
dbaeumercommented, Feb 5, 2019

Fixes are only automatically shown for JS right now. You can enable for TS using the following setting:

    "eslint.validate": [
        "javascript",
        "javascriptreact",
        { "language": "typescript", "autoFix": true }
        { "language": "typescriptreact", "autoFix": true }
    ],

Keeping the issue open to consider if we should auto enable TS.

12reactions
svipascommented, Feb 11, 2019

@dbaeumer I vote for an automatic validation and auto fix enabling for TypeScript files because of this https://github.com/typescript-eslint/typescript-eslint. I’m currently using it in VS Code and it works perfectly. I even think TSLint after some time will be abandoned… Even TypeScript team will use ESLint for their own repo, you can read it here: https://github.com/Microsoft/TypeScript/issues/29288 and here https://eslint.org/blog/2019/01/future-typescript-eslint

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code Automatic Imports - typescript
There are two types of auto imports: the add missing import quick fix which shows up as a lightbulb on errors: enter image...
Read more >
VS Code tips — Auto Fix - YouTube
Today's VS Code keybinding: Auto fix Quickly fix simple errors, such as misspellings or improper interface implementations / … Show more.
Read more >
TypeScript Programming with Visual Studio Code
TypeScript in Visual Studio Code. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. It offers classes, modules, and interfaces ......
Read more >
Quick-fixes for code issues - ReSharper - JetBrains
These indicators appear when you set the caret at the code issue. ... To avoid this, ReSharper provides the Hide Visual Studio light...
Read more >
How to Format Code on Save in VS Code with ESlint
Basic Prettier Config (All); JavaScript ESLint Config; TypeScript ESLint ... VS Code may show a prompt asking if you want to use the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found