From 624459c31590b74439c922091f03bca0dc048a6d Mon Sep 17 00:00:00 2001 From: Lance Pollard Date: Tue, 17 Sep 2024 04:59:33 -0700 Subject: [PATCH] update --- .eslintrc.json | 29 ++++++++++++++++++++--------- index.ts | 4 +++- package.json | 6 +++--- test.ts | 6 +++--- tsconfig.json | 2 +- 5 files changed, 30 insertions(+), 17 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index f8139e9..2dea750 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,7 +9,15 @@ "project": ["./tsconfig.json"] }, "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint", "import", "simple-import-sort", "sort-exports", "typescript-sort-keys", "sort-keys", "prettier"], + "plugins": [ + "@typescript-eslint", + "import", + "simple-import-sort", + "sort-exports", + "typescript-sort-keys", + "sort-keys", + "prettier" + ], "extends": ["prettier"], "rules": { "curly": 2, @@ -64,18 +72,21 @@ ], "space-before-blocks": "off", "@typescript-eslint/space-before-blocks": ["error", "always"], - "@typescript-eslint/type-annotation-spacing": ["error", { "after": true }], + "@typescript-eslint/type-annotation-spacing": [ + "error", + { "after": true } + ], "import/first": "error", "import/newline-after-import": "error", "import/no-duplicates": "error", - "sort-exports/sort-exports": ["error", { "sortDir": "asc" }], - "typescript-sort-keys/interface": "error", - "typescript-sort-keys/string-enum": "error", - "sort-keys": 0, - "sort-keys/sort-keys-fix": 2, + "sort-exports/sort-exports": ["off", { "sortDir": "asc" }], + "typescript-sort-keys/interface": "off", + "typescript-sort-keys/string-enum": "off", + "sort-keys": "off", + "sort-keys/sort-keys-fix": "off", "prettier/prettier": 2, "@typescript-eslint/no-unused-vars": "off", - "default-case": "error", - "default-case-last": "error" + "default-case": "off", + "default-case-last": "off" } } diff --git a/index.ts b/index.ts index 0e04ec7..db58e7b 100644 --- a/index.ts +++ b/index.ts @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ import st from '@lancejpollard/script-tree' const D: Record = { @@ -403,7 +405,7 @@ export const numerals = [ export const symbols = [...vowels, ...consonants, ...numerals] -const tree = st.fork(symbols) as any +const tree = st.fork(symbols) const make = (text: string) => st.form(text, tree) as string export default make diff --git a/package.json b/package.json index f7f3bf9..904e6b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@termsurf/tone", - "version": "3.2.0", + "version": "3.3.0", "main": "./host/index.js", "license": "MIT", "dependencies": { @@ -45,14 +45,14 @@ "webpack-cli": "^5.1.4" }, "scripts": { - "make": "tsc && tsc-alias", + "toss": "rm -rf host", + "make": "pnpm toss && tsc && tsc-alias", "make:1": "webpack", "make:keyboard:code": "tsx text/keyboard", "make:keyboard:kmn": "cd text/keyboard && kmc build --color --debug tone.kmn", "make:keyboard:kps": "cd text/keyboard && kmc build --color --debug tone.kps -o tone.kmp", "make:keyboard": "pnpm make:keyboard:code && pnpm make:keyboard:kmn && pnpm make:keyboard:kps", "make:keyboard:windows": "pnpm make:keyboard:code && cd text/keyboard && kmc build --color windows-package-installer", - "move": "pnpm make && git add . && git commit -am 'save' && npm version patch && pnpm host && git push", "scan": "concurrently --kill-others \"tsc -w\" \"tsc-alias -w\"", "lint": "eslint --ext .ts ./make", "lint:tool": "npm run lint -- --fix", diff --git a/test.ts b/test.ts index 3537dfd..9a642e0 100644 --- a/test.ts +++ b/test.ts @@ -1,4 +1,4 @@ -import tone, { SYMBOLS } from './index.js' +import tone, { symbols } from './index.js' make('byu^dy') make('diU--U-m') @@ -28,9 +28,9 @@ make('ky~O!n') // make('suprkAlUfrAdjUlIstIkEkspiAlOdoxOs') // make('spri^qkl') -console.log(SYMBOLS) +console.log(symbols) function make(a: string) { console.log('text => ' + a) - console.log(' font => ' + tone.make(a)) + console.log(' font => ' + tone(a)) } diff --git a/tsconfig.json b/tsconfig.json index aafea22..a43286e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,6 +18,6 @@ "typeRoots": ["node_modules/@types"], "noImplicitAny": true }, - "include": [".", "package.d.ts"], + "include": ["*.ts", "package.d.ts"], "exclude": ["node_modules", "host"] }