fix: update error handling in JSON parsing and add ESLint rule for unused variables
This commit is contained in:
parent
cb8c45456b
commit
6f727b6662
2 changed files with 5 additions and 1 deletions
|
|
@ -23,6 +23,10 @@ export default tseslint.config(
|
||||||
"warn",
|
"warn",
|
||||||
{ allowConstantExport: true },
|
{ allowConstantExport: true },
|
||||||
],
|
],
|
||||||
|
"@typescript-eslint/no-unused-vars": [
|
||||||
|
"error",
|
||||||
|
{ argsIgnorePattern: "^_" },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ const CustomHeaders = ({
|
||||||
onChange(newHeaders);
|
onChange(newHeaders);
|
||||||
setJsonError(null);
|
setJsonError(null);
|
||||||
setIsJsonMode(false);
|
setIsJsonMode(false);
|
||||||
} catch (error) {
|
} catch {
|
||||||
setJsonError("Invalid JSON format");
|
setJsonError("Invalid JSON format");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue