I have googled forever, please how do I let eslint know should is being used.
let should = require("chai").should();
it.("xxxx", function () {
xxx.should.have.ownProperty("Comments");
});
Eslint says: 'should' is assigned a value but never used no-unused-vars
Hey @jomadoye thanks for the issue.
eslint is behaving correctly here: you don't need the let should = part! The reason is that chai.should() adds itself to the object prototype, so xxx.should is a property on xxx, _not_ a variable. You'll only need let should = ... if you're going to use the should.exist() assertion.
I'm going to close this issue - because its not a bug within our code. However if you do run into any more issues that you feel could be bugs, please don't hesitate to open a new issue. I wish you the best of luck with your work :smile:.
Most helpful comment
Hey @jomadoye thanks for the issue.
eslint is behaving correctly here: you don't need the
let should =part! The reason is thatchai.should()adds itself to the object prototype, soxxx.shouldis a property onxxx, _not_ a variable. You'll only needlet should = ...if you're going to use theshould.exist()assertion.I'm going to close this issue - because its not a bug within our code. However if you do run into any more issues that you feel could be bugs, please don't hesitate to open a new issue. I wish you the best of luck with your work :smile:.