_From @cfrank on May 22, 2017 14:37_
Version 1.13.0-insider
Commit 3bb9b5314ef50bd8225aba0565cadc6ca19bc821
Date 2017-05-18T06:26:49.576Z
Shell 1.6.6
Renderer 56.0.2924.87
Node 7.4.0
Linux

This error appears even after adding the experimentalDecorators flag in .eslintrc
"parserOptions": {
"ecmaVersion": 7,
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"experimentalDecorators": true,
"jsx": true
},
"sourceType": "module"
},
_Copied from original issue: Microsoft/vscode-eslint#244_
The error message comes from the JS support in VS Code (see [js] in the error message). ESlint errors are prefixed with [eslint].
@cfrank Yes this issue is coming from our JS support.
To fix it, please try creating a jsconfig.json file at the root of your project with the contents:
{
"compilerOptions": {
"experimentalDecorators": true
}
}
@mjbvz This solution doesn't work for me. Any thoughts?
@mwarger Are you sure the file is part of your jsconfig or tsconfig. Try running the Go to project configuration command in the file to double check
Just wanted to comment that this solution _did_ work for me. The error went away after adding the file and restarting VS Code.
I have the same problem.
So this is still a problem and the issue should not have been closed. I just today tried switching to VS Code with a project that uses decorators a lot. Adding jsconfig.json did not help, nor did restarting VSC. So my code keeps lighting up in red. For now I'm sticking to Sublime Text.
VSC version: 1.16.0
My jsconfig.json
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true
},
"include": [
"src/**/*"
]
}
@MikeKovarik In a JS file that has this error, try running the JavaScript: Go to project configuration command. Does this open the jsconfig.json file? If not, please open a new issue so that we can investigate this
after created the jsconfig.json dont forget to restart vsc. This should fix ;)
I saw the problem consistently with this combination
"compilerOptions": {
"experimentalDecorators": true,
"target": "es6",
}
The problem was resolved with this combination
"compilerOptions": {
"experimentalDecorators": true,
"target": "es5",
}
still getting the [eslint] Parsing error: Unexpected character '@'
Most helpful comment
@cfrank Yes this issue is coming from our JS support.
To fix it, please try creating a
jsconfig.jsonfile at the root of your project with the contents: