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

chore: improve lint setup #397

Merged
merged 5 commits into from
Jul 26, 2023
Merged

Conversation

mcmxcdev
Copy link
Contributor

Pre-flight Checklist

Please ensure you've completed all of the following.

Description of Change

  • update eslint config to closely mirror the ones from ferdium-app
  • add .eslintignore
  • opt in to eslint reportUnusedDisableDirectives config option
  • remove trailingComma: all from prettier config which is default in prettier v3
  • autofix or disable a lot of lint issues throughout codebase
  • add volta configuration to package.json to autoload correct node and pnpm versions
  • upgrade all eslint and prettier related dependencies to latest
  • update lint:fix npm script
  • reformat touched files with prettier

- update eslint config to closely mirror the ones from ferdium-app
- add .eslintignore
- opt in to eslint `reportUnusedDisableDirectives` config option
- remove `trailingComma: all` from `prettier` config which is default in `prettier` v3
- autofix or disable a lot of lint issues throughout codebase
- add `volta` configuration to `package.json` to autoload correct `node` and `pnpm` versions
- upgrade all `eslint` and `prettier` related dependencies to latest
- update lint:fix npm script
- reformat touched files with prettier
@mcmxcdev
Copy link
Contributor Author

The "Check Recipe Version Bump" CI step failed, but I don't think we should require a version bump for formatter or lint changes only which don't modify the business logic.

@mcmxcdev mcmxcdev marked this pull request as ready for review July 24, 2023 18:23
@vraravam
Copy link
Contributor

The "Check Recipe Version Bump" CI step failed, but I don't think we should require a version bump for formatter or lint changes only which don't modify the business logic.

no - this is unfortunately required to force the upgrade on the clients' installation of Ferdium. Otherwise, the installed version will not know to upgrade the services. I would suggest that we do a minor version bump of each service (there's a lot of them!) - which I had done in my other PR #399 . Maybe, I can resurrect that branch and merge the appropriate changes for version bump and also missing injections of service.css?

@victorbnl
Copy link
Contributor

I think their point was it’s useless to make Ferdium clients update the service after lint changes. At first sight, code style changes seem to be useful for developers but not users, so the latter can just stay on the unformatted version until the next logic change. But maybe there’s more to it I don’t know of and it is actually necessary.

@vraravam
Copy link
Contributor

I think their point was it’s useless to make Ferdium clients update the service after lint changes. At first sight, code style changes seem to be useful for developers but not users, so the latter can just stay on the unformatted version until the next logic change. But maybe there’s more to it I don’t know of and it is actually necessary.

that could be true, but then there's no way to verify this during the pre-commit sequence. If a bug is being RCA'ed, the first thing we do is confirm that the user is on the latest version of the recipe. And if the versions mismatch, then debugging becomes muddled. Such nuanced demarcation can (imho) be simplified.

@vraravam
Copy link
Contributor

@mcmxcdev - I have rebased your work in this PR into a branch (no PR raised) here: https://github.com/vraravam/ferdium-recipes/tree/improve-lint-setup-vijay

This should take care of the version bumps. The build is now passing locally. If you are ok, please merge my code into your PR and we can continue with further fixes

- update eslint config to closely mirror the ones from ferdium-app
- add .eslintignore
- opt in to eslint `reportUnusedDisableDirectives` config option
- remove `trailingComma: all` from `prettier` config which is default in `prettier` v3
- autofix or disable a lot of lint issues throughout codebase
- add `volta` configuration to `package.json` to autoload correct `node` and `pnpm` versions
- upgrade all `eslint` and `prettier` related dependencies to latest
- update lint:fix npm script
- reformat touched files with prettier
vraravam and others added 2 commits July 26, 2023 06:26
Introduced injection of 'service.css' where it was missing in many recipes
@mcmxcdev
Copy link
Contributor Author

mcmxcdev commented Jul 26, 2023

The build is now passing locally. If you are ok, please merge my code into your PR and we can continue with further fixes

I have merged your changes into this PR, but there are still recipes failing the version bump check. Personally, I agree with Victor here that this seems redundant to do for formatting-only changes.

UPDATE: It's tedious but I bumped up the remaining recipes, all green now.

@vraravam
Copy link
Contributor

Thanks approved the PR, and its building and running locally as well. Shall we merge this for the next nightly?

@mcmxcdev
Copy link
Contributor Author

Thanks approved the PR, and its building and running locally as well. Shall we merge this for the next nightly?

Yes, let's get it merged since I plan on delivering some more PRs and would like to avoid conflicts with existing changes.

@vraravam vraravam merged commit 9b8f017 into ferdium:main Jul 26, 2023
2 checks passed
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.

3 participants