Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert project to TypeScript #146

Merged
merged 46 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
61e9e9b
Convert project to TypeScript
adroitwhiz Mar 8, 2023
1386a50
Specify function return types
adroitwhiz Mar 8, 2023
93d85d4
Assume Sprite._project exists always
adroitwhiz Mar 8, 2023
6c65e52
Remove ".js" suffix from imports
adroitwhiz Mar 8, 2023
96e0618
Add visibility modifiers to all class members
adroitwhiz Mar 8, 2023
831adc8
Add effect properties to AudioEffectMap
adroitwhiz Mar 8, 2023
a52fa20
Remove ESLint comment from abstract method
adroitwhiz Mar 8, 2023
72ec69c
Port toBoolean + compare to TypeScript
adroitwhiz Mar 8, 2023
81c8dee
Fix edge-activated trigger handling
adroitwhiz Mar 8, 2023
b8b8b5e
Clean up _startTriggers
adroitwhiz Mar 8, 2023
96a3558
Change spritesAndStage signature
adroitwhiz Mar 8, 2023
f47427c
Whitespace tweak in Input
adroitwhiz Mar 8, 2023
45933eb
Unify constructor param types
adroitwhiz Mar 8, 2023
1d9cc7f
Clarify _getSkin signature
adroitwhiz Mar 8, 2023
5cdab2a
Swap _setShader if/else
adroitwhiz Mar 8, 2023
265aacd
Replace typeof with truthiness check
adroitwhiz Mar 8, 2023
8646b8a
Make createStage private and static
adroitwhiz Mar 8, 2023
e570ca4
export RGBA/RGBANormalized types
adroitwhiz Mar 8, 2023
6b4ef48
Allow checkPointCollision for Stage
adroitwhiz Mar 8, 2023
4fcebf7
Be more consistent with Sound field types
adroitwhiz Mar 8, 2023
59ae16c
Clean up effect descriptor types + docs
adroitwhiz Mar 8, 2023
b788412
Remove EffectChain.config
adroitwhiz Mar 8, 2023
d761d12
Remove "infer" from effectNodes type
adroitwhiz Mar 8, 2023
f7c35ac
Move Trigger symbols to Trigger class
adroitwhiz Mar 8, 2023
d1ae3f6
Fix "as never" cast
adroitwhiz Mar 8, 2023
c6d1337
Remove boundScript
adroitwhiz Mar 8, 2023
a2dfc90
Remove vars default parameter
adroitwhiz Mar 8, 2023
c51ff88
Override Stage costumeNumber
adroitwhiz Mar 8, 2023
1c94a37
Make costumeNumber match Scratch
adroitwhiz Mar 8, 2023
2855921
Override askAndWait
adroitwhiz Mar 8, 2023
2f13eb2
Remove TODO
adroitwhiz Mar 8, 2023
eb595d1
Type moveAhead/moveBehind better
adroitwhiz Mar 8, 2023
31bff82
Add extra _speechBubble check to fix typing
adroitwhiz Mar 8, 2023
b2aaf79
Document getTexture/getImageData
adroitwhiz Mar 8, 2023
d833ef6
Add flipped getter
adroitwhiz Mar 8, 2023
f347797
SpeechBubbleStyle type
adroitwhiz Mar 8, 2023
30b1a73
Fix unnecessary initialized assertions
adroitwhiz Mar 8, 2023
160bb9e
Fix watcher min/max/step init
adroitwhiz Mar 8, 2023
334e830
Move filter param
adroitwhiz Mar 8, 2023
24f897c
Make _project and _layerOrder protected
adroitwhiz Mar 8, 2023
0bbab06
Remove vars type parameter
adroitwhiz Mar 9, 2023
df94506
Make clone methods return subclass type
adroitwhiz Mar 9, 2023
10ff7c5
Remove unnecessary instanceof
adroitwhiz Mar 9, 2023
61a7c09
Format + lint
adroitwhiz Mar 9, 2023
9c29df5
Fix Sound.clone
adroitwhiz Mar 9, 2023
4ccf1b2
Bump Node to 18
adroitwhiz Mar 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,38 @@
"ecmaVersion": 9,
"sourceType": "module"
},
"plugins": ["prettier"],
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"plugin:prettier/recommended"
],
"env": {
"browser": true,
"es6": true
},
"rules": {
"no-console": ["warn", {"allow": ["warn", "error"]}]
}
},
"overrides": [
{
"files": ["src/**/*"],
"parserOptions": {
"parser": "@typescript-eslint/parser",
"project": "./tsconfig.json"
},
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"env": {
"browser": true
},
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/prefer-return-this-type": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}]
}
}
]
}
4 changes: 2 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 16
# node-version: 18
# - run: npm ci
# - run: npm test

Expand All @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
Expand Down
Loading