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

feat: add CommonJS core types #102

Merged
merged 2 commits into from
Aug 12, 2024
Merged

feat: add CommonJS core types #102

merged 2 commits into from
Aug 12, 2024

Conversation

fasttime
Copy link
Member

@fasttime fasttime commented Aug 9, 2024

Prerequisites checklist

What is the purpose of this pull request?

Add CommonJS types to @eslint/core.

What changes did you make? (Give an overview)

I've added a build step that copies the generated esm/types.d.ts file to cjs/types.d.cts in the dist directory. Updated settings so that both dist files will be published to npm and JSR instead of the source file. This follows the pattern we are using in other packages in this repo.

I've verified that the new .cts module can be imported in @types/eslint when @eslint/core is added as a dependency.

Related Issues

fixes #95

Is there anything you'd like reviewers to focus on?

Comment on lines -13 to -15
"directories": {
"test": "tests"
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no "tests" directory in this package. We will want to add it at some point.

Comment on lines -35 to 39
"@types/eslint": "^9.6.0",
"eslint": "^9.0.0",
"mocha": "^10.4.0",
"typescript": "^5.4.5"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like only the typescript dependency is used during the build (to run the tsc command). eslint is only used when linting from the root of the monorepo, where it is already included in the devDependencies.

@fasttime fasttime marked this pull request as ready for review August 9, 2024 16:21
nzakas
nzakas previously approved these changes Aug 12, 2024
packages/core/jsr.json Outdated Show resolved Hide resolved
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@nzakas nzakas merged commit 6caa5e1 into main Aug 12, 2024
14 checks passed
@nzakas nzakas deleted the issue-95 branch August 12, 2024 14:48
@github-actions github-actions bot mentioned this pull request Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Change Request: CommonJS types for @eslint/core
2 participants