Skip to content

Conversation

@gkjohnson
Copy link
Collaborator

Related issue: -

Description

The ESLint 9 configs have moved to a new flat config format. I've migrated some of my other projects so I thought I'd try it here, trying to keep the rules the same as much as I can. Settings like "jsdoc" rules have since changed to a separate plugin and in the future some of the styling rules will change to a separate code style plugin. There is an open issue at the mdcs plugin here to migrate, as well.

Comment on lines -56 to +63
"lint-addons": "eslint examples/jsm --ext .js --ignore-pattern libs --ignore-pattern ifc",
"lint-examples": "eslint examples --ext .html",
"lint-docs": "eslint docs --ignore-pattern prettify.js",
"lint-editor": "eslint editor --ignore-pattern libs",
"lint-playground": "eslint playground --ignore-pattern libs",
"lint-manual": "eslint manual --ignore-pattern 3rdparty --ignore-pattern prettify.js --ignore-pattern shapefile.js",
"lint-test": "eslint test --ignore-pattern vendor",
"lint-utils": "eslint utils --ignore-pattern prettify --ignore-pattern fuse",
"lint-addons": "eslint examples/jsm",
"lint-examples": "eslint examples",
"lint-docs": "eslint docs",
"lint-editor": "eslint editor",
"lint-playground": "eslint playground",
"lint-manual": "eslint manual",
"lint-test": "eslint test",
"lint-utils": "eslint utils",
Copy link
Collaborator Author

@gkjohnson gkjohnson Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since ignore patterns are included in the config, now, it's possible we can merge these commands together and let the user specify any sub folder checks themselves. I can look into adding these back if they're preferred, though.

My "lint" scripts are set to eslint . so the whole project is validated.

'no-async-promise-executor': 'off',
'no-empty': 'off',

// 'jsdoc/check-types': 'error',
Copy link
Collaborator Author

@gkjohnson gkjohnson Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this is enabled there are some errors in the JSDoc comments that are caught. I'll leave it to another contribution to re-enable and fix these. It may be worth enabling the JSDoc "recommended" settings above to see if there are any rules worth keeping from there, too.

Comment on lines +105 to +110
'no-useless-escape': 'off',
'no-case-declarations': 'off',
'no-cond-assign': 'off',
'getter-return': 'off',
'no-async-promise-executor': 'off',
'no-empty': 'off',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I turned these off because they seemed to be new rules and were causing lint errors / warnings. It may be worth considering adjusting the codebase and turning these on.

Comment on lines +69 to +70
BigInt: 'readonly',
BigUint64Array: 'readonly'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines have been newly added

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 350.26
83.01
350.26
83.01
+0 B
+0 B
WebGPU 616.03
171
616.03
171
+0 B
+0 B
WebGPU Nodes 614.64
170.74
614.64
170.74
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 482.3
117.81
482.3
117.81
+0 B
+0 B
WebGPU 687.42
186.76
687.42
186.76
+0 B
+0 B
WebGPU Nodes 637.26
173.94
637.26
173.94
+0 B
+0 B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant