Fiddle with prettier

This commit is contained in:
Will Scullin 2023-12-18 12:04:20 -08:00
parent 52b75485c5
commit 64f2a95759
No known key found for this signature in database
GPG Key ID: 26DCD1042C6638CD
16 changed files with 32 additions and 25 deletions

5
.prettierrc Normal file
View File

@ -0,0 +1,5 @@
{
"bracketSpacing": false,
"semi": true,
"singleQuote": true
}

View File

@ -12,11 +12,11 @@
import MicroModal from 'micromodal';
import Apple1IO from './apple1io';
import { CPU6502, word, byte } from '@whscullin/cpu6502';
import {CPU6502, word, byte} from '@whscullin/cpu6502';
import Prefs from './prefs';
import RAM from './ram';
import { TextPage } from './canvas1';
import { debug, hup } from './util';
import {TextPage} from './canvas1';
import {debug, hup} from './util';
import Basic from './roms/basic';
import Bios from './roms/bios';
@ -24,7 +24,7 @@ import Krusader from './roms/krusader';
import ACI from './cards/aci';
import { mapKeyEvent, KeyBoard } from './ui/keyboard';
import {mapKeyEvent, KeyBoard} from './ui/keyboard';
// eslint-disable-next-line prefer-const
let DEBUG = false;
@ -272,7 +272,8 @@ declare global {
let _key: byte;
function _keydown(evt: KeyboardEvent) {
const F1 = 112, F2 = 113;
const F1 = 112,
F2 = 113;
if (evt.keyCode === F1) {
cpu.reset();
} else if (evt.keyCode === F2) {

View File

@ -9,8 +9,8 @@
* implied warranty.
*/
import { TextPage } from './canvas1';
import type { byte } from '@whscullin/cpu6502';
import {TextPage} from './canvas1';
import type {byte} from '@whscullin/cpu6502';
const LOC = {
KBD: 0x10,

View File

@ -1,4 +1,4 @@
import { memory } from '@whscullin/cpu6502';
import {memory} from '@whscullin/cpu6502';
const B64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';

View File

@ -9,8 +9,8 @@
* implied warranty.
*/
import { charset } from './roms/apple1char';
import type { byte } from '@whscullin/cpu6502';
import {charset} from './roms/apple1char';
import type {byte} from '@whscullin/cpu6502';
/*
0: A9 9 AA 20 EF FF E8 8A 4C 2 0

View File

@ -1,5 +1,5 @@
import { CPU6502, byte } from '@whscullin/cpu6502';
import { debug } from '../util';
import {CPU6502, byte} from '@whscullin/cpu6502';
import {debug} from '../util';
// prettier-ignore
const rom = [

View File

@ -1,3 +1,3 @@
import * as Apple1 from "./apple1";
import * as Apple1 from './apple1';
window.Apple1 = Apple1;

View File

@ -9,9 +9,9 @@
* implied warranty.
*/
import { base64_decode, base64_encode } from './base64';
import { allocMemPages } from './util';
import type { byte, memory } from '@whscullin/cpu6502';
import {base64_decode, base64_encode} from './base64';
import {allocMemPages} from './util';
import type {byte, memory} from '@whscullin/cpu6502';
export interface RAMState {
start: byte;

View File

@ -1,4 +1,4 @@
import { byte } from '@whscullin/cpu6502';
import {byte} from '@whscullin/cpu6502';
export default class Basic {
ram = [

View File

@ -1,4 +1,4 @@
import { byte } from '@whscullin/cpu6502';
import {byte} from '@whscullin/cpu6502';
export default class Bios {
rom = [

View File

@ -1,4 +1,4 @@
import { byte } from '@whscullin/cpu6502';
import {byte} from '@whscullin/cpu6502';
export default class EnhancedBasic {
rom = [

View File

@ -1,4 +1,4 @@
import { byte } from '@whscullin/cpu6502';
import {byte} from '@whscullin/cpu6502';
export default class Krusader {
rom = [

View File

@ -9,7 +9,7 @@
* implied warranty.
*/
import type { word } from '@whscullin/cpu6502';
import type {word} from '@whscullin/cpu6502';
export const SYMBOLS: Record<word, string> = {
0xd010: 'KBD',

View File

@ -9,10 +9,10 @@
* implied warranty.
*/
import { CPU6502, byte } from '@whscullin/cpu6502';
import { debug, toHex } from '../util';
import {CPU6502, byte} from '@whscullin/cpu6502';
import {debug, toHex} from '../util';
import Apple1IO from 'js/apple1io';
import { TextPage } from 'js/canvas1';
import {TextPage} from 'js/canvas1';
// keycode: [plain, cntl, shift]

View File

@ -9,7 +9,7 @@
* implied warranty.
*/
import { byte, word } from '@whscullin/cpu6502';
import {byte, word} from '@whscullin/cpu6502';
const hex_digits = '0123456789ABCDEF';
const bin_digits = '01';

View File

@ -7,6 +7,7 @@
"build": "webpack --mode=production",
"dev": "webpack-dev-server",
"lint": "eslint js",
"lint-fix": "eslint --fix js",
"start": "webpack-dev-server",
"test": "jest"
},