How to use ESLint with Jest

后端 未结 9 1708
滥情空心
滥情空心 2020-12-07 11:56

I\'m attempting to use the ESLint linter with the Jest testing framework.

Jest tests run with some globals like jest, which I\'ll need to tell the lin

9条回答
  •  天命终不由人
    2020-12-07 12:38

    I solved the problem REF

    Run

    # For Yarn
    yarn add eslint-plugin-jest -D
    
    # For NPM
    npm i eslint-plugin-jest -D
    

    And then add in your .eslintrc file

    {
        "extends": ["airbnb","plugin:jest/recommended"],
    }
    

提交回复
热议问题