I love what prettier does in tandem with eslint. I am glad that we can't push up misformatted code without errors, but is there a way to turn off the complaints in vscode? I don't need vscode giving things a red underline because I hit enter and now something is on a new line that the formatter doesn't like, especially when I have format on save. I would guess that the only solution to this is to remove all linting related to formatting and just have things fixed with the running of formatting in pre commit hooks and github actions...
To add onto this. I think the errors I'm getting come from this plugin included in .eslintrc:
"plugin:prettier/recommended"
When I turn it off the errors go away. My preference would be to find a way to hide these errors in vscode while keeping this plugin
Related
I have been trying out Svelte for the last couple of days.
Everything is working fine, but then for some reason I get those weird highlighting bugs in VSC.
Whenever that happens, VSC is basically no longer useable (No IntelliSense, weird Highlighting, ...)
Has anyone of you experienced similar problems with Svelte?
I recommend you update your IDE, your plugins and svelte if you haven’t already, to use the official Svelte plugin for VS code, to disable other plugins that may conflict with IntelliSense, and reloading VS Code. If the problem persists, it would be better to ask for help on the plugin’s Github page.
I'm using VSCode and i've been chasing an issue for some time. I've narrowed it down to prettier, thought I don't know how to fix it.
I use autosave extensively to quickly see changes in code through live server. I'd like to keep that if at all possible. I've tried turning format on save off and on, however it appears that so long as I have Prettier enabled, it touches my files and thus overwrites any redo logs.
I've only been using VSCode for about 8 months, and don't have all that much customized, but I do have a few other extensions. However, I've narrowed it down to prettier such that I get the functionality I expect (minus prettier) with it disabled.
I don't really want prettier to format or touch anything unless I press a key combination, so I'm not sure what is wrong. I've tried changing a few other things and looked online, but most everything says to check the "Format on Save" option. However, it doesn't matter whether it's ticked or not, so long as prettier is enabled.
Is there a way to explicitly tell vscode or prettier to only format when I press Shift+Alt+F ?
I need to figure out how to turn off emphasized items in Visual Studio Code
This might sound like a strange requirement, but in my workflow vscode functions as less an IDE than a cross-platform ViM-esque frontend with lots of remote development tools built-in.
Due to this use case, I don't need or want the linting features to show up in the file browser. How might I accomplish this?
Attempts to solve the problem
I've run out of search terms here and cannot find an answer.
Searches including terms in this question's title yielded little
SO-specific search queries also yielded little
This seems to be somewhat related, at least as a representation of the "feature" I'm referencing: VS code containes emphasized items but no error
VSCode "preferences" do not appear to show what I'm looking for, likely an issue with me not searching for the right variable name.
In my experience with VSCode it has been wonderfully customize-able, so I'm guessing there's a setting somewhere ready to be modified to accomplish this. Any help much appreciated, thanks!
My use case was a bit different: after viewing some files in a git submodule those files became linted, and errors and warnings cluttered up my VS Code Explorer file browser window on files I had no intention of ever handling. I basically wanted a way to clear out those lint warnings, and found it here. The solution is to reload the window:
CtrlShiftP on Windows/Linux, ⌘ShiftP on Mac -- then select "Developer: Reload Window"
One by-product of reloading the window is that it clears out those unwanted warnings (at least until the next time I visit the file). It also has the effect of clearing out warnings on files that I would normally want to see, of course, but chances are I'll be visiting those files again soon, so it's fine. Not a perfect solution, but it works for me and my use-case; hopefully it can help others.
I don't know how to turn it off, but I had this on multiple folders and I fixed it by renaming the folder to a random name, then naming it back to the name it was before and the error would go away.
If you have this issuse then uninstall extention then CtrlShiftP on Windows/Linux, ⌘ShiftP on Mac -- then select "Developer: Reload Window" then type developer: relode page this issuse automatically resovle
i have this issuse then i uninstall extension then this issuse resolve.
I was able to permanently prevent this by adding the files to the .gitignore file. It seems that this happens in a cloned repository when you add new files.
The bounty expires in 5 days. Answers to this question are eligible for a +50 reputation bounty.
Ivan Sveshnikov wants to draw more attention to this question.
Premise: When I use Visual Studio Code I want linting on save and I like intellisense.
Nonetheless I'm annoyed to no end by linting (aka error and warning messages in the form of "[ts/jshint]: here you're missing a semicolon") while I'm typing. They are absolutely useless (I never watch them), distracting, with all that flashy things appearing and disappearing at the bottom of the screen, and yesterday, when my pc was already slowed down for other reasons, it reduced the typing to a crawl.
Since I couldn't find a way to disable linting on typing, I went in the settings and disabled mostly of the typescript controls (since they were the worst offenders, useless to me, because I very rarely use a .ts, and anyway I use flow+jshint, which are more than enough). And, for some magical reasons, it even seemed to disable the linting while typing, leaving active only the one on save.
But then today, when I opened VSCode, the linting while typing restarted. The [ts] errors are very few now, but there are a few still produced by jshint. Flow, luckily, works as intended and only on save.
So, is there a way to disable the linting while typing, leaving active both intellisense, code completion suggestion and the linting on save?
Edit: I have enabled the following extensions:
HTML CSS Support 0.2.0,
html to javascript string 0.0.6,
JavaScript Booster 0.10.2,
jshint 0.10.20,
Sorting HTML and Jade attributes 2.1.0,
Todo Tree 0.0.116,
vscode-flow-ide 1.2.0
(momentarily I disabled intellisense, to see if it fixed the problem. It didn't)
I have tried lots of settings based on my google searches and all of my imported files still have errors regarding to the spaces/indentation.
Please use space for indentation.
Every file is full of these crazy errors.
How in the world do you get rid of this? I've tried to disable Detect Indentation settings amongst others but nothing seems to work.
The problem was the Prophet Htmlhint setting. Simply uncheck that and this will fix the issue.