Skip to content

Commit ccfb09e

Browse files
authored
exclude openssl and i18n from npm run format; + npm run format (#183)
1 parent b841469 commit ccfb09e

File tree

12 files changed

+31
-30
lines changed

12 files changed

+31
-30
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ node_modules
77
.env.*
88
!.env.example
99
/src-tauri/target
10+
/openssl*
11+
/src/i18n/i18n*
1012

1113
# Ignore files for PNPM, NPM and YARN
1214
pnpm-lock.yaml

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ To generate the icons use the following command:
4040

4141
```shell
4242
npm run minify-icons
43-
```
43+
```

src/lib/chat/MatrixTimeline.svelte

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177
<style lang="scss">
178178
$border-radius: 16px;
179179
180-
181180
.input {
182181
border: 1px solid var(--md-sys-color-outline);
183182
flex-grow: 1;
@@ -220,7 +219,6 @@
220219
width: 100%;
221220
}
222221
223-
224222
section {
225223
display: flex;
226224
flex-direction: column;

src/lib/components/Action.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
border-right-width: 3px;
8585
}
8686
87-
8887
.inline-kbd {
8988
margin-inline-end: 2px;
9089
}

src/lib/fonts/noto-sans-mono.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@
7373
font-stretch: 62.5% 100%;
7474
src: url("@fontsource-variable/noto-sans-mono/files/noto-sans-mono-latin-ext-wght-normal.woff2")
7575
format("woff2-variations");
76-
unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323,
77-
U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,
76+
unicode-range:
77+
U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
78+
U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,
7879
U+A720-A7FF;
7980
}
8081

@@ -87,7 +88,8 @@
8788
font-stretch: 62.5% 100%;
8889
src: url("@fontsource-variable/noto-sans-mono/files/noto-sans-mono-latin-wght-normal.woff2")
8990
format("woff2-variations");
90-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
91-
U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F,
92-
U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
91+
unicode-range:
92+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
93+
U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074,
94+
U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
9395
}

src/lib/util/debounce.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,24 @@
55
*
66
* I could use _.debounce(), but bringing dependency on lodash didn't feel
77
* justified yet.
8-
*
8+
*
99
* @param func The function to debounce
1010
* @param wait The number of milliseconds to delay execution
1111
* @returns A debounced version of the provided function
1212
*/
1313
function debounce<T extends (...args: any[]) => void>(
1414
func: T,
15-
wait: number
15+
wait: number,
1616
): T & { cancel: () => void } {
1717
let timeout: ReturnType<typeof setTimeout> | null = null;
1818

19-
const debounced = function(
20-
this: ThisParameterType<T>, ...args: Parameters<T>
19+
const debounced = function (
20+
this: ThisParameterType<T>,
21+
...args: Parameters<T>
2122
): void {
2223
const context = this;
2324

24-
const later = function() {
25+
const later = function () {
2526
timeout = null;
2627
func.apply(context, args);
2728
};
@@ -33,7 +34,7 @@ function debounce<T extends (...args: any[]) => void>(
3334
timeout = setTimeout(later, wait);
3435
};
3536

36-
debounced.cancel = function() {
37+
debounced.cancel = function () {
3738
if (timeout) {
3839
clearTimeout(timeout);
3940
timeout = null;
@@ -43,4 +44,4 @@ function debounce<T extends (...args: any[]) => void>(
4344
return debounced as T & { cancel: () => void };
4445
}
4546

46-
export default debounce;
47+
export default debounce;

src/routes/(app)/Footer.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@
173173
</footer>
174174

175175
<style lang="scss">
176-
177176
.sync-box {
178177
display: flex;
179178
align-items: center;

src/routes/(app)/chat/+page.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@
165165
}
166166
}
167167
168-
169168
.timeline {
170169
flex-grow: 1;
171170
}

src/routes/(app)/config/Navigation.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
padding-inline: 16px;
4646
}
4747
48-
4948
.icon {
5049
cursor: pointer;
5150

src/routes/(app)/config/chords/+page.svelte

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
codes: Map<number, KeyInfo>,
132132
): Promise<FlexSearch.Index> {
133133
if (chords.length === 0 || !browser) return index;
134-
134+
135135
index = new FlexSearch.Index({
136136
tokenize: "full",
137137
encode(phrase: string) {
@@ -149,36 +149,36 @@
149149
});
150150
},
151151
});
152-
152+
153153
let abort = false;
154154
abortIndexing = () => {
155155
abort = true;
156156
};
157-
157+
158158
const batchSize = 200;
159159
const batches = Math.ceil(chords.length / batchSize);
160-
160+
161161
for (let b = 0; b < batches; b++) {
162162
if (abort) return index;
163-
163+
164164
const start = b * batchSize;
165165
const end = Math.min((b + 1) * batchSize, chords.length);
166166
const batch = chords.slice(start, end);
167-
167+
168168
const promises = batch.map((chord, i) => {
169169
const chordIndex = start + i;
170170
progress = chordIndex + 1;
171-
171+
172172
if ("phrase" in chord) {
173173
const encodedChord = encodeChord(chord, osLayout, codes);
174174
return index.addAsync(chordIndex, encodedChord);
175175
}
176176
return Promise.resolve();
177177
});
178-
178+
179179
await Promise.all(promises);
180180
}
181-
181+
182182
return index;
183183
}
184184

0 commit comments

Comments
 (0)