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: lint direct require quo component outside src/quo #17828

Merged
merged 3 commits into from
Nov 7, 2023

Conversation

yqrashawn
Copy link
Contributor

@yqrashawn yqrashawn commented Nov 6, 2023

Summary

  1. add script in make lint to lint against require quo component outside src/quo
  2. quo2 -> quo in docs
  3. ignore /app folder for prettier

error looks like
CleanShot 2023-11-06 at 19 50 30

Testing notes

dev exp only PR

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented Nov 6, 2023

Jenkins Builds

Click to see older builds (19)
Commit #️⃣ Finished (UTC) Duration Platform Result
52eed53 #1 2023-11-06 11:33:37 ~44 sec android-e2e 📄log
52eed53 #1 2023-11-06 11:33:39 ~46 sec ios 📄log
52eed53 #1 2023-11-06 11:33:50 ~57 sec android 📄log
52eed53 #1 2023-11-06 11:35:15 ~2 min tests 📄log
e43d361 #2 2023-11-06 11:43:43 ~21 sec ios 📄log
e43d361 #2 2023-11-06 11:43:47 ~29 sec android-e2e 📄log
661ae5d #3 2023-11-06 11:44:24 ~21 sec ios 📄log
661ae5d #3 2023-11-06 11:44:42 ~39 sec android-e2e 📄log
661ae5d #3 2023-11-06 11:44:52 ~49 sec android 📄log
661ae5d #3 2023-11-06 11:46:03 ~2 min tests 📄log
fb371ee #4 2023-11-06 11:46:49 ~22 sec ios 📄log
fb371ee #4 2023-11-06 11:47:06 ~43 sec android-e2e 📄log
fb371ee #4 2023-11-06 11:47:26 ~59 sec android 📄log
fb371ee #4 2023-11-06 11:48:05 ~1 min tests 📄log
6b40c8e #6 2023-11-06 11:55:22 ~2 min tests 📄log
✔️ f5151b2 #7 2023-11-06 12:07:01 ~9 min android 🤖apk 📲
✔️ f5151b2 #7 2023-11-06 12:07:18 ~9 min android-e2e 🤖apk 📲
✔️ f5151b2 #7 2023-11-06 12:07:46 ~10 min ios 📱ipa 📲
✔️ f5151b2 #7 2023-11-06 12:07:57 ~10 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ f1fa87e #8 2023-11-06 14:58:54 ~5 min ios 📱ipa 📲
✔️ f1fa87e #8 2023-11-06 15:00:27 ~6 min android-e2e 🤖apk 📲
✔️ f1fa87e #8 2023-11-06 15:01:34 ~8 min android 🤖apk 📲
✔️ f1fa87e #8 2023-11-06 15:03:08 ~9 min tests 📄log
✔️ 544bdc5 #9 2023-11-07 01:04:54 ~5 min android 🤖apk 📲
✔️ 544bdc5 #9 2023-11-07 01:07:12 ~8 min android-e2e 🤖apk 📲
✔️ 544bdc5 #9 2023-11-07 01:09:01 ~9 min tests 📄log
✔️ 544bdc5 #9 2023-11-07 01:11:31 ~12 min ios 📱ipa 📲

@yqrashawn yqrashawn force-pushed the feat/lint-quo-component-outside-quo branch 5 times, most recently from 5a06921 to 6b40c8e Compare November 6, 2023 11:52
@@ -21,7 +21,7 @@ let
buildInputs = with pkgs; [
clojure flock maven openjdk
# lint specific utilities
clj-kondo zprint clojure-lsp
clj-kondo zprint clojure-lsp ripgrep
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @jakubgs, is it ok to put this here? Or into the default shell.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that's correct.

@yqrashawn yqrashawn mentioned this pull request Nov 6, 2023
8 tasks
@yqrashawn yqrashawn force-pushed the feat/lint-quo-component-outside-quo branch from 6b40c8e to f5151b2 Compare November 6, 2023 11:57
Copy link
Contributor

@J-Son89 J-Son89 left a comment

Choose a reason for hiding this comment

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

good stuff @yqrashawn! 💪

# quo components namespace ends with style|utils|types|reaction-resource
# are not the component view, they are usually utils fns or styles

if rg --pcre2 --glob '!src/quo/**/*' 'quo\.components(\.[\w-]+)*\.[\w-]*(?<!style|utils|types|reaction-resource)(\s|\]|\n)' src; then
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure of these other file types, but if someone uses a quo component's style.cljs file outside of the quo namespace that should be a big code smell imo. I don't think it's something we need to lint for however 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are usages I filterd out

CleanShot 2023-11-06 at 20 10 26

First 3 are used in old profile screen to pass new look into old components. I added these 3.
I guess we will remove these when new profile screen added.

2 of them are used in quo_preview. I'm not sure, maybe it's not required when using outside of preview

one is in comment

these 2 are indeed a bit weird
src/status_im2/contexts/emoji_picker/style.cljs
src/status_im2/contexts/chat/messages/drawers/view.cljs

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh let's lint this so, we really shouldn't have these uses imo

Copy link
Contributor

Choose a reason for hiding this comment

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

Or at least create a follow up issue to address this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

issue added
#17837 and #17838

Copy link
Contributor

@ilmotta ilmotta left a comment

Choose a reason for hiding this comment

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

🏄🏼 🏄🏼‍♂️

@yqrashawn yqrashawn force-pushed the feat/lint-quo-component-outside-quo branch from f5151b2 to f1fa87e Compare November 6, 2023 14:53
@yqrashawn yqrashawn deleted the feat/lint-quo-component-outside-quo branch November 7, 2023 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linting Linter settings & improvements
Projects
Archived in project
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants