My directory structure looks like this:
-projects
--MyProject
---MyDir
tsconfig.json
eslinttrc.json
Inside my eslinttrc.json file, I have the following configuration:
"parserOptions": {
"ecmaVersion": "latest",
"project": ["tsconfig.json"],
"sourceType": "module"
}
Even though there is a tsconfig.json in the same directory, ESLint is giving me an error saying "cannot read project\tsconfig.json" because it is searching from the wrong root directory 'projects' instead of 'MyDir'. To resolve this, I need to update the parseOption path to './MyDir/tsconfig.json' rather than just 'tsconfig.json'.