Lost validation and autocomplete when upgrading to February release

Something seems to be wrong with my installation (osx 10.11.3), but I can’t determine why, and I'm not sure how it worked until the February release of the vs code.

For instance:

var express = require('express'), 
    app = express();
app.post('/upload', function (req, res) {
//Some code
}

If I replace app.post with app.FOO, it will not signal an error and that foo is unknown. Also I do not get auto completion for "post" after application. In addition, I do not get a light bulb that allows loading definitions from typescript in order to get automatic completion. What can cause this problem?

(this is for Vs CODE, not standard vs)

Edit: also noticed: when in a js file, when I change the file type to say CSS, it will display all errors, of course, because it is not a CSS file. When I get the file type back in js .... will it still show CSS errors ?? ?? !! I think this is a bug in the latest update. See Attached Image.

enter image description here


Edit: I manually added the jsonfing.json file to the project root with:

{
    "compilerOptions": {
        "target": "ES6"
    }
}

and I added the "typings" folder in the root of the project, with node, pg and expressing typing files.

+4
source share
2 answers

I had a similar problem: the vscode team removed the quick fix for the type definitions in the release. We must add d.ts using the plugin below.

https://github.com/typings/typings

, , , jsconfig.json.

https://code.visualstudio.com/docs/languages/javascript#_javascript-projects-jsconfigjson

[: ]

vs d.ts, typings

, Github

https://github.com/Microsoft/vscode/issues/3867

,

+3

, , , jsconfig.json . jsconfig.json

{
  "compilerOptions": {
    "target": "ES5",
    "module": "commonjs"
  },

  "exclude": [
    "node_modules"
  ]
}

" Javascript".

https://github.com/Microsoft/vscode/issues/3901 https://github.com/Microsoft/vscode/issues/3791

+2

All Articles