Answer the question
In order to leave comments, you need to log in
Eslint and editing code on demand?
there, of course, further in the code, for example, there is a lot of this) but in the question I
will take only a few examples as a basis and at the same time, for example, it was not necessary to solve the problem as in addCity - I just added the output to the console using this - so that I wouldn’t swear)
And also when creating files, line Sequence - CLF and you need LF (if lint swears) - manually change in the corner but where is it configure that even when saving the file, the rule does not match.
+ Clicking on this problem and choosing a fix for this problem - or fixing all similar ones - does not work.
Expected to return a value at the end of arrow function.
Expected 'this' to be used by class method 'findCity'.
async addCity(name, code) {
const city = new CityScheme({ name, code });
await city.save((err) => {
if (err) throw err;
console.log(`city successfully saved. name - ${this.getNameCity()}`);
});
}
findCity(id) {
return new Promise((resolve, reject) => {
cityScheme.find({
_id: id,
})
.exec((err, ff) => {
if (err) {
return reject(err);
}
resolve(ff);
});
});
}
Expected 'this' to be used by class method 'checkUserCity'.
checkUserCity(user) {
if (user === false || user[0].city === null || user === true) {
return true;
}
return false;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question