Everywhere something expects brackets, and a few other places, I have been finding this error:
Parse error on line 1:
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', "[", got ':(sometimes this : is different here)'
I have to reload my window to fix this every time, and I have no idea where this bug comes from. I've found it everywhere:
/*CSS*/
:root{
~ /* This is where the error appears, where the tilde is.*/
--bg-color:white;
--popup-bg:whitesmoke;
}
//Javascript
const interface = { ...
~ //Right here
It also appears in JSON, only when I edit it though. I first noticed it in my TSConfig.json files, and then it started popping up (almost)every time there's brackets.
Please help!
EDIT: This is my workspace:
build/index.js:
var test = {
error: false,
name: "Someone",
age: 10,
appearance: {
face: "red"
}
};
./index.ts:
var test = {
error:false,
name:"Someone",
age:10,
appearance:{
face:"red"
}
}
./package.json:
{
"name": "apijs",
"version": "1.0.0",
"description": "",
"main": "build/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
./tsconfig.json:
{
"compilerOptions": {
"watch": true,
"outDir": "build/"
}
~
}
~
Steps to reproduce:
tscAfter disabling all extensions the bug seems to have disappeared completely.
I individually tested ESLint and JSON extensions, with no luck. The bug is probably in one of my extensions.
Another edit: After re-enabling my extensions I removed the test typescript code and immediately got 2 errors in the same place at the beginning of my file.