feat(linter): improve help message of no-thenable

This commit is contained in:
Boshen 2023-09-29 23:51:41 +13:00
parent 39e4efb2c0
commit 982ae9b930
No known key found for this signature in database
GPG key ID: 234DA6A7079C6801
2 changed files with 180 additions and 180 deletions

View file

@ -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),
}

View file

@ -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