jkomoros / card-web

The web app behind thecompendium.cards
Apache License 2.0
46 stars 8 forks source link

Use TypeScript #601

Open jkomoros opened 2 years ago

jkomoros commented 2 years ago

https://www.typescriptlang.org/docs/handbook/migrating-from-javascript.html https://github.com/lit/lit-element-starter-ts

jkomoros commented 2 years ago
jkomoros commented 2 years ago

Move all js to ts (including config.secret.json generation), have a git_ignore of src/**.js,

Re copy config.SECRET.json .

Don't have tsc inline files in src (that's super-confusing/messy), just have it in build_ts/

Make sure npm run build works (even if you haven't done npm run serve)

Get eslint errors suprressed in generated files in src/

jkomoros commented 2 years ago

Bug introduced in: b842b0b6241abcb3b98d0923804c2483b384e981


    at makeFilterFromConfigurableFilter (collection_description.ts:517:44)
    at filterSetForFilterDefinitionItem (collection_description.ts:582:10)
    at combinedFilterForFilterDefinition (collection_description.ts:629:57)
    at Collection._makeFilteredCards (collection_description.ts:742:57)
    at Collection._ensureFilteredCards (collection_description.ts:757:30)
    at get filteredCards [as filteredCards] (collection_description.ts:784:8)
    at ReferenceBlock._shouldHide (reference-block.ts:86:48)
    at ReferenceBlock.render (reference-block.ts:73:12)
    at ReferenceBlock.update (lit-element.ts:160:24)
    at ReferenceBlock.performUpdate (reactive-element.ts:1303:14)```
jkomoros commented 2 years ago

Deploys broken with error deploying functions:

Oops! Something went wrong! :(

ESLint: 4.19.1.
ESLint couldn't find the plugin "eslint-plugin-@typescript-eslint". This can happen for a couple different reasons:

1. If ESLint is installed globally, then make sure eslint-plugin-@typescript-eslint is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.

2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm i eslint-plugin-@typescript-eslint@latest --save-dev

If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.