Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

Commit 79aaa02

Browse files
authored
Typescript conversion (#79)
* Updated typedoc and fixed docs script * Changed typedoc entry point * WIP: Converted to typescript * WIP: Converted to typescript * Changed package lock script signature * Removed unused dependencies * Matched imported shared * Removed tslib dependency * Replaced options type with any for now * Fixed outstanding typescript errors * Removed confirm options * Fixed type exporting for typedoc * Reverted building with rollup for now * Reverted package updates and fixed typescript errors * Fixed building of types * Removed observer getter * Reverted changing deferred * Renamed eslint config to use mjs * Fixed all tests pass * Fixed lint issue * Updated CI to use node 18 * Updated CI * Added name back to CI * New line fix * Reverted types to keep same structure to not pollute dist directory * Fixed types footer * Added space in globals file
1 parent 5164983 commit 79aaa02

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+5585
-3297
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/node.js.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ on:
1111

1212
jobs:
1313
build:
14-
14+
name: Build
1515
runs-on: ubuntu-latest
1616

1717
strategy:
1818
matrix:
19-
node-version: [16.x]
19+
node-version: [18.x]
2020
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2121

2222
steps:
@@ -36,10 +36,10 @@ jobs:
3636
steps:
3737
- name: Checkout code
3838
uses: actions/checkout@v4
39-
- name: Setup Node.js 16.x
39+
- name: Setup Node.js 18.x
4040
uses: actions/setup-node@v4
4141
with:
42-
node-version: 16.x
42+
node-version: 18.x
4343
- name: Install dependencies
4444
run: npm ci
4545
- name: Run ESLint

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22
.npmrc
33
dist
4-
types
4+
docs
5+
/types

eslint.config.mjs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import playcanvasConfig from '@playcanvas/eslint-config';
2+
// eslint-disable-next-line import/no-unresolved
3+
import typescriptParser from '@typescript-eslint/parser';
4+
import globals from 'globals';
5+
6+
export default [
7+
...playcanvasConfig,
8+
{
9+
files: ['**/*.ts'],
10+
languageOptions: {
11+
ecmaVersion: 2022,
12+
sourceType: 'module',
13+
parser: typescriptParser,
14+
parserOptions: {
15+
requireConfigFile: false
16+
},
17+
globals: {
18+
...globals.browser,
19+
...globals.mocha,
20+
...globals.node
21+
}
22+
},
23+
rules: {
24+
'jsdoc/require-jsdoc': 'off',
25+
'jsdoc/require-param': 'off',
26+
'jsdoc/require-param-type': 'off',
27+
'jsdoc/require-returns': 'off',
28+
'no-use-before-define': 'off'
29+
}
30+
},
31+
{
32+
settings: {
33+
'import/resolver': {
34+
node: {
35+
extensions: ['.js', '.ts', '.mjs']
36+
}
37+
}
38+
}
39+
},
40+
{
41+
files: ['test/**/*.mjs'],
42+
rules: {
43+
'no-unused-expressions': 'off',
44+
'prefer-arrow-callback': 'off' // Mocha uses function callbacks
45+
}
46+
},
47+
{
48+
ignores: [
49+
'dist/**',
50+
'test/**'
51+
]
52+
}
53+
];

0 commit comments

Comments
 (0)