Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Repo: Standardize debug namespaces per-file #5872

Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issuelocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.repo maintenancethings to do with maintenance of the repo, and not with code/docs
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Suggestion

Splitting out of#5834 (comment):

in an ideal world we'd actually do a unique substring per file to help differentiate where logs are coming from.

egtypescript-eslint:typescript-estree:inferSingleRun,typescript-eslint:typescript-estree:create-program:useProvidedPrograms, etc

this also allows you to easily filter the log lines to specific usecases with env vars likeDEBUG=typescript-eslint:typescript-estree:create-program:*

also helpful becausedebug also colours each string differently IIRC so it's easy to see different sources when parsing logs.

I wonder if we can automate creation of the string via like

constPACKAGE_ROOT="resolve from disk somehow";functiongetLogger(filename:string){constrelative=path.relative(PACKAGE_ROOT,filename);constparsed=path.parse(relative);returndebug(`typescript-eslint:${parsed.dir.replace(/\//g,':')}:${parsed.name}`);}// then call this viaconstlog=getLogger(__filename);

It'd be nifty if we could use a lint rule that enforces such a thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuelocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.repo maintenancethings to do with maintenance of the repo, and not with code/docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp