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 plugin-kit package #99

Merged
merged 7 commits into from
Aug 26, 2024
Merged

feat: Add plugin-kit package #99

merged 7 commits into from
Aug 26, 2024

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Aug 6, 2024

Prerequisites checklist

What is the purpose of this pull request?

Created the new plugin-kit package

What changes did you make? (Give an overview)

  • Created plugin-kit directory
  • Created ConfigCommentParser, VisitNodeStep, and CallMethodStep classes
  • Added tests for each class
  • Updated release-please config
  • Updated release-please CI job
  • Updated issue templates

Related Issues

fixes #97

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

Just starting with the basics for this package. These are some commonalities I've found across the different languages. There will likely be more.

I slightly changed the interface of ConfigCommentParser to be more generic as the one in eslint/eslint was very specific to the way Espree represents comments. I tested this ConfigCommentParser in ESLint directly to ensure the new interface works correctly.

Copy link
Member

@harish-sethuraman harish-sethuraman left a comment

Choose a reason for hiding this comment

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

LGTM. Went through the files related to actions/readme/build. Will wait for others to review files in source and test folders

@aladdin-add aladdin-add self-requested a review August 19, 2024 01:53
Comment on lines +7 to +10
"dist/esm/index.js",
"dist/esm/index.d.ts",
"dist/esm/types.ts",
"dist/esm/types.d.ts",
Copy link
Member

Choose a reason for hiding this comment

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

can be rewritten:

Suggested change
"dist/esm/index.js",
"dist/esm/index.d.ts",
"dist/esm/types.ts",
"dist/esm/types.d.ts",
"dist/esm/"

?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm following the convention we have in the other packages. If we want to change that convention, let's do that for all packages in a separate PR.

packages/plugin-kit/src/types.ts Outdated Show resolved Hide resolved
aladdin-add
aladdin-add previously approved these changes Aug 19, 2024
Copy link
Member

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

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

LGTM. Would like another review before merging.

target: object;
target: unknown;
Copy link
Member

Choose a reason for hiding this comment

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

Why this change, isn't this expected to be an object (AST node)?

Copy link
Member Author

Choose a reason for hiding this comment

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

unknown forces consumers to specify the type of the object before working with it, which ensures that it's properly typed.

object will just cause squiggles every time you access a property or method that isn't on Object.prototype.

packages/plugin-kit/README.md Outdated Show resolved Hide resolved
packages/plugin-kit/README.md Outdated Show resolved Hide resolved
Co-authored-by: Milos Djermanovic <[email protected]>
Co-authored-by: Milos Djermanovic <[email protected]>
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit 09ce430 into main Aug 26, 2024
14 checks passed
@mdjermanovic mdjermanovic deleted the issue97 branch August 26, 2024 17:01
@github-actions github-actions bot mentioned this pull request Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Change Request: New "helper" package for plugins
5 participants