Remove Missing return type on function warning from esLint for TypeScript

Viewed 189

I am using eslint with TypeScript.

I would like to switch off the check about the explicit return type for functions.

I have added to rules in .eslintrc.js the property "@typescript-eslint/explicit-function-return-type": "off".

Now the same warning is generated by the rule "@typescript-eslint/explicit-module-boundary-types" which I do not want to switch off since I want to check that parameters passed to functions are actually typed.

Is there a way to remove the Missing return type on function warning without switching off also "@typescript-eslint/explicit-module-boundary-types"?

This is my .eslintrc.js

module.exports = {
    parser: '@typescript-eslint/parser',  
    plugins: ["deprecation", '@typescript-eslint'],
    extends: [
        "eslint:recommended",
        "plugin:@typescript-eslint/eslint-recommended",
        "plugin:@typescript-eslint/recommended",
        "prettier",
    ],
    parserOptions: {
        ecmaVersion: 2018,  
        sourceType: 'module',  
    },
    rules: {
        "deprecation/deprecation": "warn",
        "@typescript-eslint/no-use-before-define": "off",
        "@typescript-eslint/no-object-literal-type-assertion": "off",
        "@typescript-eslint/explicit-function-return-type": "off"
    },
};
0 Answers
Related