Allow running dtslint without header checks
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- tooling
Research direction
Start with the linked @definitelytyped/dtslint migration and the patch in google-api-typings-generator. Trace how dtslint processes package.json headers, then determine where an option or flag can bypass those checks while retaining the remaining linting; done means the external packages run without header errors and existing checks still work.
Written by the indexing model from the issue text.
Description
Hello DT-tools team! I've been using the same approach as DT for lining all auto-generated auto-updated Google Client API types, that are indirectly published to DT by reference.
My goal is to have the same testing and quality standards as DT.
Now original dtslint doesn't work with TS5.0:
The 'unnecessary-bind' rule threw an error in '/home/runner/work/google-api-typings-generator/google-api-typings-generator/types/gapi.client.walletobjects-v1/tests.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
So I'm following DT footsteps and migrating to @definitelytyped/dtslint: https://github.com/Maxim-Mazurok/google-api-typings-generator/pull/974
I do understand that @definitelytyped/dtslint is probably very specific to DT internal tooling, but it would be great to have the ability to use it outside of DT for use-cases such as mine, where types aren't published directly to DT, but still are referenced there and would like to have the highest level of quality.
Most of the header checks are irrelevant or even bad for me. For example, I use special versioning system to be in sync with how Google versions their schema revisions, and it doesn't pass the checks: gapi.client.abusiveexperiencereport-v1's package.json has bad "version": 0.0.20231106 must end with ".9999". Also even more critical one - my packages have to be public as I publish them myself to the public registry as https://www.npmjs.com/package/@maxim_mazurok/gapi.client.sheets-v4 for example, and then they are referenced in https://www.npmjs.com/package/@types/gapi.client.sheets-v4 so that I can push auto-updates hourly without extra maintenance burden for DT maintainers. Yet, I'm getting error parsing headers...
gapi.client.abusiveexperiencereport-v1's package.json has bad "private": must be `"private": true`
For now, I had to add a patch to disable these checks: https://github.com/Maxim-Mazurok/google-api-typings-generator/blob/dtslint-migration/patches/@definitelytyped+dtslint+0.0.197.patch
But it might become a maintenance burden with future updates.
If there was an option or a flag to disable header checks - that would be awesome! I could probably do that similarly to what I've done in the patch, if the flag is passed - assume that package.json is an empty object. If this looks fine - I'm happy to make a PR.
I appreciate your consideration!
- Dominant language
- TypeScript
- Stars
- 422
- Forks
- 238
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 8
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/DefinitelyTyped-tools
-
Difficulty 3/5 1-2 days Newbie friendliness 66/100
microsoft/DefinitelyTyped-tools#1324 · 8 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
microsoft/DefinitelyTyped-tools#1230 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
microsoft/DefinitelyTyped-tools#1229 ·
Maintainers usually reply within 1 day
-
mergebot staleness comments do not respect tooManyOwnersPossibly taken @copilot-swe-agent claimed this 321 days ago. Open
microsoft/DefinitelyTyped-tools#1218 · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
microsoft/DefinitelyTyped-tools#1211 · 1 comment ·
Maintainers usually reply within 1 day
All issues in microsoft/DefinitelyTyped-tools
Similar issues
-
level/task reporter/qa type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
wazuh/wazuh-dashboard-plugins#9310 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cybersemics/treecrdt#267 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
wiz-sec-public/backstage-plugin-wiz#16 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
solana-foundation/solana-com#2245 ·
Maintainers usually reply within 1 day