diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml index 7136e6e..c40a03c 100644 --- a/.github/codeql/codeql-config.yml +++ b/.github/codeql/codeql-config.yml @@ -2,4 +2,6 @@ name: "CodeQL config" paths-ignore: - "node_modules" - - "examples" \ No newline at end of file + - "examples" + - "docs" + - "packages" diff --git a/eslint.config.js b/eslint.config.js index 92c88d8..3e4fcb8 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,23 +1,38 @@ import js from '@eslint/js'; import tseslint from 'typescript-eslint'; +import stylistic from '@stylistic/eslint-plugin'; export default [ - { - files: ['**/*.{js,ts}'], - }, - { - ignores: ['dist', 'vite.config.js', 'examples', 'test', 'docs', 'packages'], - }, js.configs.recommended, ...tseslint.configs.strict, + stylistic.configs.customize({ + jsx: false, + semi: true, + commaDangle: 'never', + arrowParens: true, + braceStyle: '1tbs', + blockSpacing: true, + indent: 2, + quoteProps: 'as-needed', + quotes: 'single' + }), + { + ignores: ['dist', 'docs', 'packages'] + }, { rules: { + camelcase: 'warn', 'no-unused-vars': 'off', 'no-undef': 'off', + 'prefer-rest-params': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/no-empty-object-type': 'off', - '@typescript-eslint/no-wrapper-object-types': 'off' - }, - }, + '@typescript-eslint/no-wrapper-object-types': 'off', + '@typescript-eslint/no-dynamic-delete': 'off', + '@typescript-eslint/no-invalid-void-type': 'off', + '@typescript-eslint/no-this-alias': 'off', + '@typescript-eslint/explicit-function-return-type': 'error' + } + } ]; diff --git a/examples/example.ts b/examples/example.ts index a51b3e6..1ca68ee 100644 --- a/examples/example.ts +++ b/examples/example.ts @@ -5,10 +5,10 @@ const box = new Mesh(new BoxGeometry(0.1, 0.1, 0.1), new MeshNormalMaterial()); box.draggable = true; box.on('animate', (e) => box.rotateX(e.delta).rotateY(e.delta * 2)); box.on(['pointerover', 'pointerout'], function (e) { - this.tween('id').to(500, { scale: e.type === 'pointerover' ? 1.5 : 1 }, { easing: 'easeOutElastic' }).start(); + this.tween('id').to(500, { scale: e.type === 'pointerover' ? 1.5 : 1 }, { easing: 'easeOutElastic' }).start(); }); const scene = new Scene().add(box); const main = new Main({ fullscreen: false }); -main.createView({ scene, camera: new PerspectiveCameraAuto(70).translateZ(1) }); \ No newline at end of file +main.createView({ scene, camera: new PerspectiveCameraAuto(70).translateZ(1) }); diff --git a/index.html b/index.html index e7cbac6..4bec442 100644 --- a/index.html +++ b/index.html @@ -25,7 +25,7 @@
- +