我想使用Jasmine,我在Jasmine教程的中间,但是他们没有在文档中提及如何解决错误“规则'@ typescript-eslint / no-unused-expressions的定义”找不到。eslint(@ typescript-eslint / no-unused-expressions)“
错误在文件酶.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();
});
这是Jasmine教程的链接:
该打字稿保留规则does exist per the docs。这里有两种可能: