I’m trying to figure out the editor and having issues with error highlighting.
There are certain “errors” that are not actually errors, the code does work.
But the highlights in the editor make the code hard if not impossible to read.
Example, I have dozens of these:
JSX element implicitly has type ‘any’ because no interface ‘JSX.IntrinsicElements’ exists.
And corresponding lines are highlighted.
It is not a problem, there is no reason to spend time fixing these.
How does one just remove the highlight and ignore this?
I have found this advice:
If you do not want problems to be highlighted in the code, you can disable the AI Linter feature in Cursor. To do this, go to the “More” tab next to the chat, enable the AI Linter, and then disable it. This will prevent Cursor from highlighting any issues in your code.
But there is no “AI Linter” in the actual interface.
How does one address this?
Yes, that’s a Typescript error.
And in some other language there would be an error in some other language.
I do not need help with fixing a specific Typescript error or errors in any other languages. I deliberately choose not to fix this error and dozens of other errors. I do not consider them to be errors in the specific case of the code we have here.
I have a Cursor specific question about how do I stop Cursor from highlighting specific errors. Might be specific errors that would not be fixed. If that is not possible - all errors whatsoever.
I hope the above makes my question a bit more clear.
You can ignore a Typescript error by putting a
// @ts-ignore comment above the line you want to ignore.
This does not sound practical. It only covers one line or one block of text.
There are hundreds if not thousands of such lines.
The question is still: how to stop the editor from highlighting errors, not how to modify the code.
I understand that highlighting or not highlighting specific errors one by one might not be possible.
But there definitely should be the way to disable all highlighting altogether.
At least it is mentioned in the documentation I am quoting. If that specific way has been removed from the editor, there should be some replacement, right?
The AI Linter was a Cursor feature that highlighted potential issues in your code that normal linters couldn’t detect. But the AI Linter doesn’t exist in Cursor anymore. Your error is from TypeScript and not from Cursor.
If there is no AI Linter there is still some part of Cursor that does the highlighting.
How does one disable it?
If this has something to do with TypeScript and can not be modified for TypeScript code - then how do I instruct Cursor that this is not TypeScript code at all and thus should be ignored?