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

fix: set a valid parserOptions.ecmaVersion #403

Merged
merged 5 commits into from
Aug 26, 2021
Merged

fix: set a valid parserOptions.ecmaVersion #403

merged 5 commits into from
Aug 26, 2021

Conversation

strangedev
Copy link
Contributor

We've been having some problems with false positives lately. Namely, the prefer-const and no-implicit-globals rules seemed to disregard scope. With the help of some very helpful folks over at eslint, we've found the culprit.

This line in our config is not supported by @typescript-eslint/parser and it will fall back to at least ES9. What version it falls back to is not entirely clear to me, but it seems to be a version without block scoping, where all variables are hoisted. This causes scope-aware rules to misreport.

This PR changes the parserOptions.ecmaVersion from "latest" to 12, which is the latest ratified version. This means we will have to bump this version every year. Since our configuration is executable, maybe we can find a way to query the latest version automatically.

Since this error in our configuration breaks some of our builds, we should probably merge this fix first and then figure out how to maintain the pinned version later.

dependabot bot and others added 5 commits August 23, 2021 00:25
Bumps [roboter](https://github.com/thenativeweb/roboter) from 12.0.0 to 12.1.2.
- [Release notes](https://github.com/thenativeweb/roboter/releases)
- [Changelog](https://github.com/thenativeweb/roboter/blob/main/CHANGELOG.md)
- [Commits](thenativeweb/roboter@12.0.0...12.1.2)

---
updated-dependencies:
- dependency-name: roboter
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@goloroden goloroden merged commit 0024415 into main Aug 26, 2021
@goloroden goloroden deleted the fix/ecmaversion branch August 26, 2021 10:20
goloroden pushed a commit that referenced this pull request Aug 26, 2021
## [3.30.14](3.30.13...3.30.14) (2021-08-26)

### Bug Fixes

* set a valid `parserOptions.ecmaVersion` ([#403](#403)) ([0024415](0024415))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants