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

new.target support #441

Closed
75lb opened this issue Feb 29, 2016 · 2 comments

Comments

@75lb
Copy link

commented Feb 29, 2016

is new.target supported?

using node 5.7, this code:

'use strict'

class Example {
  constructor () {
    console.error('new.target.name:', new.target.name)
  }
}

new Example()

outputs:

new.target.name: Example

however, standard v6.0.7 doesn't seem to recognise new or target as valid:

$ standard tmp/target.js
standard: Use JavaScript Standard Style (http://standardjs.com)
  /Users/lloyd/Documents/jsdoc2md/testbed/tmp/target.js:5:39: 'new' is not defined.
  /Users/lloyd/Documents/jsdoc2md/testbed/tmp/target.js:5:43: 'target' is not defined.
  /Users/lloyd/Documents/jsdoc2md/testbed/tmp/target.js:9:1: Do not use 'new' for side effects.
@feross

This comment has been minimized.

Copy link
Member

commented Feb 29, 2016

This is a known eslint issue (see eslint/eslint#5420). It looks like it's already fixed and is just waiting a release on npm.

Hopefully this will be working for you in a few days!

@feross feross closed this Feb 29, 2016

@feross feross added the question label Feb 29, 2016

@75lb

This comment has been minimized.

Copy link
Author

commented Feb 29, 2016

ok, thanks @feross

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.