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

Setup tseslint and prettier for the src #87

Closed
wants to merge 3 commits into from

Conversation

milhauzindahauz
Copy link

I think this is necessary change to any further cooperation. Setup prettier and linter on living project is always pain. Some of files have not been formatted (ever?). It's seems to me this repo was based on some boilerplate and those parts never worked. I migrated eslint config to "flat config" and updated necessary packages to latest supported versions.

@domferr
Copy link
Owner

domferr commented Jul 10, 2024

Hey, thank you for opening this pull request. The extension must support GNOME shell versions <= 44: unfortunately, for them the code to import dependencies is not the same and I must create two different extensions. Instead of writing the things twice, or having different branches on git, I preferred to write the code once and then use esbuild to build the main extension (GNOME shell version >= 45), and then parse the whole source code and generate a version suitable for older shells. That is working but not easy at all to do.

For multiple reasons, when I started Tiling Shell it was safer (and easier) to avoid using prettier and eslint.

The good news is that I was already working on it and I finally got it working with the "build workflow". The changes are inside the next update branch (v12). Check it out! I will look into what you did, it seems very good!

@milhauzindahauz
Copy link
Author

I am see what are you doing in the esbuild.mjs. Why prettier should brake this build pipeline? The difference is quote style and white spaces and we can solve it by those regex expressions. Wouldn't be easier to run it on same set of rules across source code?

I suggest to merge this to v12 branch. Feel free to change the target.

@domferr
Copy link
Owner

domferr commented Jul 10, 2024

Prettier changes quotes, then esbuild changes them again...it is a mess ahahah Oh, also newlines added by prettier break it too. At that time I just preferred to work on new features instead.

Finally, I ended up having a working solution lately!

BTW the branch v12 was not updated with changes I was working on yesterday. I did a commit, check it out! What is really important to me is to use gnome-shell suggested eslint configuration. It is here, while leleat did a great job here as well.

@domferr
Copy link
Owner

domferr commented Jul 22, 2024

Hey, just a quick update. I merged the changes I made to support eslint, the gnome-shell suggested eslint configuration and prettier. Feel free to open a new issue if you have ideas related to extending eslint and prettier support

@domferr domferr closed this Jul 22, 2024
@milhauzindahauz
Copy link
Author

Well done @domferr. This helps to be able to work on #81. I will transfer my changes to new main branch (V12).

Cheers.

@milhauzindahauz milhauzindahauz deleted the linter_formater branch July 23, 2024 08:31
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