Skip to content

Commit

Permalink
[ENG-1854] Migrate to Tauri v2 Release Candidate (#2654)
Browse files Browse the repository at this point in the history
* Migrate to Tauri v2 Release Canidate

* Formatting

* Update pnpm

* Update all tauri deps (js and rust) to Release Candidate 2
 - A lot of misc fixes due to changes in the new versions of tauri, rspc and specta

* Recreate pnpm-lock

* Fix pnpm-lock

* Formatting

* Use 10 chars SHA for git deps
 - Update a couple of rust dependencies
 - Add taplo for toml auto formatting
 - Adjust some formatting configurations
 - Updated prettier and its plugins

* Fix formatter settings

* Minor improvements to Cargo.toml format

---------

Co-authored-by: Vítor Vasconcellos <[email protected]>
  • Loading branch information
Rocky43007 and HeavenVolkoff authored Aug 14, 2024
1 parent d246154 commit 139ba6e
Show file tree
Hide file tree
Showing 60 changed files with 1,567 additions and 1,498 deletions.
56 changes: 25 additions & 31 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

# BATS: https://github.com/bats-core/bats-core
# https://github.com/bats-core/bats-core/master/.editorconfig
[*.bats]
insert_final_newline = true
max_line_length = 80
trim_trailing_whitespace = true

# CSS
# https://google.github.io/styleguide/htmlcssguide.xml#General_Formatting_Rules
# http://cssguidelin.es/#syntax-and-formatting
Expand All @@ -32,54 +25,49 @@ trim_trailing_whitespace = true
[*.{htm,html}]
trim_trailing_whitespace = true

# Just
# https://github.com/casey/just/master/justfile
[{justfile,Justfile}]
insert_final_newline = true
indent_style = space

# JavaScript, JSON, JSX, JavaScript Modules, TypeScript
# https://github.com/feross/standard
# https://prettier.io
[*.{cjs,js,json,jsx,mjs,ts,tsx}]
indent_size = 4

# Kotlin
# https://android.github.io/kotlin-guides/style.html#indentation
# https://kotlinlang.org/docs/coding-conventions.html#indentation
[*.{kt,kts}]
indent_size = 4

# Python
# https://www.python.org/dev/peps/pep-0008/#code-lay-out
[*.py]
indent_size = 4

# Rust
# https://github.com/rust-lang/rust/blob/master/src/doc/style/style/whitespace.md
[*.rs]
indent_size = 4
insert_final_newline = false
trim_trailing_whitespace = true

# SQL
# https://www.sqlstyle.guide/
[*.sql]
# PowerShell
# https://poshcode.gitbook.io/powershell-practice-and-style/style-guide/code-layout-and-formatting
[*.{ps1,psd1,psm1}]
indent_size = 4
indent_style = space

# Prisma
# https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-schema/data-model#formatting
[*.prisma]
indent_size = 2
indent_style = space

# YAML
# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668
[*.{yaml,yml}]
indent_style = space
# Rust
# https://github.com/rust-lang/rust/blob/master/src/doc/style/style/whitespace.md
[*.rs]
indent_size = 4
insert_final_newline = false
trim_trailing_whitespace = true

# Shell
# https://google.github.io/styleguide/shell.xml#Indentation
[*.{bash,sh,zsh}]
indent_style = space

# PowerShell
# https://poshcode.gitbook.io/powershell-practice-and-style/style-guide/code-layout-and-formatting
[*.{ps1,psd1,psm1}]
# SQL
# https://www.sqlstyle.guide/
[*.sql]
indent_size = 4
indent_style = space

Expand All @@ -88,3 +76,9 @@ indent_style = space
[*.swift]
indent_size = 4
indent_style = space

# YAML
# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668
[*.{yaml,yml}]
indent_style = space

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
; make all engine requirements (e.g. node version) strictly kept
engine-strict=true
dedupe-peer-dependents=true
; necessary for metro + mobile
strict-peer-dependencies=false
node-linker=hoisted
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
'^[../]',
'^[./]'
],
importOrderParserPlugins: ['typescript', 'jsx', 'decorators-legacy'],
importOrderParserPlugins: ['typescript', 'jsx', 'decorators'],
importOrderTypeScriptVersion: '4.4.0',
tailwindConfig: './packages/ui/tailwind.config.js',
plugins: ['@ianvs/prettier-plugin-sort-imports', 'prettier-plugin-tailwindcss']
Expand Down
22 changes: 11 additions & 11 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
max_width = 100
hard_tabs = true
newline_style = "Unix"
use_small_heuristics = "Default"
reorder_imports = true
reorder_modules = true
remove_nested_parens = true
edition = "2021"
merge_derives = true
use_try_shorthand = false
edition = "2021"
force_explicit_abi = true
hard_tabs = true
max_width = 100
merge_derives = true
newline_style = "Unix"
remove_nested_parens = true
reorder_imports = true
reorder_modules = true
use_field_init_shorthand = false
force_explicit_abi = true
use_small_heuristics = "Default"
use_try_shorthand = false
11 changes: 11 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[formatting]
align_comments = true
align_entries = true
array_auto_collapse = true
array_trailing_comma = false
column_width = 100
crlf = false
indent_string = ' '
reorder_arrays = true
reorder_keys = true
trailing_newline = true
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.diagnostics.experimental.enable": false,
"tailwindCSS.experimental.classRegex": [
Expand Down Expand Up @@ -102,5 +105,8 @@
"i18n-ally.enabledFrameworks": ["react"],
"i18n-ally.keystyle": "flat",
// You need to add this to your locale settings file "i18n-ally.translate.google.apiKey": "xxx"
"i18n-ally.translate.engines": ["google"]
"i18n-ally.translate.engines": ["google"],
"prettier.configPath": ".prettierrc.js",
"prettier.prettierPath": "./node_modules/prettier",
"evenBetterToml.taplo.configFile.path": ".taplo.toml"
}
Loading

0 comments on commit 139ba6e

Please sign in to comment.