Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@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

like image 207
FDjawid Avatar asked Oct 28 '25 02:10

FDjawid


1 Answers

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

  • Your project isn't properly including the typescript-eslint rules, per https://typescript-eslint.io/getting-started
  • You're using a very old version of typescript-eslint (the rule was added in November 2019)
like image 74
Josh Avatar answered Oct 30 '25 19:10

Josh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!