show plugin working
This commit is contained in:
parent
e686db0571
commit
9720dcb9a2
2 changed files with 26 additions and 1 deletions
24
core/mytestwitheslint.ts
Normal file
24
core/mytestwitheslint.ts
Normal 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() });
|
||||
}
|
||||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue