Skip to content

Allow dprint.json in definition-parser #698

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

DefinitelyTyped/DefinitelyTyped#66235 shows onboarding DefinitelyTyped to dprint, per DefinitelyTyped/DefinitelyTyped#65993. But rule tests are blocked on unused file detection failure:

dtslint-runner@0.0.163
Node version:  v16.20.1
Using local DefinitelyTyped at .
Parsing definitions...
Found 8651 packages.
Parsing in 2 child process(es)...
Error: Unused file /home/runner/work/DefinitelyTyped/DefinitelyTyped/types/anime-quotes-api/dprint.json (used files: ["index.d.ts","anime-quotes-api-tests.ts","tsconfig.json","tslint.json"])
    at checkAllUsedRecur (/home/runner/work/DefinitelyTyped/DefinitelyTyped/node_modules/@definitelytyped/definitions-parser/src/lib/definition-parser.ts:7[9](https://github.com/DefinitelyTyped/DefinitelyTyped/actions/runs/5719461527/job/15497401718?pr=66235#step:6:10)8:[15](https://github.com/DefinitelyTyped/DefinitelyTyped/actions/runs/5719461527/job/15497401718?pr=66235#step:6:16))

For now we can work around this by just not having dprint.jsons in packages. The PR already uses dprint's root-level "excludes" to exclude the auto-generated types/vscode. But if we do end up wanting nested dprint.jsons, we'd have to make a change here to allow them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions