the extension ESLint is configured as formatter but it cannot format "TypescriptReact"-files

See original GitHub issue
 "[typescript]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint",
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true
    },
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint",
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true
    },
  },

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dbaeumercommented, Sep 22, 2022

@dgss thanks for pointing this out. Indeed helpful.

0reactions
dgsscommented, Sep 21, 2022

@dbaeumer yes, but i’ve found my stupid reason. Since if I trigger ‘Format document with’ and select ESLint it was working, but when i trigger my shortcut to format the document with the default formatter I was getting this error. So just a remapping of the shortcut (removing the shortcut and resetting it back to the same shortcut) solved it. Maybe it helps someone else. It started to happen after a VSCode update. Maybe related with it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extension 'eslint' is configured as formatter but it cannot format ...
I was fighting with this for a while, turns out you need to head to Settings , under User go to Extensions >...
Read more >
ESLint can't be used as a formatter until the ESLint server is ...
The ESLint plugin seems to have stopped formatting TypeScript files. I searched online, changelogs, and open issues. I cannot find any ...
Read more >
How to Format Code on Save in VS Code with ESlint
We'll look at how to install and configure the extension in a later section. ... editor that maybe doesn't support formatting code on...
Read more >
How to use Prettier with ESLint and TypeScript in VSCode
Prettier is an opinionated (yet fully configurable) code formatter. ESLint can kind of format code too, but it's mostly intended to sniff ...
Read more >
Formatters - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
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