I am trying to add a rule to my Angular project: rxjs/no-unsafe-takeuntil
My tsconfig.json:
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"module": "es2020",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"allowJs": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"es2016",
"es2015",
"dom"
]
},
"include": [
"src/**/*.d.ts"
],
"exclude": [
"node_modules"
]
}
My eslintrc.js:
const { join } = require("path");
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2019,
project: join(__dirname, "./tsconfig.json"),
sourceType: "module"
},
plugins: ["rxjs"],
extends: [],
rules: {
"rxjs/no-unsafe-takeuntil": "error"
}
};
I have .eslintrc.json apart from it.
I get Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser. for list of files.
How to fix it?
Had the same issue, was due to it not correctly getting the tsconfig.json. Would suggest checking it is in the right location.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With