how to set up eslint for different eslintrc and tsconfig in typescript
I have following structure and test command for compile eslint. Whenever I run tsc
, it generated all error from file using path alias under test but from editor (webstorm/vscode) path are correct without error. How can I configure so when I run compilt command it can read different tsconfig.json not just from root/tsconfig.json
.
- root
|_tsconfig.json
|_.eslintrc.json
|_test
|_tsconfig.json
|_.eslintrc.json
|_abc
# root/tsconfig.json
{
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"@uc/eslint-config-react",
"prettier",
"prettier/react",
"prettier/@typescript-eslint"
],
"plugins": ["react-hooks", "@typescript-eslint"],
"parser": "@typescript-eslint/parser",
}
# root/test/tsconfig.json
{
"compilerOptions": {
"strict": true,
"target": "es6",
"module": "commonjs",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"types": ["cypress", "chai"],
"baseUrl": ".",
"paths": {
"@abc/*": ["./abc/*"],
}
}
}