ESLint: ignore warning rules

1k Views Asked by At

The typescript files are filled with warning symbols and I am trying to ignore the following rules inside the .eslintrc.json file:

  1. I want to allow the any type
  2. I want to ignore setting void behind functions that are not returning anything.

These are the corresponding warnings:

  1. Argument 'myArgument' should be typed.eslint@typescript-eslint/explicit-module- boundary-types
  2. Missing return type on function.eslint@typescript-eslint/explicit-module-boundary-types

Is there a way to ignore these rules and make the warning disappear?

1

There are 1 best solutions below

1
On

For any, you can use "no-explicit-any":false

For void, you can use "no-void": false

For your other warnings, the eslint rule is explicit-module-boundary-types

You probably need

 "@typescript-eslint/explicit-module-boundary-types": "off"

see

Stop typescript-eslint/explicit-module-boundary-types to be applied on vue component not using Typescript