Closed
Description
Repro
<script lang="ts">
// ...
import { AxiosError } from "axios";
// ...
const response = await this.$http
.post<JwtToken>(
"authentication_token",
{
email: this.username,
password: this.password
},
{
headers: {
authorization: ""
}
}
)
.catch((error: AxiosError) => { // <-- this line right here
if (error?.response?.status == 401) {
throw "Login Failed";
}
throw error?.message;
});
// ...
Expected Result
Should pass es-lint fine
Actual Result
It sometimes passes es-lint, appears to do it on first pass, but fails on subsequent passes when running npm run serve
.
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
2.18.0 |
@typescript-eslint/parser |
2.18.0 |
TypeScript |
3.7.5 |
ESLint |
6.8.0 |
node |
12.14.1 |
npm |
6.13.6 |