ifl0w / RandomWallpaperGnome3

Random Wallpapers for Gnome 3
MIT License
178 stars 42 forks source link

Remove remaining const classes #178

Closed Lucki closed 11 months ago

Lucki commented 1 year ago

This removes the remaining const classes which were needed for GObject.registerClass() before. The same can be achieved with the yet undocumented static class features of GObject: https://gitlab.gnome.org/ewlsh/gjs-guide/-/issues/72

Unfortunately the generated code has a quirk not liked by eslint and triggers the rule no-unused-expressions and I'm not sure why. I've disabled the rule for the affected files for now.

var _a, _b, _c, _d;
…
// The following line produces the linting error
_a = GenericJsonSettingsGroup, _b = GObject.GTypeName, _c = Gtk.template, _d = Gtk.internalChildren;
…
(() => {
    GObject.registerClass(_a);
})();