mirror of
https://github.com/whscullin/apple1js.git
synced 2024-09-07 10:54:29 +00:00
Merge pull request #46 from whscullin/whscullin/prettier-tweaks
Fiddle with prettier
This commit is contained in:
commit
e860001ea9
5
.prettierrc
Normal file
5
.prettierrc
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"bracketSpacing": false,
|
||||
"semi": true,
|
||||
"singleQuote": true
|
||||
}
|
11
js/apple1.ts
11
js/apple1.ts
@ -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) {
|
||||
|
@ -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,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { memory } from '@whscullin/cpu6502';
|
||||
import {memory} from '@whscullin/cpu6502';
|
||||
|
||||
const B64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 = [
|
||||
|
@ -1,3 +1,3 @@
|
||||
import * as Apple1 from "./apple1";
|
||||
import * as Apple1 from './apple1';
|
||||
|
||||
window.Apple1 = Apple1;
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { byte } from '@whscullin/cpu6502';
|
||||
import {byte} from '@whscullin/cpu6502';
|
||||
|
||||
export default class Basic {
|
||||
ram = [
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { byte } from '@whscullin/cpu6502';
|
||||
import {byte} from '@whscullin/cpu6502';
|
||||
|
||||
export default class Bios {
|
||||
rom = [
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { byte } from '@whscullin/cpu6502';
|
||||
import {byte} from '@whscullin/cpu6502';
|
||||
|
||||
export default class EnhancedBasic {
|
||||
rom = [
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { byte } from '@whscullin/cpu6502';
|
||||
import {byte} from '@whscullin/cpu6502';
|
||||
|
||||
export default class Krusader {
|
||||
rom = [
|
||||
|
@ -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',
|
||||
|
@ -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]
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user