Skip to content

Commit

Permalink
Update prettier and prettier-plugin-svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
msmolens committed Jul 19, 2023
1 parent f10949b commit ea899b0
Show file tree
Hide file tree
Showing 35 changed files with 349 additions and 343 deletions.
1 change: 1 addition & 0 deletions .prettierrc.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
plugins = ["prettier-plugin-svelte"]
bracketSameLine = true
singleQuote = true
svelteAllowShorthand = true
Expand Down
36 changes: 18 additions & 18 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"compile-smui-theme-dark": "smui-theme compile src/treetop/generated/smui-dark.css -i src/theme/dark",
"lint": "eslint ./src ./test",
"lint:fix": "eslint ./src ./test --fix",
"prettier": "prettier --check ./src ./test",
"prettier:fix": "prettier --write ./src ./test",
"prettier": "prettier --check --plugin=prettier-plugin-svelte ./src ./test",
"prettier:fix": "prettier --write --plugin=prettier-plugin-svelte ./src ./test",
"build": "concurrently --max-processes 1 \"npm:build:background_script\" \"npm:build:options\" \"npm:build:treetop\" \"npm:build:welcome\"",
"build:watch": "concurrently \"npm:build:background_script:watch\" \"npm:build:options:watch\" \"npm:build:treetop:watch\" \"npm:build:welcome:watch\"",
"build:background_script": "vite build --config vite.background_script.config.ts",
Expand Down Expand Up @@ -63,8 +63,8 @@
"normalize.css": "^8.0.1",
"postcss": "^8.4.26",
"postcss-url": "^10.1.3",
"prettier": "^2.8.4",
"prettier-plugin-svelte": "^2.9.0",
"prettier": "3.0.0",
"prettier-plugin-svelte": "^3.0.0",
"rollup-plugin-copy": "^3.4.0",
"sass": "^1.63.6",
"smui-theme": "^6.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/background_script/open-treetop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const openWelcome = ({
*/
export const openTreetop = (
_tab: Tabs.Tab,
info: Action.OnClickData | undefined
info: Action.OnClickData | undefined,
): void => {
if (!info) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/background_script/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type * as Treetop from '@Treetop/treetop/types';
* Set default options, leaving existing options unchanged.
*/
export const setDefaultOptions = async (
defaultOptions: Record<string, Treetop.PreferenceValue>
defaultOptions: Record<string, Treetop.PreferenceValue>,
): Promise<void> => {
try {
// Get stored options
Expand Down
2 changes: 1 addition & 1 deletion src/options/options.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
14 changes: 7 additions & 7 deletions src/treetop/BookmarksManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as Treetop from './types';
export class BookmarksManager {
constructor(
private readonly nodeStoreMap: Treetop.NodeStoreMap,
private readonly builtInFolderInfo: Treetop.BuiltInFolderInfo
private readonly builtInFolderInfo: Treetop.BuiltInFolderInfo,
) {}

/**
Expand All @@ -27,12 +27,12 @@ export class BookmarksManager {

// Firefox: Exclude Mobile Bookmarks folder
rootNode.children = rootNode.children?.filter(
({ id }) => id !== MOBILE_BOOKMARKS_GUID
({ id }) => id !== MOBILE_BOOKMARKS_GUID,
);

// Store built-in folder IDs (e.g. Other Bookmarks)
this.builtInFolderInfo.builtInFolderIds = rootNode.children!.map(
({ id }) => id
({ id }) => id,
);

// Initialize node stores for folders
Expand Down Expand Up @@ -119,7 +119,7 @@ export class BookmarksManager {
*/
async handleBookmarkCreated(
id: string,
bookmark: Bookmarks.BookmarkTreeNode
bookmark: Bookmarks.BookmarkTreeNode,
): Promise<void> {
if (isFolder(bookmark)) {
// Add node store for the new folder
Expand All @@ -140,7 +140,7 @@ export class BookmarksManager {
*/
async handleBookmarkRemoved(
id: string,
removeInfo: Bookmarks.OnRemovedRemoveInfoType
removeInfo: Bookmarks.OnRemovedRemoveInfoType,
): Promise<string[]> {
const removedNodeIds = [];

Expand Down Expand Up @@ -183,7 +183,7 @@ export class BookmarksManager {
*/
async handleBookmarkChanged(
id: string,
_changeInfo: Bookmarks.OnChangedChangeInfoType
_changeInfo: Bookmarks.OnChangedChangeInfoType,
): Promise<void> {
if (this.nodeStoreMap.has(id)) {
// Folder changed. Update its node.
Expand All @@ -201,7 +201,7 @@ export class BookmarksManager {
*/
async handleBookmarkMoved(
_id: string,
moveInfo: Bookmarks.OnMovedMoveInfoType
moveInfo: Bookmarks.OnMovedMoveInfoType,
): Promise<void> {
const parentId = moveInfo.parentId;
const oldParentId = moveInfo.oldParentId;
Expand Down
8 changes: 4 additions & 4 deletions src/treetop/FilterManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class FilterManager {

constructor(
private readonly filterSet: Treetop.FilterSet,
private readonly nodeStoreMap: Treetop.NodeStoreMap
private readonly nodeStoreMap: Treetop.NodeStoreMap,
) {}

/**
Expand Down Expand Up @@ -86,7 +86,7 @@ export class FilterManager {
*/
handleBookmarkCreated(
_id: string,
bookmark: Bookmarks.BookmarkTreeNode
bookmark: Bookmarks.BookmarkTreeNode,
): void {
if (this.filter === null) {
return;
Expand Down Expand Up @@ -151,7 +151,7 @@ export class FilterManager {
*/
handleBookmarkChanged(
_id: string,
_changeInfo: Bookmarks.OnChangedChangeInfoType
_changeInfo: Bookmarks.OnChangedChangeInfoType,
): void {
this.refreshFilter();
}
Expand All @@ -162,7 +162,7 @@ export class FilterManager {
*/
handleBookmarkMoved(
_id: string,
_moveInfo: Bookmarks.OnMovedMoveInfoType
_moveInfo: Bookmarks.OnMovedMoveInfoType,
): void {
this.refreshFilter();
}
Expand Down
6 changes: 3 additions & 3 deletions src/treetop/HistoryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class HistoryManager {
*/
async handleBookmarkCreated(
_id: string,
bookmark: Bookmarks.BookmarkTreeNode
bookmark: Bookmarks.BookmarkTreeNode,
): Promise<void> {
if (!isBookmark(bookmark)) {
return;
Expand All @@ -110,7 +110,7 @@ export class HistoryManager {
*/
async handleBookmarkChanged(
id: string,
changeInfo: Bookmarks.OnChangedChangeInfoType
changeInfo: Bookmarks.OnChangedChangeInfoType,
): Promise<void> {
// Ignore changed folders
if (changeInfo.url === undefined) {
Expand Down Expand Up @@ -146,7 +146,7 @@ export class HistoryManager {
* history.
*/
async handleVisitRemoved(
removed: History.OnVisitRemovedRemovedType
removed: History.OnVisitRemovedRemovedType,
): Promise<void> {
if (removed.allHistory) {
// All history was removed
Expand Down
4 changes: 2 additions & 2 deletions src/treetop/PreferencesManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class PreferencesManager {
*/
createStore(
name: string,
value: Treetop.PreferenceValue
value: Treetop.PreferenceValue,
): Writable<Treetop.PreferenceValue> {
const store = writable(value);
this.stores.set(name, store);
Expand Down Expand Up @@ -60,7 +60,7 @@ export class PreferencesManager {
*/
private handleStorageChanged(
changes: Record<string, Storage.StorageChange>,
_areaName: string
_areaName: string,
): void {
for (const key of Object.keys(changes)) {
const value = changes[key].newValue as Treetop.PreferenceValue;
Expand Down
2 changes: 1 addition & 1 deletion src/treetop/PropertiesDialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
});
header = browser.i18n.getMessage(
'dialogHeadingBookmarkProperties',
truncatedTitle
truncatedTitle,
);
}
Expand Down
Loading

0 comments on commit ea899b0

Please sign in to comment.