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

parse typeid #17067

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

parse typeid #17067

wants to merge 8 commits into from

Conversation

iloveitaly
Copy link
Contributor

@iloveitaly iloveitaly commented Feb 14, 2025

Description

Add typeid parsing support.

Screencast

CleanShot 2025-02-14 at 14 42 08

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: uuid-generator Issues related to the uuid-generator extension labels Feb 14, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented Feb 14, 2025

Thank you for your contribution! 🎉

🔔 @jmaeso @GastroGeek @pernielsentikaer @LunaticMuch @hmarr @harsh-devx @lukas-runge you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

You can expect an initial review within five business days.

Comment on lines +183 to +191
"@eslint/compat": "^1.2.6",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.20.0",
"@raycast/eslint-config": "^1.0.11",
"@types/node": "^22.13.4",
"@types/uuid": "^10.0.0",
"eslint": "^8.45.0",
"eslint-plugin-import": "^2.27.5",
"react-devtools": "^4.28.0",
"typescript": "^5.1.6"
"@typescript-eslint/eslint-plugin": "^8.24.0",
"eslint": "^9.20.1",
"eslint-plugin-import": "^2.31.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just trying to keep packages up to date to avoid weird old compatibility issues

Copy link
Contributor

@LitoMore LitoMore Feb 25, 2025

Choose a reason for hiding this comment

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

AFAIK, @raycast/api does not support ESLint 9 yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, interesting, that's why this was harder than I expected :)

@pernielsentikaer pernielsentikaer self-assigned this Feb 24, 2025
Copy link
Collaborator

@pernielsentikaer pernielsentikaer left a comment

Choose a reason for hiding this comment

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

Why did we remove .eslintrc.json? I should probably still exists with

{
  "root": true,
  "extends": ["@raycast"]
}

@@ -0,0 +1,43 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this file at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so? Didn't try to remove it, but this definitely the way configuration is done in the latest ESLint version.

Copy link
Contributor

@LitoMore LitoMore Feb 25, 2025

Choose a reason for hiding this comment

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

We don't need this. You can refer to other extensions' configurations since you changed ESLint back to version 8.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds TypeID parsing functionality to the UUID Generator extension, allowing users to decode TypeIDs back into UUIDs with copy/paste support.

  • New parseTypeID.ts could use showFailureToast from @raycast/utils instead of manual showToast with failure style
  • launchCommand in parseTypeID.ts should be wrapped in try/catch block for better error handling
  • Consider adding subtitle "UUID Generator" to commands in package.json since there are multiple commands
  • Ensure metadata folder exists with screenshots since this extension has view commands
  • Changelog entry uses {PR_MERGE_DATE} correctly for automatic date replacement

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

6 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +24 to +33
rules: {
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
},
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Indentation is inconsistent in the rules section (extra spaces before @typescript-eslint/no-unused-vars and misaligned closing bracket)

Copy link
Contributor

Choose a reason for hiding this comment

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

It's better not to bring some of your preferred rules to this project. Keeping all extension code styles consistent is good for the community.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree, we should use the default esline config only:

{
  "printWidth": 120,
  "singleQuote": false
}

Comment on lines +127 to +129
"name": "parseTypeID",
"title": "Parse TypeIDs",
"description": "Parse TypeID and copy resulting UUID to the clipboard",
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider adding a subtitle 'UUID Generator' to maintain consistency with other commands in the extension

@@ -1,5 +1,6 @@
{
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^8.24.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider pinning exact version instead of using ^ to ensure consistent builds

Copy link
Contributor

@LitoMore LitoMore Feb 25, 2025

Choose a reason for hiding this comment

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

You could ignore this one. Just remove this plugin and use Raycast's default configuration about ESLint.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree 🙂

@iloveitaly
Copy link
Contributor Author

I don't have much more time to put into this. I was more ambitious than I should have been with the eslint upgrades and such, but we can ignore that and fix it up later, it would be great to get this merged. I don't have the time to fix that up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension fix / improvement Label for PRs with extension's fix improvements extension: uuid-generator Issues related to the uuid-generator extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants