Files
Matthew Dean 76fc00c1be refactor: convert prototype-based tree nodes to ES6 classes (#4412)
* refactor: convert prototype-based tree nodes to ES6 classes

Convert all 30 tree node files from `Object.assign(new Node(), {...})`
prototype pattern to proper `class extends Node` syntax. This enables
TypeScript to understand the inheritance chain, reducing checkJs errors
from 2756 to 0.

- All tree nodes now use `class X extends Node` (or appropriate parent)
- Node.type converted from instance property to getter for clean override
- Factory functions in index.js updated to use `new` instead of
  Object.create + apply (required for ES6 class compatibility)
- Benchmark script converted to ESM
- Added @types/node devDependency for checkJs support
- Enabled checkJs in tsconfig.json
- Added JSDoc types to node.js base class and several utility files

No behavioral changes - all 139 tests pass, benchmark performance
unchanged vs historical baselines (avg 36-39ms for 104KB).

* fix: @plugin deprecation says "replaced" not "removed"

* fix: use constructor params for AtRule selectors, path.resolve in benchmark

* fix: align @types/node with engines.node >=18 floor
2026-03-09 20:19:09 -07:00
..