Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"singleQuote": true,
"semi": false,
"trailingComma": "none"
"trailingComma": "none",
"experimentalOperatorPosition": "start"
}
12 changes: 6 additions & 6 deletions .scripts/ci/check-license-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const ignore = [

async function checkFile(file) {
if (
extensions.some((e) => file.endsWith(e)) &&
!ignore.some((i) => file.includes(`${path.sep}${i}`))
extensions.some((e) => file.endsWith(e))
&& !ignore.some((i) => file.includes(`${path.sep}${i}`))
) {
const fileStream = fs.createReadStream(file)
const rl = readline.createInterface({
Expand All @@ -46,10 +46,10 @@ async function checkFile(file) {
for await (let line of rl) {
// ignore empty lines, allow shebang, swift-tools-version and bundler license
if (
line.length === 0 ||
line.startsWith('#!') ||
line.startsWith('// swift-tools-version:') ||
ignoredLicenses.includes(line)
line.length === 0
|| line.startsWith('#!')
|| line.startsWith('// swift-tools-version:')
|| ignoredLicenses.includes(line)
) {
continue
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"eslint": "9.19.0",
"eslint-config-prettier": "10.0.1",
"eslint-plugin-security": "3.0.1",
"prettier": "3.4.2",
"prettier": "3.5.1",
"rollup": "4.34.7",
"tslib": "2.8.1",
"typescript": "5.7.3",
Expand Down
8 changes: 4 additions & 4 deletions plugins/fs/guest-js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,8 @@ async function copyFile(
options?: CopyFileOptions
): Promise<void> {
if (
(fromPath instanceof URL && fromPath.protocol !== 'file:') ||
(toPath instanceof URL && toPath.protocol !== 'file:')
(fromPath instanceof URL && fromPath.protocol !== 'file:')
|| (toPath instanceof URL && toPath.protocol !== 'file:')
) {
throw new TypeError('Must be a file URL.')
}
Expand Down Expand Up @@ -919,8 +919,8 @@ async function rename(
options?: RenameOptions
): Promise<void> {
if (
(oldPath instanceof URL && oldPath.protocol !== 'file:') ||
(newPath instanceof URL && newPath.protocol !== 'file:')
(oldPath instanceof URL && oldPath.protocol !== 'file:')
|| (newPath instanceof URL && newPath.protocol !== 'file:')
) {
throw new TypeError('Must be a file URL.')
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/geolocation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ import {

let permissions = await checkPermissions()
if (
permissions.location === 'prompt' ||
permissions.location === 'prompt-with-rationale'
permissions.location === 'prompt'
|| permissions.location === 'prompt-with-rationale'
) {
permissions = await requestPermissions(['location'])
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/nfc/guest-js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ function encodeURI(uri: string): number[] {

protocols.slice(1).forEach(function (protocol) {
if (
(prefix.length === 0 || prefix === 'urn:') &&
uri.indexOf(protocol) === 0
(prefix.length === 0 || prefix === 'urn:')
&& uri.indexOf(protocol) === 0
) {
prefix = protocol
}
Expand Down
24 changes: 12 additions & 12 deletions plugins/opener/guest-js/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ window.addEventListener('click', function (evt) {
// return early if
if (
// event was prevented
evt.defaultPrevented ||
evt.defaultPrevented
// or not a left click
evt.button !== 0 ||
|| evt.button !== 0
// or meta key pressed
evt.metaKey ||
|| evt.metaKey
// or al key pressed
evt.altKey
|| evt.altKey
)
return

Expand All @@ -28,16 +28,16 @@ window.addEventListener('click', function (evt) {
// return early if
if (
// not tirggered from <a> element
!a ||
!a
// or doesn't have a href
!a.href ||
|| !a.href
// or not supposed to be open in a new tab
!(
a.target === '_blank' ||
|| !(
a.target === '_blank'
// or ctrl key pressed
evt.ctrlKey ||
|| evt.ctrlKey
// or shift key pressed
evt.shiftKey
|| evt.shiftKey
)
)
return
Expand All @@ -47,9 +47,9 @@ window.addEventListener('click', function (evt) {
// return early if
if (
// same origin (internal navigation)
url.origin === window.location.origin ||
url.origin === window.location.origin
// not default protocols
['http:', 'https:', 'mailto:', 'tel:'].every((p) => url.protocol !== p)
|| ['http:', 'https:', 'mailto:', 'tel:'].every((p) => url.protocol !== p)
)
return

Expand Down
12 changes: 6 additions & 6 deletions plugins/shell/guest-js/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ function openLinks(): void {
if (target.matches('a')) {
const t = target as HTMLAnchorElement
if (
t.href !== '' &&
['http://', 'https://', 'mailto:', 'tel:'].some((v) =>
t.href !== ''
&& ['http://', 'https://', 'mailto:', 'tel:'].some((v) =>
t.href.startsWith(v)
) &&
t.target === '_blank'
)
&& t.target === '_blank'
) {
void invoke('plugin:shell|open', {
path: t.href
Expand All @@ -31,8 +31,8 @@ function openLinks(): void {
}

if (
document.readyState === 'complete' ||
document.readyState === 'interactive'
document.readyState === 'complete'
|| document.readyState === 'interactive'
) {
openLinks()
} else {
Expand Down
5 changes: 3 additions & 2 deletions plugins/websocket/examples/tauri-app/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ body {
margin: 0;
padding: 8px;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
font-family:
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu,
Cantarell, 'Helvetica Neue', sans-serif;
}

a {
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading