Content-Length: 302536 | pFad | http://github.com/typescript-eslint/typescript-eslint/issues/9582

68 Docs: globalThis without ignores of no-var and no-namespace · Issue #9582 · typescript-eslint/typescript-eslint · GitHub
Skip to content

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

@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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/typescript-eslint/typescript-eslint/issues/9582

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy