Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 6 additions & 20 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import playcanvasConfig from '@playcanvas/eslint-config';
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import typescriptConfig from '@playcanvas/eslint-config/typescript';
import globals from 'globals';

export default [
...playcanvasConfig,
...typescriptConfig,
{
files: ['examples/js/**/*.mjs', 'examples/assets/scripts/**/*.mjs'],
languageOptions: {
Expand All @@ -16,29 +14,17 @@ export default [
{
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
globals: {
...globals.browser,
AddEventListenerOptions: "readonly",
EventListener: "readonly",
EventListenerOptions: "readonly"
}
},
plugins: {
'@typescript-eslint': tsPlugin
},
settings: {
'import/resolver': {
typescript: {}
AddEventListenerOptions: 'readonly',
EventListener: 'readonly',
EventListenerOptions: 'readonly'
}
},
rules: {
...tsPlugin.configs['recommended'].rules,
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'jsdoc/require-param-type': 'off',
'jsdoc/require-returns-type': 'off'
'@typescript-eslint/no-unused-vars': 'off'
}
}
];
2 changes: 1 addition & 1 deletion examples/assets/scripts/tweener.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
};

/** @interface */
class TweenDescriptor { /* eslint-disable-line no-unused-vars */
class TweenDescriptor {

Check failure on line 27 in examples/assets/scripts/tweener.mjs

View workflow job for this annotation

GitHub Actions / lint

'TweenDescriptor' is defined but never used. Allowed unused vars must match /^_/u
/**
* Path to the property to tween
* @type {string}
Expand Down
2 changes: 1 addition & 1 deletion examples/js/browser.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,5 @@

// Initialize the browser when the DOM is ready
document.addEventListener('DOMContentLoaded', () => {
const browser = new ExampleBrowser(); /* eslint-disable-line no-unused-vars */
const browser = new ExampleBrowser();

Check failure on line 144 in examples/js/browser.mjs

View workflow job for this annotation

GitHub Actions / lint

'browser' is assigned a value but never used. Allowed unused vars must match /^_/u
});
2 changes: 1 addition & 1 deletion examples/js/example.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

// Add MiniStats if query parameter is present
if (new URLSearchParams(window.location.search).has('ministats')) {
/* eslint-disable-next-line no-unused-vars */
const stats = new MiniStats(app);

Check failure on line 11 in examples/js/example.mjs

View workflow job for this annotation

GitHub Actions / lint

'stats' is assigned a value but never used. Allowed unused vars must match /^_/u
}

// Check if this example supports XR
Expand Down
Loading
Loading