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
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports.biome": "explicit",
"quickfix.biome": "explicit"
"source.fixAll.biome": "explicit"
},
"editor.defaultFormatter": "biomejs.biome"
}
8 changes: 3 additions & 5 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.3/schema.json",
"organizeImports": {
"enabled": true
},
"$schema": "https://biomejs.dev/schemas/2.5.6/schema.json",
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"preset": "recommended",
"style": {
"noParameterAssign": "warn",
"noNonNullAssertion": "warn",
Expand Down
2 changes: 1 addition & 1 deletion examples/arrow/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html lang="en">
<head>
<title>Example App</title>
<link rel="stylesheet" href="index.css" />
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html lang="en">
<head>
<title>Example App</title>
</head>
Expand Down
2 changes: 1 addition & 1 deletion examples/icon-animation/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html lang="en">
<head>
<title>Example App</title>
</head>
Expand Down
2 changes: 1 addition & 1 deletion examples/native-menu/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { app, Menu, Tray } = require('electron');
const path = require('path');
const path = require('node:path');

const { menubar } = require('../../');

Expand Down
7 changes: 6 additions & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
"version": "0.1.0",
"description": "Examples of menubar electron apps",
"private": true,
"workspaces": ["arrow", "hello-world", "icon-animation", "native-menu"],
"workspaces": [
"arrow",
"hello-world",
"icon-animation",
"native-menu"
],
"devDependencies": {
"electron": "^43.0.0"
}
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
"electron-positioner": "^4.1.0"
},
"devDependencies": {
"@biomejs/biome": "^1.9.3",
"@types/jest": "^25.2.3",
"@biomejs/biome": "^2.5.6",
"@types/jest": "^30.0.0",
"electron": "^43.0.0",
"jest": "^26.0.1",
"jest": "^30.4.2",
"rimraf": "^3.0.2",
"standard-version": "^8.0.0",
"ts-jest": "^26.0.0",
"ts-jest": "^29.4.12",
"typedoc": "^0.17.7",
"typedoc-plugin-markdown": "^2.2.17",
"typedoc-plugin-no-inherit": "^1.1.10",
Expand All @@ -62,4 +62,4 @@
"electron": ">=9.0.0"
},
"packageManager": "yarn@1.22.22"
}
}
2 changes: 1 addition & 1 deletion src/Menubar.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BrowserWindow, Tray, app } from 'electron';
import { app, BrowserWindow, Tray } from 'electron';

import { Menubar } from './Menubar';

Expand Down
8 changes: 4 additions & 4 deletions src/Menubar.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EventEmitter } from 'events';
import fs from 'fs';
import path from 'path';
import { EventEmitter } from 'node:events';
import fs from 'node:fs';
import path from 'node:path';
import { BrowserWindow, Tray } from 'electron';
import Positioner from 'electron-positioner';

Expand Down Expand Up @@ -160,7 +160,7 @@ export class Menubar extends EventEmitter {
}

// Default the window to the right if `trayPos` bounds are undefined or null.
let noBoundsPosition = undefined;
let noBoundsPosition: Options['windowPosition'];
if (
(trayPos === undefined || trayPos.x === 0) &&
this._options.windowPosition &&
Expand Down
2 changes: 1 addition & 1 deletion src/util/cleanOptions.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as path from 'path';
import * as path from 'node:path';

import { MOCK_APP_GETAPPPATH } from '../__mocks__/electron';
import { cleanOptions } from './cleanOptions';
Expand Down
4 changes: 2 additions & 2 deletions src/util/cleanOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

/** */

import path from 'path';
import url from 'url';
import path from 'node:path';
import url from 'node:url';
import { app } from 'electron';

import type { Options } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion src/util/getWindowPosition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/** */

import { type Rectangle, type Tray, screen as electronScreen } from 'electron';
import { screen as electronScreen, type Rectangle, type Tray } from 'electron';

const isLinux = process.platform === 'linux';

Expand Down
Loading