Skip to content

typescript-eslint/no-floating-promises - You have used a rule which requires parserServices to be generated #52

Open
@rezelute

Description

The readme says that we can use any rule in @typescript-eslint/eslint-plugin however when I try using no-floating-promises, I keep getting the following error:

Error: Error while loading rule '@typescript-eslint/no-floating-promises': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.

This is what I have in my eslint config file:

extends: ["plugin:vue/vue3-recommended", "eslint:recommended", "@vue/eslint-config-typescript/recommended", "@vue/eslint-config-prettier"],
   parserOptions: {
      ecmaVersion: 2022, // needed to support class static properties
   },

I am using vue3/vite with Typescript.
Any other rule that I have used in the past for example: @typescript-eslint/no-unused-vars or @typescript-eslint/no-explicit-any seems to work fine. Is there something special about typescript-eslint/no-floating-promises ?

Thanks!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions