>>100149458
because most devs don't format their code, they're perfectly happy turning in mutilated code as long as they can finish their ticket. They don't care about quality, readability, etc.
Also linters do more than just stylecheck; they'll catch common type errors or pitfalls that the compiler won't. For example, in typescript:
let x: string | undefined = undefined;
let n: number = Number(x);
console.log(typeof(n), n); // number, NaN
When parsing a string to a number, it is permissible to return NaN, because NaN is of type "number", even though it's literally Not a Number.
A good linter will warn you that you should check the output of this operation or the input of the Number function, but the compiler won't. MSVC has a pretty good C++ linter in some places that will warn you when you fail to check the bounds of an array or pointer or if you're using uninitialized variables or if you can replace C standard library functions with the _s safe versions (e.g: memcpy -> memcpy_s or strtok -> strtok_s)