-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore(quality): add scripts for code quality #43
base: main
Are you sure you want to change the base?
Conversation
d38d825
to
f52fd76
Compare
825ca43
to
c5cc7c5
Compare
978144e
to
79ea6f4
Compare
Done messing around, this is ready for review now. |
Looks good to me, there's just a couple of things being caught by the CI build. The lint step can be cleaned up with the following diff. It's complaining about wanting to substitute quotes in the string, and then later complains about an unused variable that can just be fixed by updating the eslint and underscoring the variable:
The type-check is complaining that it can't find the modules provided by the cryostat-web repo, probably because it doesn't look like the CI checks out or initializes the submodule. |
Co-authored-by: aptmac <[email protected]>
Maybe for the type-check step we should have a separate tsconfig.json that only checks the sources for this plugin on its own, rather than also trying to analyze the submodule? |
That still runs into an odd issue:
|
Not sure what's wrong with the type-check action now. It works as expected locally and when running in a fresh container with |
Edit: Hm, nevermind, we're stuck at react-i18next ^11.7.3 for the plugin because of the Console. It looks like there's a difference between TFunction as exported by react-18next v11.7.3 and i18next. Also TFunction isn't exported by react-18next v12 and above. Edit 2: If I downgrade the react-i18next version in cryostat-web to the one that matches the Console (11.7.3), and then change the TFunction imports to get from react-i18next instead of i18next, then these errors go away for me locally. I have a branch here that I've been trying with: aptmac/cryostat-web@857b733 Original: It gets cleared up when dependencies are added. The errors about The other errors have to do with not finding i18next, which isn't explicitly listed as a devDependency so after adding that to the package.json we get a new error: This gets resolved by updating react-i18next. I tried just bumping it to the version that cryostat-web uses and the CI runs started coming back okay. Passing CI run: https://github.com/aptmac/cryostat-openshift-console-plugin/actions/runs/12779083328/job/35623104990 |
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
See #14
Description of the change:
How to manually test:
gh
CLI extension.$ act -W .github/workflows/ci.yaml -j type-check
. Try this for each of the new CI jobs.package.json
scripts directly, ex.yarn eslint:check
ornpm run license:check
.