简体   繁体   中英

@typescript-eslint/no-unused-expressions' was not found

I want to use Jasmine and i'm in the middle of the tutorial of Jasmine, but they don't mention in the document how to fix the error "Definition for rule '@typescript-eslint/no-unused-expressions' was not found.eslint(@typescript-eslint/no-unused-expressions)"

the error occurs in the file enzyme.ts:

import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";
import jasmineEnzyme from "jasmine-enzyme";

configure({ adapter:  new Adapter() });

// tslint:disable-next-line: only-arrow-functions
beforeEach(function() {
  jasmineEnzyme();
});

this is the link to the tutorial for Jasmine:

https://jasmine.github.io/tutorials/react_with_npm

That typescript-eslint rule does exist per the docs . A couple of possibilities here:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM