Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS difference for namespaced classes #133

Open
mcanepa opened this issue Apr 16, 2021 · 2 comments
Open

JS difference for namespaced classes #133

mcanepa opened this issue Apr 16, 2021 · 2 comments

Comments

@mcanepa
Copy link

mcanepa commented Apr 16, 2021

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:

  • BaseObject shoud be yellowish
  • ALLCAPS redish
  • BaseObjectSome.Path.ToClass in line 23 redish as the declaration (except BaseObject that should be yellowish)
  • constructor() and super() should be that two shades of blueish
@mcanepa
Copy link
Author

mcanepa commented Apr 22, 2021

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
Copy link

Californ1a commented Jun 3, 2021

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants