Skip to content

Commit

Permalink
Fixed typing and eslint for ESM scripts (#7288)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpal81xd authored Jan 16, 2025
1 parent 39c1419 commit 6143472
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export default [
{
files: ['scripts/**/*.mjs'],
rules: {
'jsdoc/no-defaults': 'off' // Attributes use default values
'jsdoc/no-defaults': 'off', // Attributes use default values
'import/no-unresolved': 'off' // PlayCanvas is not installed for scripts
}
},
{
Expand Down
1 change: 1 addition & 0 deletions playcanvas.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src/index';
1 change: 0 additions & 1 deletion scripts/esm/camera-controls.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable-next-line import/no-unresolved */
import { Vec2, Vec3, Ray, Plane, Mat4, Quat, Script, math } from 'playcanvas';

/** @import { AppBase, Entity, CameraComponent } from 'playcanvas' */
Expand Down
1 change: 0 additions & 1 deletion scripts/esm/first-person-controller.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable-next-line import/no-unresolved */
import { math, Script, Vec2, Vec3, Mat4 } from 'playcanvas';

/** @import { AppBase, GraphicsDevice, Entity, RigidBodyComponent } from 'playcanvas' */
Expand Down
1 change: 0 additions & 1 deletion scripts/esm/grid.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
Color,
Script,
Vec2
/* eslint-disable-next-line import/no-unresolved */
} from 'playcanvas';

/** @import { AppBase, Entity } from 'playcanvas' */
Expand Down
1 change: 0 additions & 1 deletion scripts/esm/xr-controllers.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable-next-line import/no-unresolved */
import { Script } from 'playcanvas';

export default class XrControllers extends Script {
Expand Down
1 change: 0 additions & 1 deletion scripts/esm/xr-navigation.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable-next-line import/no-unresolved */
import { Color, Script, Vec3 } from 'playcanvas';

/** @import { XrInputSource } from 'playcanvas' */
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
],
"readme": "none"
},
"include": ["src/**/*.js", "scripts/**/*.mjs", "rollup.config.mjs"],
"include": ["src/**/*.js", "scripts/**/*.mjs", "rollup.config.mjs", "playcanvas.d.ts"],
}

0 comments on commit 6143472

Please sign in to comment.