-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
space-unary-ops errors on new Class()
syntax
#1946
Comments
This is super broken, it's 'fixing' echo "new String()" | npx standard@17.1.0 --stdin --fix
newString()
standard: Use JavaScript Standard Style (https://standardjs.com)
standard: <text>:1:1: 'newString' is not defined. (no-undef) echo "new String()" | npx standard@17.1.0 --stdin
standard: Use JavaScript Standard Style (https://standardjs.com)
standard: Run `standard --fix` to automatically fix some problems.
<text>:1:1: Do not use String as a constructor. (no-new-wrappers)
<text>:1:1: Unexpected space before unary operator 'String'. (space-unary-ops)
<text>:1:1: Do not use 'new' for side effects. (no-new) |
cc/ @voxpelli, this regression was introduced in the latest release.
|
@missinglink It seems to be a transitive somewhere in all of the 17 versions. Been running 17.1.0 for a while without issue. npx is likely running cached transitives. |
Was an issue in acorn: Re-installing everything and ensuring acorn 8.11.1 is in your tree fixes it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just noticed today that I started getting
space-unary-ops
warnings where I shouldn't be getting them like onnew Foo()
syntax:I've been running
17.1.0
everywhere for a while now, but this is the first I'm seeing of it. Seems like maybe a transitive broke something.To reproduce, clear your node_modules and reinstall 17.1.0 and lint a class instantiation.
The text was updated successfully, but these errors were encountered: