forked from javamachr/quest-sidenoder
-
Notifications
You must be signed in to change notification settings - Fork 2
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
build: Enable lint-staged #44
Open
MikeRatcliffe
wants to merge
7
commits into
VRPirates:main
Choose a base branch
from
MikeRatcliffe:enable-lint-staged
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Sep 18, 2024
MikeRatcliffe
force-pushed
the
enable-lint-staged
branch
from
September 25, 2024 22:40
fa1bb1b
to
da06ade
Compare
This commit fixes a missing code issue in the `patchNow` function of the App Tools modal. The issue was that the code was referencing a variable called `package` which wasn't actually being passed in the argument object. This commit updates the code to use the correct variable name `pkg`, which is now being passed in the argument object. This ensures that the App Tools modal functions correctly and can access the correct information about the application being managed.
This commit addresses an issue with sorting functionality in the "browse" and "remote" views within the application. The previous implementation of the `sortBy` function contained a nested function, which completely broke the sort functionality. This change also simplifies the `sortBy` function by making the sorting logic more straightforward and easier to understand. This improved clarity and maintainability will benefit developers working on the codebase.
Fixes VRPirates#34 Cleanly closes `adb` and `rclone` connections when the application exits, ensuring resources are freed and preventing potential issues. This addresses a previous oversight where these connections weren't properly closed, potentially leading to resource leaks and unexpected behavior. Even though we free up the adb connection we don't close the server because other programs may be using the connection. The changes introduce a `destroy()` function in `tools.js` that handles the cleanup. This function is called when the application receives the "will-quit" event, ensuring that resources are freed before the application terminates. This change enhances the application's reliability and stability by preventing resource leaks and ensuring a clean exit.
This commit addresses an issue where the keyboard shortcut (Ctrl+F or Cmd+F) for opening the search dialog in the app was only functional after the search dialog was already open. This change makes the keyboard shortcut work regardless of the search dialog's current state. The main change involves renaming the `openSearch()` function to `toggleSearch()`, which now handles both opening and closing the search dialog based on its current visibility. The logic for handling the keyboard shortcut has been moved to the `document.addEventListener("keydown", ...)` block, allowing for a more robust and platform-independent solution. Additionally, the `FindDialog` class has been modified to handle toggling the search dialog's visibility dynamically, with a new `display` parameter for the `toggle()` function. This provides more control over the dialog's state and simplifies its usage. This improvement provides a more intuitive and user-friendly experience by ensuring that the search shortcut is always functional, regardless of the current state of the search dialog.
These changes remove the `node-fetch` library from the project as it has been part of node for a number of years now, so the require is no longer needed.
These changes upgrade the project's styling framework from Bootstrap v4 to Bootstrap v5.3.3. This upgrade also impacts the project's layout by: - Removing the Bootswatch `bootstrap-slate.min.css` file as the theme is now handled by the official Bootswatch node module. - Updating the `main.css` file to accommodate the new Bootstrap classes and make necessary adjustments for elements like badges and form check inputs. - Modifying the `browse_include.twig`, `device_info.twig`, `index.twig`, and `modals/app_start.twig` files to use the new Bootstrap v5 classes and styling. Notably, this involves replacing deprecated classes like "pull-left" and "pull-right" with "float-start" and "float-end" respectively, along with other changes to button styling and form element types. The `views/css/bootstrap.min.css` file is removed because the new Bootstrap CSS is now included through the official `bootstrap` node module. The `views/js/bootstrap.min.js` file is also removed as the Bootstrap v5 require includes its own JavaScript files for its features, no longer requiring a separate Bootstrap JavaScript file. These changes aim to improve the project's styling, responsiveness, and user experience by utilizing the latest version of the popular Bootstrap framework. It also removes redundancy in the project's CSS and JavaScript files, contributing to a more streamlined codebase.
This commit introduces `lint-staged` to automate code formatting before committing changes. Previously, the `.husky/pre-commit` hook relied on `npm run prettier:check`, which only performed a check for code style violations but did not automatically fix them. This meant that developers had to manually run `prettier` to format their code before committing. Most notably, using Husky to achieve this automatically formats only the files that are to be committed, saving developers bot time and sanity. The changes implement the following: - **Update `.husky/pre-commit`:** The hook is now configured to run `npm run pre-commit` which executes `lint-staged` to automatically format code changes. - **Add `pre-commit` script to `package.json`:** This script runs `lint-staged` with the `--concurrent false` flag, ensuring that formatting happens sequentially for improved compatibility with eslint and reliability. - **Modify `lint-staged` configuration in `package.json`:** The configuration now targets specific file types (`*.{css,html,js,json,md,twig,yml}`) for formatting. This clarifies the scope of automatic formatting. This change simplifies the development workflow by automating the code formatting process, ensuring all commits adhere to the project's style guidelines without manual intervention. This improves code consistency and reduces the possibility of style-related issues in the codebase.
MikeRatcliffe
force-pushed
the
enable-lint-staged
branch
from
September 30, 2024 13:41
da06ade
to
70866f7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #26
This is one pull request in a stack... they are all based on top of each other, so the order is important.
The advantage of this approach is that you are guaranteed no conflicts and reviews should be shorter.
Review each patch and merge before you move on to the next, this way, nothing will break and the code will be easier to review.
Start from #38 and work your way up the stack until you reach #51 (bottom to top).
main