Skip to content

Commit 30c3915

Browse files
Prettier
1 parent 2b97335 commit 30c3915

File tree

4 files changed

+74
-28
lines changed

4 files changed

+74
-28
lines changed

.github/workflows/build-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
types: [created]
55
push:
66
branches:
7-
- "**"
7+
- '**'
88
tags:
9-
- "**"
9+
- '**'
1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest

docs/examples/separate.html

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@
2222
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
SOFTWARE.
2424
-->
25-
<!DOCTYPE html>
25+
<!doctype html>
2626
<html>
2727
<head>
2828
<title>Universal Hex Splitter</title>
2929
<meta charset="UTF-8" />
30-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
30+
<meta
31+
name="viewport"
32+
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
33+
/>
3134
<style>
3235
html {
3336
margin: 0;
@@ -36,7 +39,11 @@
3639
height: 100%;
3740
}
3841
body {
39-
font: 400 16px/1.5 'Helvetica Neue', Helvetica, Arial, sans-serif;
42+
font:
43+
400 16px/1.5 'Helvetica Neue',
44+
Helvetica,
45+
Arial,
46+
sans-serif;
4047
-webkit-font-smoothing: antialiased;
4148
color: #ffffff;
4249
text-align: center;
@@ -65,7 +72,8 @@
6572
outline-offset: -10px;
6673
background-color: rgba(255, 255, 255, 0.2);
6774
}
68-
#icon-uh, #icon-v2 {
75+
#icon-uh,
76+
#icon-v2 {
6977
width: 100%;
7078
fill: #ffffff;
7179
margin-top: 26px;
@@ -111,8 +119,16 @@
111119
<h1>Universal Hex Splitter</h1>
112120
<div id="drop-uh" class="drop">
113121
<h2>Universal Hex</h2>
114-
<svg id="icon-uh" xmlns="http://www.w3.org/2000/svg" width="50" height="43" viewBox="0 0 50 43">
115-
<path d="M48.4 26.5c-.9 0-1.7.7-1.7 1.7v11.6h-43.3v-11.6c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v13.2c0 .9.7 1.7 1.7 1.7h46.7c.9 0 1.7-.7 1.7-1.7v-13.2c0-1-.7-1.7-1.7-1.7zm-24.5 6.1c.3.3.8.5 1.2.5.4 0 .9-.2 1.2-.5l10-11.6c.7-.7.7-1.7 0-2.4s-1.7-.7-2.4 0l-7.1 8.3v-25.3c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v25.3l-7.1-8.3c-.7-.7-1.7-.7-2.4 0s-.7 1.7 0 2.4l10 11.6z" />
122+
<svg
123+
id="icon-uh"
124+
xmlns="http://www.w3.org/2000/svg"
125+
width="50"
126+
height="43"
127+
viewBox="0 0 50 43"
128+
>
129+
<path
130+
d="M48.4 26.5c-.9 0-1.7.7-1.7 1.7v11.6h-43.3v-11.6c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v13.2c0 .9.7 1.7 1.7 1.7h46.7c.9 0 1.7-.7 1.7-1.7v-13.2c0-1-.7-1.7-1.7-1.7zm-24.5 6.1c.3.3.8.5 1.2.5.4 0 .9-.2 1.2-.5l10-11.6c.7-.7.7-1.7 0-2.4s-1.7-.7-2.4 0l-7.1 8.3v-25.3c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v25.3l-7.1-8.3c-.7-.7-1.7-.7-2.4 0s-.7 1.7 0 2.4l10 11.6z"
131+
/>
116132
</svg>
117133

118134
<input id="file-uh" type="file" class="file" />
@@ -208,7 +224,10 @@ <h2>Universal Hex</h2>
208224
var separatedBinaries = microbitUh.separateUniversalHex(uHexStr);
209225
}
210226
separatedBinaries.forEach(function (hexObj) {
211-
downloadTextFile('ih-' + hexObj.boardId.toString(16) + '.hex', hexObj.hex);
227+
downloadTextFile(
228+
'ih-' + hexObj.boardId.toString(16) + '.hex',
229+
hexObj.hex
230+
);
212231
});
213232
} catch (e) {
214233
alert(e);

docs/examples/webtool.html

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@
2222
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
SOFTWARE.
2424
-->
25-
<!DOCTYPE html>
25+
<!doctype html>
2626
<html>
2727
<head>
2828
<title>Universal Hex Creator</title>
2929
<meta charset="UTF-8" />
30-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
30+
<meta
31+
name="viewport"
32+
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
33+
/>
3134
<style>
3235
html {
3336
margin: 0;
@@ -36,7 +39,11 @@
3639
height: 100%;
3740
}
3841
body {
39-
font: 400 16px/1.5 'Helvetica Neue', Helvetica, Arial, sans-serif;
42+
font:
43+
400 16px/1.5 'Helvetica Neue',
44+
Helvetica,
45+
Arial,
46+
sans-serif;
4047
-webkit-font-smoothing: antialiased;
4148
color: #ffffff;
4249
text-align: center;
@@ -65,7 +72,8 @@
6572
outline-offset: -10px;
6673
background-color: rgba(255, 255, 255, 0.2);
6774
}
68-
#icon-v1, #icon-v2 {
75+
#icon-v1,
76+
#icon-v2 {
6977
width: 100%;
7078
fill: #ffffff;
7179
margin-top: 26px;
@@ -111,8 +119,16 @@
111119
<h1>Universal Hex Creator</h1>
112120
<div id="drop-v1" class="drop">
113121
<h2>V1 Intel Hex</h2>
114-
<svg id="icon-v1" xmlns="http://www.w3.org/2000/svg" width="50" height="43" viewBox="0 0 50 43">
115-
<path d="M48.4 26.5c-.9 0-1.7.7-1.7 1.7v11.6h-43.3v-11.6c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v13.2c0 .9.7 1.7 1.7 1.7h46.7c.9 0 1.7-.7 1.7-1.7v-13.2c0-1-.7-1.7-1.7-1.7zm-24.5 6.1c.3.3.8.5 1.2.5.4 0 .9-.2 1.2-.5l10-11.6c.7-.7.7-1.7 0-2.4s-1.7-.7-2.4 0l-7.1 8.3v-25.3c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v25.3l-7.1-8.3c-.7-.7-1.7-.7-2.4 0s-.7 1.7 0 2.4l10 11.6z" />
122+
<svg
123+
id="icon-v1"
124+
xmlns="http://www.w3.org/2000/svg"
125+
width="50"
126+
height="43"
127+
viewBox="0 0 50 43"
128+
>
129+
<path
130+
d="M48.4 26.5c-.9 0-1.7.7-1.7 1.7v11.6h-43.3v-11.6c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v13.2c0 .9.7 1.7 1.7 1.7h46.7c.9 0 1.7-.7 1.7-1.7v-13.2c0-1-.7-1.7-1.7-1.7zm-24.5 6.1c.3.3.8.5 1.2.5.4 0 .9-.2 1.2-.5l10-11.6c.7-.7.7-1.7 0-2.4s-1.7-.7-2.4 0l-7.1 8.3v-25.3c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v25.3l-7.1-8.3c-.7-.7-1.7-.7-2.4 0s-.7 1.7 0 2.4l10 11.6z"
131+
/>
116132
</svg>
117133

118134
<input id="file-v1" type="file" class="file" />
@@ -124,8 +140,16 @@ <h2>V1 Intel Hex</h2>
124140

125141
<div id="drop-v2" class="drop">
126142
<h2>V2 Intel Hex</h2>
127-
<svg id="icon-v2" xmlns="http://www.w3.org/2000/svg" width="50" height="43" viewBox="0 0 50 43">
128-
<path d="M48.4 26.5c-.9 0-1.7.7-1.7 1.7v11.6h-43.3v-11.6c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v13.2c0 .9.7 1.7 1.7 1.7h46.7c.9 0 1.7-.7 1.7-1.7v-13.2c0-1-.7-1.7-1.7-1.7zm-24.5 6.1c.3.3.8.5 1.2.5.4 0 .9-.2 1.2-.5l10-11.6c.7-.7.7-1.7 0-2.4s-1.7-.7-2.4 0l-7.1 8.3v-25.3c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v25.3l-7.1-8.3c-.7-.7-1.7-.7-2.4 0s-.7 1.7 0 2.4l10 11.6z" />
143+
<svg
144+
id="icon-v2"
145+
xmlns="http://www.w3.org/2000/svg"
146+
width="50"
147+
height="43"
148+
viewBox="0 0 50 43"
149+
>
150+
<path
151+
d="M48.4 26.5c-.9 0-1.7.7-1.7 1.7v11.6h-43.3v-11.6c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v13.2c0 .9.7 1.7 1.7 1.7h46.7c.9 0 1.7-.7 1.7-1.7v-13.2c0-1-.7-1.7-1.7-1.7zm-24.5 6.1c.3.3.8.5 1.2.5.4 0 .9-.2 1.2-.5l10-11.6c.7-.7.7-1.7 0-2.4s-1.7-.7-2.4 0l-7.1 8.3v-25.3c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v25.3l-7.1-8.3c-.7-.7-1.7-.7-2.4 0s-.7 1.7 0 2.4l10 11.6z"
152+
/>
129153
</svg>
130154

131155
<input id="file-v2" type="file" class="file" />
@@ -170,7 +194,7 @@ <h2>V2 Intel Hex</h2>
170194
console.log(v2HexStr);
171195
document.getElementById('label-v2').textContent =
172196
'File "' + file.name + '" loaded';
173-
document.getElementById('icon-v2').style.display = 'none';
197+
document.getElementById('icon-v2').style.display = 'none';
174198
};
175199
reader.readAsText(file);
176200
};
@@ -248,13 +272,16 @@ <h2>V2 Intel Hex</h2>
248272
return alert(errorMsg);
249273
}
250274
try {
251-
let universalHex = microbitUh.createUniversalHex([{
275+
let universalHex = microbitUh.createUniversalHex([
276+
{
252277
hex: v1HexStr,
253278
boardId: 0x9900,
254-
}, {
279+
},
280+
{
255281
hex: v2HexStr,
256282
boardId: 0x9903,
257-
}]);
283+
},
284+
]);
258285
downloadTextFile('universal-hex.hex', universalHex);
259286
} catch (e) {
260287
alert(e);

eslint.config.mjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import globals from "globals";
2-
import pluginJs from "@eslint/js";
3-
import tseslint from "typescript-eslint";
1+
import globals from 'globals';
2+
import pluginJs from '@eslint/js';
3+
import tseslint from 'typescript-eslint';
44

55
/** @type {import('eslint').Linter.Config[]} */
66
export default [
7-
{ ignores: ["docs", "coverage", "dist", "src/types"] },
8-
{ files: ["**/*.{js,mjs,cjs,ts}"] },
7+
{ ignores: ['docs', 'coverage', 'dist', 'src/types'] },
8+
{ files: ['**/*.{js,mjs,cjs,ts}'] },
99
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
1010
pluginJs.configs.recommended,
1111
...tseslint.configs.recommended,
1212
{
1313
rules: {
14-
"@typescript-eslint/ban-ts-comment": "off",
15-
"no-prototype-builtins": "off",
14+
'@typescript-eslint/ban-ts-comment': 'off',
15+
'no-prototype-builtins': 'off',
1616
},
1717
},
1818
];

0 commit comments

Comments
 (0)