Commit Graph

7 Commits

Author SHA1 Message Date
filtered
51ec57dc5c Fix graph.links cannot be iterated (#932)
Proxied links object now correctly supports spread operator.
2025-04-16 09:13:20 +00:00
filtered
97bf9de83a [Refactor] Standardise code style - modern JS (#636)
Uses unicorn rules to auto-refactor code.  All verified.
2025-02-27 13:13:32 +00:00
filtered
0e9b8b03b7 Enforce curly braces in multi-line if statements (#619)
Removes formatters' ability to print code that goes to a new line, but
uses no braces to delineate.

It becomes more difficult to follow when using JS-style indents (two
spaces).

No effort required - braces added by auto-fixer.
2025-02-26 15:08:23 +00:00
filtered
5469bfdd52 Add ESLint, pre-commit hook & format all files (#319)
* Add ESLint config

* Add ESLint packages

* Add prettier config

* Fix ESLint package version

* Format all files

* Format static assets

* Format project root config

* Add pre-commit code formatting

Formats .css & .js files automatically.  If any .ts or .mts files are staged, the entire project is type-checked.

Packages:
- lint-staged
- husky
- prettier
2024-11-20 21:50:58 -05:00
Chenlei Hu
7c0240857c Revert branch to cb6e80a645 (#257) 2024-11-03 09:12:47 -05:00
dmx
79c53e0095 (prettier formatting) 2024-11-03 09:20:57 +04:00
filtered
020c912a8d Convert Links to ES6 Map & LLink Serialisation (#246)
* Fix intermittent links bug - graph.links Map()

Replaces graph.links with Map()
Adds a Proxy to provide for...in and indexer access
Temporarily uses merged Map+Record type, to ease downstream migration

* nit - Remove redundant code

* nit - Remove redundant null checks

* Add Serializable interface, used in LLink

Allows LLink to be serialised as an object rather than an array, bringing it inline with the rest of LiteGraph.
2024-10-31 21:53:00 -04:00