diff options
| author | Uri Shaked | 2021-08-15 19:49:16 +0300 |
|---|---|---|
| committer | Uri Shaked | 2021-08-15 19:49:16 +0300 |
| commit | 3245a950539f49186fefedf09477f014659fadd7 (patch) | |
| tree | 1f0b836e06d13cb7cd6e7698c132c5a6283075c7 | |
| parent | 0.16.6 (diff) | |
| download | avr8js-3245a950539f49186fefedf09477f014659fadd7.tar.gz avr8js-3245a950539f49186fefedf09477f014659fadd7.tar.bz2 avr8js-3245a950539f49186fefedf09477f014659fadd7.zip | |
chore(deps): prettier 2.3.2
also reformat all the code with the new version
Diffstat (limited to '')
| -rw-r--r-- | benchmark/benchmark.ts | 2 | ||||
| -rw-r--r-- | benchmark/convert-instructions.ts | 9 | ||||
| -rw-r--r-- | package-lock.json | 30 | ||||
| -rw-r--r-- | package.json | 4 | ||||
| -rw-r--r-- | src/peripherals/clock.ts | 18 |
5 files changed, 23 insertions, 40 deletions
diff --git a/benchmark/benchmark.ts b/benchmark/benchmark.ts index eecce31..b99aa06 100644 --- a/benchmark/benchmark.ts +++ b/benchmark/benchmark.ts @@ -102,7 +102,7 @@ export function createBenchmark(benchmarkName: string): Benchmark { return profile; } as Benchmark; - benchmark.report = function(fn?: (report: string) => void) { + benchmark.report = function (fn?: (report: string) => void) { const fastest = profiles.reduce((previous: Profile, current: Profile) => { return previous.bestTime < current.bestTime ? previous : current; }); diff --git a/benchmark/convert-instructions.ts b/benchmark/convert-instructions.ts index 9ddd058..edde3cc 100644 --- a/benchmark/convert-instructions.ts +++ b/benchmark/convert-instructions.ts @@ -28,10 +28,7 @@ function isTwoWordInstruction(opcode: number) { const patternToFn: Array<[string, string]> = []; for (const line of input.split('\n')) { if (line.startsWith(' /* ') && line.includes(', ')) { - currentInstruction = line - .trim() - .split(',')[0] - .split(' ')[1]; + currentInstruction = line.trim().split(',')[0].split(' ')[1]; fnBody = ''; pattern = line.split(',')[1].split('*')[0]; console.log(currentInstruction); @@ -75,9 +72,9 @@ export function executeInstruction(idx: number, cpu: ICPU, opcode: number) { const formattedOutput = prettier.format(output, { // eslint-disable-next-line @typescript-eslint/no-explicit-any ...(prettierOptions as any), - parser: 'babel' + parser: 'babel', }); fs.writeFileSync('benchmark/instruction-fn.ts', formattedOutput, { - encoding: 'utf-8' + encoding: 'utf-8', }); diff --git a/package-lock.json b/package-lock.json index c0da0db..8232d6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2323,9 +2323,9 @@ "dev": true }, "@types/prettier": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.0.2.tgz", - "integrity": "sha512-IkVfat549ggtkZUthUzEX49562eGikhSYeVGX97SkMFn+sTZrgRewXjQ4tPKFPCykZHkX1Zfd9OoELGqKU2jJA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog==", "dev": true }, "@types/q": { @@ -5997,9 +5997,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -9795,9 +9795,9 @@ "dev": true }, "ws": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", - "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", + "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", "dev": true } } @@ -11352,9 +11352,9 @@ "dev": true }, "postcss": { - "version": "7.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.23.tgz", - "integrity": "sha512-hOlMf3ouRIFXD+j2VJecwssTwbvsPGJVMzupptg+85WA+i7MwyrydmQAgY3R+m0Bc0exunhbJmijy8u8+vufuQ==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -11883,9 +11883,9 @@ "dev": true }, "prettier": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz", - "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==", "dev": true }, "prettier-linter-helpers": { diff --git a/package.json b/package.json index 98f1af4..0935e6e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "devDependencies": { "@types/jest": "^26.0.4", "@types/node": "^12.12.50", - "@types/prettier": "^2.0.2", + "@types/prettier": "^2.3.2", "@typescript-eslint/eslint-plugin": "^2.34.0", "@typescript-eslint/parser": "^2.34.0", "@wokwi/elements": "^0.16.2", @@ -51,7 +51,7 @@ "jest": "^26.1.0", "lint-staged": "^9.5.0", "parcel-bundler": "^1.12.4", - "prettier": "^2.0.0", + "prettier": "^2.3.2", "rimraf": "^3.0.2", "ts-jest": "^26.1.2", "ts-node": "^8.10.2", diff --git a/src/peripherals/clock.ts b/src/peripherals/clock.ts index 1dbf4ba..d443843 100644 --- a/src/peripherals/clock.ts +++ b/src/peripherals/clock.ts @@ -20,25 +20,11 @@ export const clockConfig: AVRClockConfig = { }; const prescalers = [ - 1, - 2, - 4, - 8, - 16, - 32, - 64, - 128, - 256, + 1, 2, 4, 8, 16, 32, 64, 128, 256, // The following values are "reserved" according to the datasheet, so we measured // with a scope to figure them out (on ATmega328p) - 2, - 4, - 8, - 16, - 32, - 64, - 128, + 2, 4, 8, 16, 32, 64, 128, ]; export class AVRClock { |
