Everytime I open my project folder in Visual Studio Code, I get an error on the first line of each file. It cannot find my tsconfig.json
file because it is looking in the directory I opened VS Code, not where my eslint.json
is. I have a functions
folder in my root project where the ESLint config is.
Here is part of it:
"parserOptions": {
"ecmaVersion": 2019,
"project": ["./tsconfig.json", "./tsconfig.dev.json"],
"sourceType": "module"
},
When I run my lint command eslint "src/*.{ts,js}"
, it works perfectly and shows the correct warnings. This means that the VS Code plugin dbaeumer.vscode-eslint
parses the .eslintrc.json
config differently than what it should.
If I change the project
to ["./functions/tsconfig.json", "./functions/tsconfig.dev.json"]
, then VS Code stops giving the error, but when I run ESLint, it tries to find it in <path/to/project>/functions/functions/tsconfig.json
going in the functions directory twice.
Is this a VS Code bug, a dbaeumer.vscode-eslint
bug, or am I doing something wrong? What can I do to fix the error?