Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the project to build successfully #9

Merged
merged 4 commits into from
Dec 1, 2023
Merged

Conversation

gabebw-grammarly
Copy link
Contributor

This is a first commit before other work. It simply makes the package scripts (e.g. yarn build) work again.

This is split into a few commits:

  • Always use this package's tsc, by using yarn tsc instead of just tsc

  • Use Yarn v1.x. I picked this since we should specify a version and because 1.x likely matches the project's most recent configuration, but we can update it later in another PR.

  • Fix build error about ts4.8 by specifying resolutions in package.json. We must resolve @types/node to a specific version because tslint (which is old) brings in a version of @types/node that does not work. We get these errors:

     node_modules/@types/node/ts4.8/test.d.ts:698:76 - error TS1005: ',' expected.
    698         target: F extends abstract new(...args: any) => any ? F : undefined;
                                                                                  ~
    node_modules/@types/node/ts4.8/test.d.ts:702:22 - error TS1005: ',' expected.
    702         this: unknown;
    

    The long-term fix is to migrate from TSLint to ESLint and then use a more recent version of Typescript.

We must resolve `@types/node` to a specific version because tslint
(which is old) brings in a version of `@types/node` that does not work.
We get these errors:

    node_modules/@types/node/ts4.8/test.d.ts:698:76 - error TS1005: ',' expected.

    698         target: F extends abstract new(...args: any) => any ? F : undefined;
                                                                                  ~
    node_modules/@types/node/ts4.8/test.d.ts:702:22 - error TS1005: ',' expected.

    702         this: unknown;

The long-term fix is to migrate from TSLint to ESLint and then use a
more recent version of Typescript.
@gabebw-grammarly gabebw-grammarly merged commit d4e87ee into main Dec 1, 2023
@gabebw-grammarly gabebw-grammarly deleted the fix-build-errors branch December 1, 2023 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants