From 982ae9b930ce38c71cc6babacae72ee4ee5fc5ec Mon Sep 17 00:00:00 2001 From: Boshen Date: Fri, 29 Sep 2023 23:51:41 +1300 Subject: [PATCH] feat(linter): improve help message of no-thenable --- .../src/rules/unicorn/no_thenable.rs | 12 +- .../oxc_linter/src/snapshots/no_thenable.snap | 348 +++++++++--------- 2 files changed, 180 insertions(+), 180 deletions(-) diff --git a/crates/oxc_linter/src/rules/unicorn/no_thenable.rs b/crates/oxc_linter/src/rules/unicorn/no_thenable.rs index 11d43faa5..3d270a57a 100644 --- a/crates/oxc_linter/src/rules/unicorn/no_thenable.rs +++ b/crates/oxc_linter/src/rules/unicorn/no_thenable.rs @@ -18,14 +18,14 @@ use crate::{context::LintContext, rule::Rule, AstNode}; #[derive(Debug, Error, Diagnostic)] enum NoThenableDiagnostic { - #[error("Do not add `then` to an object.")] - #[diagnostic(severity(warning), help("consider to remove `then`"))] + #[error("eslint-plugin-unicorn(no-thenable): Do not add `then` to an object.")] + #[diagnostic(severity(warning), help("If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems"))] Object(#[label] Span), - #[error("Do not export `then`.")] - #[diagnostic(severity(warning), help("consider to remove `then`"))] + #[error("eslint-plugin-unicorn(no-thenable): Do not export `then`.")] + #[diagnostic(severity(warning), help("If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems"))] Export(#[label] Span), - #[error("Do not add `then` to a class.")] - #[diagnostic(severity(warning), help("consider to remove `then`"))] + #[error("eslint-plugin-unicorn(no-thenable): Do not add `then` to a class.")] + #[diagnostic(severity(warning), help("If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems"))] Class(#[label] Span), } diff --git a/crates/oxc_linter/src/snapshots/no_thenable.snap b/crates/oxc_linter/src/snapshots/no_thenable.snap index 7afe6e7fa..25192f12d 100644 --- a/crates/oxc_linter/src/snapshots/no_thenable.snap +++ b/crates/oxc_linter/src/snapshots/no_thenable.snap @@ -2,613 +2,613 @@ source: crates/oxc_linter/src/tester.rs expression: no_thenable --- - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const foo = {then: 1} · ─────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const foo = {["then"]: 1} · ─────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const foo = {[`then`]: 1} · ─────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";const foo = {[THEN]: 1} · ───────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const foo = {then() {}} · ───────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const foo = {["then"]() {}} · ───────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const foo = {[`then`]() {}} · ───────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";const foo = {[THEN]() {}} · ─────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const foo = {get then() {}} · ───────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const foo = {get ["then"]() {}} · ───────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const foo = {get [`then`]() {}} · ───────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";const foo = {get [THEN]() {}} · ─────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {then} · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ const Foo = class {then} · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {["then"]} · ──────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {[`then`]} · ──────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";class Foo {[THEN]} · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {then() {}} · ───────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {["then"]() {}} · ───────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {[`then`]() {}} · ───────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";class Foo {[THEN]() {}} · ─────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {static then} · ─────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {static ["then"]} · ─────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {static [`then`]} · ─────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";class Foo {static [THEN]} · ───────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {static then() {}} · ──────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {static ["then"]() {}} · ──────────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {static [`then`]() {}} · ──────────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";class Foo {static [THEN]() {}} · ────────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {get then() {}} · ───────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {get ["then"]() {}} · ───────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {get [`then`]() {}} · ───────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";class Foo {get [THEN]() {}} · ─────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {set then(v) {}} · ────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {set ["then"](v) {}} · ────────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {set [`then`](v) {}} · ────────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";class Foo {set [THEN](v) {}} · ──────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {static get then() {}} · ──────────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {static get ["then"]() {}} · ──────────────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ class Foo {static get [`then`]() {}} · ──────────────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";class Foo {static get [THEN]() {}} · ────────────────────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ foo.then = 1 · ──────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ foo["then"] = 1 · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ foo[`then`] = 1 · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";foo[THEN] = 1 · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ foo.then += 1 · ──────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ foo.then ||= 1 · ──────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to a class. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to a class. ╭─[no_thenable.tsx:1:1] 1 │ foo.then ??= 1 · ──────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ Object.defineProperty(foo, "then", 1) · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ Object.defineProperty(foo, `then`, 1) · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";Object.defineProperty(foo, THEN, 1) · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ Reflect.defineProperty(foo, "then", 1) · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ Reflect.defineProperty(foo, `then`, 1) · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";Reflect.defineProperty(foo, THEN, 1) · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ Object.fromEntries([["then", 1]]) · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ Object.fromEntries([["then"]]) · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ Object.fromEntries([[`then`, 1]]) · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ const THEN = "then";Object.fromEntries([[THEN, 1]]) · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not add `then` to an object. + ⚠ eslint-plugin-unicorn(no-thenable): Do not add `then` to an object. ╭─[no_thenable.tsx:1:1] 1 │ Object.fromEntries([foo, ["then", 1]]) · ────── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ const then = 1; export {then} · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ const notThen = 1; export {notThen as then} · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export {then} from "foo" · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export function then() {} · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export async function then() {} · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export function * then() {} · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export async function * then() {} · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export class then {} · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export const then = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export let then = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export var then = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export const [then] = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export let [then] = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export var [then] = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export const [, then] = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export let [, then] = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export var [, then] = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export const [, ...then] = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export let [, ...then] = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export var [, ...then] = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export const {then} = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export let {then} = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export var {then} = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export const {foo, ...then} = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export let {foo, ...then} = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export var {foo, ...then} = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export const {foo: {bar: [{baz: then}]}} = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems - ⚠ Do not export `then`. + ⚠ eslint-plugin-unicorn(no-thenable): Do not export `then`. ╭─[no_thenable.tsx:1:1] 1 │ export const notThen = 1, then = 1 · ──── ╰──── - help: consider to remove `then` + help: If an object is defined as 'thenable', once it's accidentally used in an await expression, it may cause problems