The Obsidian API provides functions to read/write plugin data.
I have had plugin data files corrupted when Obsidian crashed, where the plugin data was only written partially.
Obsidian should ensure that the writes are performed atomically, both for plugin data as well as for notes and other obsidian managed files well where possible.
If Obsidian were to implement atomic file writes it should also provide this functionality to plugin authors so they could use it for other files written by plugins.
Since this is currently not something that seems to be provided by nodejs itself, having Obsidian provide such functionality would improve crash resiliency and avoid plugin authors having to implement this individually.