akamud / vscode-theme-onedark

VSCode Theme based on Atom's One Dark theme
MIT License
293 stars 200 forks source link

JS difference for namespaced classes #133

Open mcanepa opened 3 years ago

mcanepa commented 3 years ago

One one hand, there are differences between this theme and Atoms' but there also differences between the theme itself

Here's a sample image... js_atom_vs_vsc

I think that:

mcanepa commented 3 years ago

This is the test file...

BaseObject.Some.Path.ToClass = {}
BaseObject.Some.Path.ALLCAPS = {}

BaseObject.Some.Path.ToClass = class extends SomeParentClass
{
    constructor(parameter)
    {
        super();

        this.param = parameter;

        var my_var = true;

        if($(parameter).hasClass("my_class"))
        {
            $("some_selector").data("my_data", 123);

            my_var = !my_var;
        }
    }
}

class MyClass extends BaseObject.Some.Path.ToClass
{
    constructor()
    {
        super("div");
    }
}

var objInstance = new MyClass();
Californ1a commented 3 years ago
  • ALLCAPS redish

Caps having a different color improves readability for constants & environment variables. Personally, I think that's an improvement over Atom's original style and something that should stay (and possibly be changed in Atom) even though it is inconsistent with Atom.