Skip to content

Docs: globalThis without ignores of no-var and no-namespace #9582

Closed
@karlhorky

Description

@karlhorky

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

A typescript-eslint-blessed solution for the problem of declaring globalThis properties without ignores:

declare global {
  var postgresSqlClient: Sql; // 💥 Unexpected var, use let or const instead. eslint (no-var)
}

declare module globalThis option:

declare module globalThis {
  let postgresSqlClient: Sql;
} // 💥 ES2015 module syntax is preferred over namespaces. eslint (@typescript-eslint/no-namespace)

Affected URL(s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updatinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions