Commit Graph

30 Commits

Author SHA1 Message Date
Ludy
02aee72cf5
Merge branch 'V2' into add_eslint_plugins_20250928 2025-11-05 16:22:19 +01:00
ConnorYoh
4c0c9b28ef
V2 Tauri integration (#3854)
# Description of Changes

Please provide a summary of the changes, including:

## Add PDF File Association Support for Tauri App

  ### 🎯 **Features Added**
  - PDF file association configuration in Tauri
  - Command line argument detection for opened files
  - Automatic file loading when app is launched via "Open with"
  - Cross-platform support (Windows/macOS)

  ### 🔧 **Technical Changes**
  - Added `fileAssociations` in `tauri.conf.json` for PDF files
  - New `get_opened_file` Tauri command to detect file arguments
  - `fileOpenService` with Tauri fs plugin integration
  - `useOpenedFile` hook for React integration
  - Improved backend health logging during startup (reduced noise)

  ### 🧪 **Testing**
See 
* https://v2.tauri.app/start/prerequisites/
*
[DesktopApplicationDevelopmentGuide.md](DesktopApplicationDevelopmentGuide.md)

  ```bash
  # Test file association during development:
  
  cd frontend
  npm install
  cargo tauri dev --no-watch -- -- "path/to/file.pdf"
  ```

 For production testing:
  1. Build: npm run tauri build
  2. Install the built app
  3. Right-click PDF → "Open with" → Stirling-PDF

  🚀 User Experience

- Users can now double-click PDF files to open them directly in
Stirling-PDF
- Files automatically load in the viewer when opened via file
association
  - Seamless integration with OS file handling

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.

---------

Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
Co-authored-by: James Brunton <james@stirlingpdf.com>
Co-authored-by: James Brunton <jbrunton96@gmail.com>
2025-11-05 11:44:59 +00:00
Ludy87
9f0c8a0b4c
Update ESLint config and dependencies
Removed deprecated '@typescript-eslint/no-unsafe-arguments' rule from ESLint config. Updated various dependencies in package.json and package-lock.json, including ESLint, @typescript-eslint, @embedpdf, and related plugins to their latest versions for improved compatibility and features.
2025-10-29 23:28:06 +01:00
Ludy
50460fa4b8
Merge branch 'V2' into add_eslint_plugins_20250928 2025-10-29 22:53:21 +01:00
James Brunton
8060934ee9
Add linting to ensure correct imports style is used (#4759)
# Description of Changes
Add linting to ensure correct imports style is used.

I've disabled the linting for two imports which use relative paths
because the files they're importing are siblings to core and
proprietary. They could probs be imported by `@app/../assets/xxx` but it
seems silly. The other thing we could do is add an explicit `@assets`
path alias or something, but it seemed more complex than just disabling
the lint for those two imports at this stage. We could always do it in
the future if we want to import stuff up there a lot in the future.
2025-10-29 11:58:04 +00:00
Ludy87
ca082bb41d Enforce stricter ESLint rule levels
Changed several ESLint and TypeScript rules from 'warn' or 'off' to 'error' to enforce stricter code quality and consistency. This includes React hooks, prop-types, unused variables, and various TypeScript safety checks.
2025-10-27 17:29:23 +01:00
Ludy87
ebbad76fa6
Update ESLint config and Vite dependency
Disabled the '@typescript-eslint/array-type' and '@typescript-eslint/no-explicit-any' rules in the ESLint configuration for better codebase compatibility. Added parser options for ECMAScript modules. Also updated the Vite dependency from version 7.1.10 to 7.1.12.
2025-10-26 10:08:37 +01:00
Ludy
01b0677190
Merge branch 'V2' into add_eslint_plugins_20250928 2025-10-26 07:59:45 +01:00
James Brunton
c9eee00d66
Refactor to fix circular imports (#4700)
# Description of Changes
Refactors code to avoid circular imports everywhere and adds linting for
circular imports to ensure it doesn't happen again. Most changes are
around the tool registry, making it a provider, and splitting into tool
types to make it easier for things like Automate to only have access to
tools excluding itself.
2025-10-21 14:53:18 +01:00
Ludy
70f9dd50b7
Clean up ESLint config by removing glob patterns
Removed unused glob patterns for source and node files.
2025-10-07 20:18:51 +02:00
Ludy
c6f54a2a4c
Merge branch 'V2' into add_eslint_plugins_20250928 2025-10-06 17:44:03 +02:00
James Brunton
2a29bda34f
Enable ESLint no-undef rule (#4346)
# Description of Changes
Enable ESLint [no-undef
rule](https://eslint.org/docs/latest/rules/no-undef)
2025-10-06 12:10:00 +00:00
Ludy87
151fca0619
Update TypeScript and ESLint configs for Vite React
Extend tsconfig.json from @tsconfig/vite-react and add the package to dependencies. Adjust TypeScript compiler options for improved compatibility with Vite and React, including type inclusions and path aliases. Simplify ESLint config to use recommended settings and remove TypeScript-specific parser options.
2025-09-30 18:32:15 +02:00
Ludy87
9b764220a6
Update ESLint TypeScript projectService config
Refines the ESLint TypeScript parser configuration by specifying allowed default projects for certain files and setting the default project to './tsconfig.json'. This improves linting accuracy for the listed files.
2025-09-30 17:46:17 +02:00
Ludy87
57111dd92c Update eslint.config.mjs 2025-09-29 12:28:44 +02:00
Ludy87
649ab52ed5 Update eslint.config.mjs 2025-09-29 12:17:05 +02:00
Ludy87
0011b207be Update eslint.config.mjs 2025-09-29 11:59:32 +02:00
Ludy87
32c5e8ec25 Update eslint.config.mjs 2025-09-29 11:56:32 +02:00
Ludy87
eb3c433081
Update eslint.config.mjs 2025-09-28 18:04:09 +02:00
Ludy87
1246c2dba5
Revamp ESLint config for React and TypeScript 2025-09-28 17:56:25 +02:00
James Brunton
bd13f6bf57
Enable ESLint no-unused-vars rule (#4367)
# Description of Changes
Enable ESLint [no-unused-vars
rule](https://typescript-eslint.io/rules/no-unused-vars/)
2025-09-05 11:16:17 +00:00
James Brunton
5caec41d96
Enable ESLint no-empty-object-type rule (#4354)
# Description of Changes
Enable ESLint [no-empty-object-type
rule](https://typescript-eslint.io/rules/no-empty-object-type/)
2025-09-05 10:15:36 +00:00
James Brunton
d558bb5fac
Enable ESLint ban-ts-comment rule (#4350)
# Description of Changes
Enable ESLint [ban-ts-comment
rule](https://typescript-eslint.io/rules/ban-ts-comment/)
2025-09-05 10:02:00 +00:00
James Brunton
cd1fc682ab
Enable ESLint no-case-declarations rule (#4348)
# Description of Changes
Enable ESLint [no-case-declarations
rule](https://eslint.org/docs/latest/rules/no-case-declarations)
2025-09-05 09:58:14 +00:00
James Brunton
b9cf7e7820
Enable ESLint no-empty-pattern rule (#4343)
# Description of Changes
Enable ESLint [no-empty-pattern
rule](https://eslint.org/docs/latest/rules/no-empty-pattern)
2025-09-05 10:55:03 +01:00
James Brunton
94e8f603ff
Enable ESLint no-unused-expressions rule (#4363)
# Description of Changes
Enable ESLint [no-unused-expressions
rule](https://typescript-eslint.io/rules/no-unused-expressions/)
2025-09-04 15:12:38 +00:00
James Brunton
74609e54fe
Enable ESLint prefer-const rule (#4349)
# Description of Changes
Enable ESLint [prefer-const
rule](https://eslint.org/docs/latest/rules/prefer-const)
2025-09-04 15:09:29 +00:00
James Brunton
003285506f
Enable ESLint no-useless-escape rule (#4344)
# Description of Changes
Enable ESLint [no-useless-escape
rule](https://eslint.org/docs/latest/rules/no-useless-escape)
2025-09-04 15:04:49 +00:00
James Brunton
6d3b08d9b6
Enable ESLint no-empty rule (#4342)
# Description of Changes
Enable ESLint [no-empty
rule](https://eslint.org/docs/latest/rules/no-empty)
2025-09-04 15:59:31 +01:00
James Brunton
295e682e03
Add linting to frontend (#4341)
# Description of Changes
There's no current linter running over our TypeScript code, which means
we've got a bunch of dead code and other code smells around with nothing
notifying us. This PR adds ESLint with the typescript-eslint plugin and
enables the recommended settings as a starting point for us.

I've disabled all of the failing rules for the scope of this PR, just to
get linting running without causing a massive diff. I'll follow up with
future PRs that enable the failing rules one by one.

Also updates our version of TypeScript, which introduces a new type
error in the code (which I've had to fix)
2025-09-04 14:08:28 +01:00