How to get rid of TS problem/error messages in the VS-Code editor? - formatting

The Issue at Hand:
While using VSCode I am being notified twice of problems that occur inside of my documents. I found that other people were have problems that sounded similar, but I couldn't find a Q&A with a solution that helped. The most obvious place to look is in the VSCode settings. I tried several different settings that I read had help others in similar situations, but to no avail. Below is the list of settings I attempted to configure in hopes of finding a solution.
{
"typescript.format.enable": false,
"typescript.validate.enable": false,
"js/ts.implicitProjectConfig.checkJs": false,
"js/ts.implicitProjectConfig.strictFunctionTypes": false,
"js/ts.implicitProjectConfig.experimentalDecorators": false,
"js/ts.implicitProjectConfig.strictNullChecks": false,
}
More Detailed Explanation
Every forum/Q&A I visited, I never found someone who I felt was try to solve exactly the same issue that I am experiencing, I feel this is in part because it doesn't cause any hindrance, only annoyance. Some people probably rely on the problem notifications that I am trying to get rid of.
The issue due to the fact that I use ESLint, and Prettier. I equip ESLint with a plugin that gives the linter the ability to communicate with Prettier, which in turn, allows both Prettier and ESLint to communicate harmoniously to me through VSCode. ESLint & Prettier notify of every problem in my code I need to be aware of, therefore; I don't need to be notified by some other mechanism. The unwanted notifications come with a TS code every time they pop-up, because of this & the fact its VSCode, I am guessing it is a TypeScript/JavaScript formatter that comes with VSCode out-of-the-box, though I am pretty confident that, that is what it is, at this point I don't truly know. It is odd I don't see other people asking about "unwanted TS codes in the VSCode editor".
Demonstration of the Issue:
Below is a screenshot of my VSCode problems panel that demonstrates what is happening. In the screenshot I am intentionally causing an error by typing the Keyword function into the editor, followed by nothing else. You can see that ESLint is working as it should, it notifies me that there is a problem with entering the keyword function without any other code following. You'll notice it says there are 2 problems, though their is clearly only one, and that some mechanism other than my linter, and formatter is notifying me of the same problem. This annoys the hell-O out of me, because I can't trust the badges when they pop-up with a problem count, and I have to look through two sets of error codes to figure out why the editor is complaining.
In Final: Making the Question Being Asked Concise:
What I am asking, or what i would like to know, is this:
"How can I turn off the problem notifications that display the TS codes as shown in the image above. How can I configure VSCode so that only the formatter &/or linter of my choice notifies me of problems, so that I am not being notified of a single problem multiple times, by multiple processes ???"

Set "typescript.validate.enable": false for TS files and "javascript.validate.enable": false for JS files
This disables errors from the built-in JS/TS extension

Related

IntelliJ/PhpStorm - How to use IDE scripting engine as a GitHub Copilot completion capture/fix?

I've been trying to find any type of documentation or examples on how to use the "IDE scripting engine" (or other quick methods of enhancing PhpStorm/IntelliJ IDEs) and found literally nothing that works.
I'm hoping for a bit of a guideline, maybe a snippet that leads in the right direction.
What I want to do:
When pressing Ctrl + Tab (shortcut for GitHub Copilot completion) I want my custom-script to wait for the completion to be inserted into the IDE code.
I want to immediately remove the code again and display it as a completion suggestion (should be quick).
Now I want to press a shortcut to accept the completion word by word until finished.
The possibly biggest problem of Copilot with countless of bug/feedback/feature reports since 2021 is that it inputs tons of code when people just want a tiny part. Like half a line. So users of it are forced to accept 12 lines of bad code, remove all the bad parts.
The reason probably is their marketing, they take those 12 lines (11 of them garbage) as efficiency improvement (12 lines of code accepted). So they don't fix it.
I want to fix it using the above method, the easiest approach would be the most welcome one.
Here is the only available data on the IDE Scripting console:
https://www.jetbrains.com/help/idea/ide-scripting-console.html
However, none of the examples even worked and there are barely any.
Here are the linked examples:
https://gist.github.com/gregsh/b7ef2e4ebbc4c4c11ee9#file-samples-groovy
Nothing of that worked either, various errors usually already in the first "imports" and no examples in "javascript"
Here is the finished code, I switched to Kotlin and from the dysfunctional scripting console to "LivePlugin".
https://github.com/cmp-nct/Stewardess
Stewardess takes over the completions through a new shortcut and plays them in word by word.
Also shows the Copilot internal status as temporary hint notification when it changes.

When I use VS Code write Vue.js, the code color sometimes get chaos

as shown below:
I don't understand why, the syntax and format is correct, it's extremely confusing.
I review my code carefully but can't figure out
this seems to be a bug with VS Code. This could be because VS Code is not updated, or an extension that is not supported anymore.
first, try ctrl + shift + p and running >Developer: Reload Window this should reload your current environment and the error should be fixed.
If that doesn't work, try a different extension. I currently use Vetur, and Prettier.
And don't forget to make sure your VS Code is up to date. go to the bottom left and click the settings cog, then check for update or updates.
My answer is, "Start from scratch, and record your steps." I'm happy to share my notes on what is presently working: https://github.com/TheAutomaTom/VsCodeSettings-Vue3
My personal machine had been in that spot for some weeks, so I took a step back and dump out your cornucopia of extensions and their dependencies.
Only run pertinent language services. This is a tall order given how much a Vue + Typescript + Tailwind on Vite app covers. I am suspicious of generalized HTML/CSS/JS packs though, because they may not be built to parse Vue SFCs. Every new release of a services intended for other frameworks, like Angular or React, are still possible culprits (and moving targets).
I gave up getting Prettier and ESLint on stable ground. For a non-workplace thing, I feel okay about that. You may be having issues with a global package, if you've been experimenting. I've tossed out a couple branches following different tutorials. I intend to revisit this one since it has some example projects: rvest.vs-code-prettier-eslint
I've noticed the Volar team seems to let oddities squeak out a little more frequently than I remember in Vetur.... but we love them just the way they are. Sometimes I downgrade just to check if I've gone crazy, yet.

How to disable autosave feature on IDEA?

env: IDEA-14.0.2, kubuntu14.10 x64
Yesterday I use IDEA to learn source from Spark. When discussing with my partner, I write serval lines directly to the source, then I closed the IDEA without ctrl+S
Today when I open the project I found that those little changes still exist and make the source very dirty (and bit hard to remove them since they are everywhere). I assume that there's a autosave feature the avoid close without saving by incident.
how to close that on certain project? or do it globally?
Currently it can't be disabled. There are a few open issues in the IntelliJ's YouTrack, for instance IDEABKL-6460. There is a long discussion in this issue, but from comments like this:
Auto-saving is built in very deeply and many IDE features just won't
work without it (e.g. compilation, running, etc). For reverting
unwanted changes there's VCS, Local History and Undo.
Currently we don't plan to add a possibility to disable auto-save.
it seems that implementing this feature isn't planned and even if it was it would be probably difficult. But you can leave a comment and vote for the issue because the more people request this feature the more probable it is that it will get actually implemented sometime in the future.

grunt lesslint how to prevent output from being written to console

We are trying to use grunt-lesslint in our project, as our UI developer is comfortable fix errors in less file. grunt-recess seems more powerful but not sure if it can point errors in less file itself. I am unable to comprehend enough from lesslint page, and there do not seem to be many examples. Does anyone know the following:
How to prevent lesslint from displaying on the console. I use formatters and the report file is generated, but it also prints on console, which I do not want to.
How to make lesslint fail only in the case of errors (not warnings). Also csslint seems to report errors also, while lesslint mostly gives warnings only, why is that so? Does lesslint throw errors as well? How to make it fail only in case of errors?
I tried using 'checkstyle-xml' formatter, but it does not seem to use it (I have used in jshint and it gives a properly formatted xml, which it does not give for lesslint).
Is it possible to compile less (many files or directories) in conjunction with lesslint? Any example?
Thanks,
Paddy
I'd say it's more of a common practice to display stdout for this kind of thing; the JSHint plugin does it, as does any other linting plugin that I've used. If you get in another developer that uses Grunt they'll probably expect stdout too. If you really want to override this, use grunt-verbosity: https://npmjs.org/package/grunt-verbosity
Again, this is a convention in Grunt; if a task has any warnings then it fails. The reason being if you lint a file and the linter flags something up it should be dealt with straight away, rather than delay it; six months time you have 500 errors that you haven't fixed and you're less likely to fix them then. Most linting plugins allow you to specify custom options (I've used CSS Lint and that is very customisable), so if you don't like a rule you can always disable it.
This should work. If there's a bug with this feature you should report it on the issue tracker, where it will be noticed by the developers of the plugin. https://github.com/kevinsawicki/grunt-lesslint/issues
Yes. You can set up a custom task that runs both your linter and compile in one step: something like grunt.registerTask('buildless', 'Lint and compile LESS files.', ['lesslint', 'less']); note that you'll have to install https://github.com/gruntjs/grunt-contrib-less to get that to work. Also note that, failing linting will not compile your LESS files; mandate that your code always passes the lint check; you'll help everyone involved in the project.

Why is my vs2012 forcing extra parentheses

First, thank you for taking pity on me and reading this issue. I CANNOT for the life of me figure out what extension I might have installed that is causing this issue, but it is EXTREMELY cumbersome.
Whenever I begin to type code (VB I think it also occurs in C#), for example "For Each" once I hit the F it forces a set of parentheses. Which would look like F(), but because I keep typing it looks like F(or). This only occurs when coding inside code blocks like a function or a sub, but when I'm creating the function it does not occur. I've disabled any and all power tools and the like, or at least I'm 90% sure I've done this for all of them, and yet it still occurs.
I'm usually pretty proficient at digging about the net and finding the answer, but for this one I'm at a loss. There is just too many keywords involved, so all I see is non-related topics, or how to make the parentheses occur, not get rid of them.
If anyone can provide some steps to resolve this, I'm happy and eager to try them. It's just such a hassle to live with for right now.
If you think it is a Visual Studio extension, then start by disabling all of them and adding them back one at a time.
You can also run VS with the command line switched to disable features.
Devenv switches
The simple answer to the cause is the Codealike VS Extension. I logged a bug with them and hopefully they'll fix it soon