Skip to content

Commit

Permalink
Move Prettier conf to package.json, clean TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
retrixe committed Nov 5, 2024
1 parent b29ad69 commit 24f020f
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 37 deletions.
8 changes: 0 additions & 8 deletions .prettierrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# LOW-TODO: Remove this file once workaround is no longer needed.
# TODO: Remove this file once workaround is no longer needed.
compressionLevel: mixed
enableGlobalCache: false
packageExtensions:
Expand Down
6 changes: 1 addition & 5 deletions app/dd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -84,10 +83,7 @@ func FlashFileToBlockDevice(iff string, of string) {
} else if destStat.Mode().IsDir() {
log.Fatalln("The specified destination is a directory!")
}
bs := 4096
if runtime.GOOS == "windows" {
bs = 512 // TODO: Is this true?
}
bs := 4 * 1024 * 1024 // TODO: Allow configurability?
timer := time.NewTimer(time.Second)
startTime := time.Now().UnixMilli()
var total int
Expand Down
2 changes: 1 addition & 1 deletion app/devices_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ func UnmountDevice(device string) error {
} else if stat.Mode().Type()&fs.ModeDevice == 0 {
return ErrNotBlockDevice
}
// TODO: Discover device partitions and recursively unmount them.
// FIXME: Discover device partitions and recursively unmount them.
return nil
}
2 changes: 1 addition & 1 deletion app/devices_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ func UnmountDevice(device string) error {
} else if stat.Mode().Type()&fs.ModeDevice == 0 {
return ErrNotBlockDevice
}
// TODO: Discover device partitions and recursively unmount them.
// FIXME: Discover device partitions and recursively unmount them.
return nil
}
2 changes: 1 addition & 1 deletion app/devices_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ func UnmountDevice(device string) error {
} else if stat.Mode().Type()&fs.ModeDevice == 0 {
return ErrNotBlockDevice
}
// TODO: Discover device partitions and recursively unmount them.
// FIXME: Discover device partitions and recursively unmount them.
return nil
}
2 changes: 1 addition & 1 deletion app/execdd.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func CopyConvert(iff string, of string) (chan DdProgress, io.WriteCloser, error)
lastLine = text
firstSpace := strings.Index(text, " ")
if firstSpace != -1 && strings.HasPrefix(text[firstSpace+1:], "bytes (") {
// LOW-TODO: Probably handle error, but we can't tell full dd behavior without seeing the code.
// TODO: Probably handle error, but we can't tell full dd behavior without seeing the code.
// Well, custom dd is the default now anyways.
bytes, _ := strconv.Atoi(text[:firstSpace])
split := strings.Split(text, ", ")
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
webview "github.com/webview/webview_go"
)

// TODO: Design UI (with live warnings/errors).
// TODO: Validate written image.
// LOW-TODO: Future support for flashing to an internal drive?
// FIXME: Design UI (with live warnings/errors).
// FIXME: Validate written image.
// TODO: Future support for flashing to an internal drive?

const version = "1.0.0-alpha.2"

Expand Down
36 changes: 22 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@
"author": "retrixe",
"license": "Apache-2.0",
"private": true,
"engines": {
"browsers": "ie >= 9"
},
"output": "dist/index.js",
"targets": {
"output": {
"context": "browser",
"outputFormat": "global",
"sourceMap": {
"inline": true,
"inlineSources": true
}
}
},
"scripts": {
"lint": "eslint . && tsc --noEmit",
"dev": "parcel renderer/index.html & go run -ldflags=\"-s -w -X main.overrideUrl=http://localhost:1234/\" . & echo Starting...",
Expand Down Expand Up @@ -64,5 +50,27 @@
"process": "^0.11.10",
"run-script-os": "^1.1.6",
"typescript": "^5.6.3"
},
"engines": {
"browsers": "ie >= 9"
},
"output": "dist/index.js",
"targets": {
"output": {
"context": "browser",
"outputFormat": "global",
"sourceMap": {
"inline": true,
"inlineSources": true
}
}
},
"prettier": {
"printWidth": 100,
"arrowParens": "avoid",
"singleQuote": true,
"jsxSingleQuote": true,
"semi": false,
"endOfLine": "auto"
}
}
2 changes: 1 addition & 1 deletion renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const App = (): JSX.Element => {
useEffect(() => setConfirm(false), [inProgress])
const onFlashButtonClick = (): void => {
if (inProgress) {
// TODO: A dialog would be better.
// FIXME: A dialog would be better.
if (confirm) {
setConfirm(false)
globalThis.cancelFlash()
Expand Down
2 changes: 1 addition & 1 deletion renderer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ declare global {
var setSelectedDeviceReact: (selectedDevice: string) => void
} /* eslint-enable no-var */

// LOW-TODO: Use SWC Emotion plugin in future once Parcel reads .swcrc files...
// TODO: Use SWC Emotion plugin in future once Parcel reads .swcrc files...
const el = document.getElementById('app')
if (el !== null) {
createRoot(el).render(<App />)
Expand Down

0 comments on commit 24f020f

Please sign in to comment.