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

Inconsistent validation of keywords as identifiers in method declaration in ES8 #9153

Closed
nikarh opened this issue Aug 25, 2017 · 4 comments · Fixed by #9314
Closed

Inconsistent validation of keywords as identifiers in method declaration in ES8 #9153

nikarh opened this issue Aug 25, 2017 · 4 comments · Fixed by #9314
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion blocked This change can't be completed until another issue is resolved bug ESLint is working incorrectly

Comments

@nikarh
Copy link

nikarh commented Aug 25, 2017

Tell us about your environment

  • ESLint Version:
    4.5.0

Please show your full configuration:
Reproducible in online REPL using a default configuration with ES8 enabled
https://eslint.org/demo/

What did you do? Please include the actual source code causing the issue.

class SyncClass {
	delete() {}
}

const syncInstance = {
	delete() {}
}

class AsyncClass {
	async delete() {}
}

const asyncInstance = {
	async delete() {}
}

What did you expect to happen?
All "delete" method declarations should be either valid or invalid

What actually happened? Please include the actual, raw output from ESLint.
Eslint fails to parse method declaration for asyncInstance.

14:8 - Parsing error: Unexpected token delete
@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Aug 25, 2017
@not-an-aardvark
Copy link
Member

Thanks for the report. This looks like a bug in the acorn parser -- I've reported it at acornjs/acorn#584.

@not-an-aardvark not-an-aardvark added accepted There is consensus among the team that this change meets the criteria for inclusion blocked This change can't be completed until another issue is resolved bug ESLint is working incorrectly and removed triage An ESLint team member will look at this issue soon labels Aug 25, 2017
@not-an-aardvark
Copy link
Member

This has been fixed upstream in acorn, so it should be fixed in ESLint next time acorn is released.

@platinumazure
Copy link
Member

Maybe we should leave this open and do an espree release and Upgrade commit against this issue when Acorn is released? Just to avoid any oddities for our users when it is available due to open dependency ranges?

@not-an-aardvark
Copy link
Member

Sure, works for me.

btmills added a commit that referenced this issue Sep 15, 2017
aladdin-add added a commit to aladdin-add/eslint that referenced this issue Sep 18, 2017
ilyavolodin pushed a commit that referenced this issue Sep 18, 2017
* Revert "4.7.0"

This reverts commit 439e8e6.

* Revert "Build: changelog update for 4.7.0"

This reverts commit 2ec62f9.

* Revert "Upgrade: Espree v3.5.1 (fixes #9153) (#9314)"

This reverts commit 787b78b.

* Revert "Update: run rules after `node.parent` is already set (fixes #9122) (#9283)"

This reverts commit 1488b51.

* Revert "Docs: fix wrong config in max-len example. (#9309)"

This reverts commit 4431d68.

* Revert "Chore: Revert "avoid handling Rules instances in config-validator" (#9295)"

This reverts commit 9d1df92.

* Revert "Docs: Fix code snippet to refer to the correct option (#9313)"

This reverts commit 7d24dde.

* Revert "�Chore: rewrite parseListConfig for a small perf gain. (#9300)"

This reverts commit 12388d4.
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Mar 15, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Mar 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion blocked This change can't be completed until another issue is resolved bug ESLint is working incorrectly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants