Skip to content

Commit 3245a95

Browse files
committed
chore(deps): prettier 2.3.2
also reformat all the code with the new version
1 parent 84774ad commit 3245a95

File tree

5 files changed

+23
-40
lines changed

5 files changed

+23
-40
lines changed

benchmark/benchmark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function createBenchmark(benchmarkName: string): Benchmark {
102102
return profile;
103103
} as Benchmark;
104104

105-
benchmark.report = function(fn?: (report: string) => void) {
105+
benchmark.report = function (fn?: (report: string) => void) {
106106
const fastest = profiles.reduce((previous: Profile, current: Profile) => {
107107
return previous.bestTime < current.bestTime ? previous : current;
108108
});

benchmark/convert-instructions.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ function isTwoWordInstruction(opcode: number) {
2828
const patternToFn: Array<[string, string]> = [];
2929
for (const line of input.split('\n')) {
3030
if (line.startsWith(' /* ') && line.includes(', ')) {
31-
currentInstruction = line
32-
.trim()
33-
.split(',')[0]
34-
.split(' ')[1];
31+
currentInstruction = line.trim().split(',')[0].split(' ')[1];
3532
fnBody = '';
3633
pattern = line.split(',')[1].split('*')[0];
3734
console.log(currentInstruction);
@@ -75,9 +72,9 @@ export function executeInstruction(idx: number, cpu: ICPU, opcode: number) {
7572
const formattedOutput = prettier.format(output, {
7673
// eslint-disable-next-line @typescript-eslint/no-explicit-any
7774
...(prettierOptions as any),
78-
parser: 'babel'
75+
parser: 'babel',
7976
});
8077

8178
fs.writeFileSync('benchmark/instruction-fn.ts', formattedOutput, {
82-
encoding: 'utf-8'
79+
encoding: 'utf-8',
8380
});

package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"devDependencies": {
3838
"@types/jest": "^26.0.4",
3939
"@types/node": "^12.12.50",
40-
"@types/prettier": "^2.0.2",
40+
"@types/prettier": "^2.3.2",
4141
"@typescript-eslint/eslint-plugin": "^2.34.0",
4242
"@typescript-eslint/parser": "^2.34.0",
4343
"@wokwi/elements": "^0.16.2",
@@ -51,7 +51,7 @@
5151
"jest": "^26.1.0",
5252
"lint-staged": "^9.5.0",
5353
"parcel-bundler": "^1.12.4",
54-
"prettier": "^2.0.0",
54+
"prettier": "^2.3.2",
5555
"rimraf": "^3.0.2",
5656
"ts-jest": "^26.1.2",
5757
"ts-node": "^8.10.2",

src/peripherals/clock.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,11 @@ export const clockConfig: AVRClockConfig = {
2020
};
2121

2222
const prescalers = [
23-
1,
24-
2,
25-
4,
26-
8,
27-
16,
28-
32,
29-
64,
30-
128,
31-
256,
23+
1, 2, 4, 8, 16, 32, 64, 128, 256,
3224

3325
// The following values are "reserved" according to the datasheet, so we measured
3426
// with a scope to figure them out (on ATmega328p)
35-
2,
36-
4,
37-
8,
38-
16,
39-
32,
40-
64,
41-
128,
27+
2, 4, 8, 16, 32, 64, 128,
4228
];
4329

4430
export class AVRClock {

0 commit comments

Comments
 (0)