mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Disallow unused expressions
This commit is contained in:
parent
580bd73348
commit
eaa0930617
@ -8,6 +8,7 @@ module.exports = {
|
||||
tsconfigRootDir: process.cwd(),
|
||||
},
|
||||
rules: {
|
||||
"no-unused-expressions": ["error", { enforceForJSX: true }],
|
||||
"no-trailing-spaces": "warn",
|
||||
"key-spacing": "error",
|
||||
"indent": ["error", 2, {
|
||||
|
||||
@ -236,7 +236,11 @@ export function rateLimited<T>(
|
||||
);
|
||||
|
||||
for (const nextFunc of nextFuncs) {
|
||||
value.status === "ok" ? nextFunc[0](value.data) : nextFunc[1](value.error);
|
||||
if (value.status === "ok") {
|
||||
nextFunc[0](value.data);
|
||||
} else {
|
||||
nextFunc[1](value.error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user