tbusser / jscc

This is the website for the JavaScript Compatibility Checker
http://jscc.info
88 stars 17 forks source link

class is undetected #12

Open Zorgatone opened 7 years ago

Zorgatone commented 7 years ago

classes seem to be undetected

avdg commented 7 years ago

Any simple example of this?

Zorgatone commented 7 years ago
class A {}
Congrats!
The code you provided did not contain anything that might give compatibility problems. Yeey! (or perhaps there is but went undetected, don't you feel better now?)
avdg commented 7 years ago

hehe :-)

avdg commented 7 years ago

it seems this tool just detects few js features, it doesn't even know you use a feature from es6 or later. A filter might be relative easy to add here https://github.com/tbusser/jscc/blob/3fcb5e7efa0023fb19dbb6d6c13d67c40935c2a0/src/scripts/DataStore.js#L122

As you can see on the last 2 lines, it can detect the usage of let and const.

Zorgatone commented 7 years ago

Yeah, we totally should make a pull request, but I need to get off work first

Zorgatone commented 7 years ago

Looking at those regexps I wonder what happens if let and const are preceded with a semicolon, without space in between like this: ;let v=false;. Trying it out now, should be undetected as well

Zorgatone commented 7 years ago

yup, needs a pull request for that too

avdg commented 7 years ago

I don't know, given the many features js has especially since harmony. The part I can't tell is how well this valued in the community to be worth maintaining long term (investments vs usage).

Edit: to be clear: I have no data about this.