show plugin working

This commit is contained in:
uinstinct 2025-06-13 22:38:04 +05:30
parent e686db0571
commit 9720dcb9a2
2 changed files with 26 additions and 1 deletions

24
core/mytestwitheslint.ts Normal file
View file

@ -0,0 +1,24 @@
async function testPromise() {
return new Promise((resolve) =>
setTimeout(() => {
console.log("done");
resolve("done");
}, 1),
);
}
async function check() {
const t = testPromise();
if (!!t) {
console.log("there should be an error");
}
const tt = (val = "str") => t;
await new Promise<void>(async (resolve) => {
await tt();
resolve();
});
console.log({ foo: 42, ...tt() });
}

View file

@ -6,6 +6,7 @@
"extends": ["../../.eslintrc.shared.json"],
"rules": {
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-floating-promises": "warn"
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-misused-promises": "warn"
}
}