Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eslint: rxjs/no-unsafe-takeuntil issue

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?

like image 881
Dmytro Khilchuk Avatar asked Sep 06 '25 21:09

Dmytro Khilchuk


1 Answers

Had the same issue, was due to it not correctly getting the tsconfig.json. Would suggest checking it is in the right location.

like image 71
Catherine Clague Avatar answered Sep 10 '25 00:09

Catherine Clague