• `no-unsafe-assignment` is one of bindings that get developer need to resolve. For example:
public getConversations = async () => {
const editMode = this.$component.data('editmode') as string;
if (!editMode) {
let noUnsafeAssignment = '';
await $.ajax({
type: 'GET',
url: '<Endpoint>',
data: {
parameter_id: <parameter_value>,
},
success(data) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
noUnsafeAssignment = data;
},
error(err) {
console.log(err);
},
});
}
};
Note: // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment will assist to disable issue involving `no-unsafe-assignment `.
If remove the comment, you need to fix asap with the following here:
public getConversations = async () => {
const editMode = this.$component.data('editmode') as string;
if (!editMode) {
let noUnsafeAssignment: unknown = '';
await $.ajax({
type: 'GET',
url: '<Endpoint>',
data: {
parameter_id: <parameter_value>,
},
success(data) {
noUnsafeAssignment = data;
},
error(err) {
console.log(err);
},
});
}
};