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

Set env 2022 #57

Merged
merged 7 commits into from
Apr 25, 2022
Merged

Set env 2022 #57

merged 7 commits into from
Apr 25, 2022

Conversation

aljones15
Copy link
Collaborator

This removes the need to set ecmaVersion while also updating the globals that eslint thinks are ok.

@aljones15 aljones15 self-assigned this Apr 8, 2022
@dlongley
Copy link
Member

dlongley commented Apr 8, 2022

Using eslint 8 needs to be tested against existing modules like bedrock-account where errors that link to this issue occur: eslint/eslint#14745

@aljones15
Copy link
Collaborator Author

aljones15 commented Apr 8, 2022

Using eslint 8 needs to be tested against existing modules like bedrock-account where errors that link to this issue occur: eslint/eslint#14745

17:1 warning This rule cannot yet be supported for ESLint 8; you should either downgrade to ESLint 7 or disable this rule. The possibility for ESLint 8 support is being tracked at eslint/eslint#14745 jsdoc/check-examples

looks like jsdoc/check-examples needs to be disabled even with the latest eslint-plugin-jsdoc this error persists. We don't use jsdoc/check-examples much so this might not be a big deal.

@davidlehn
Copy link
Member

This should be addressed sooner rather than later.

  • The ecmaVersion: 2020 bit is being added to every package and could probably just be set here once. (I don't know effects of 'latest' vs a year).
  • eslint 8 is needed for packages that are trying ecmaVersion: 2022 and failing.

@davidlehn
Copy link
Member

I think the best action here is to comment out the jsdoc/check-examples rule for now until the related bug is fixed. It seems like the other checks are working fine. So we're just losing the rare doc example linting for now.

If we set env.2022=true, then ecmaVersion is set to 13 (2022). Does it make sense to set ecmaVersion here at all?
https://eslint.org/docs/user-guide/configuring/language-options#specifying-environments

Proposed update in #58.

@dlongley
Copy link
Member

Seems like we should close this in favor of #58.

@aljones15
Copy link
Collaborator Author

Closing in favor of #58

@aljones15 aljones15 closed this Apr 25, 2022
@davidlehn
Copy link
Member

Reopening to cascade the other branch through here.

@davidlehn davidlehn reopened this Apr 25, 2022
@davidlehn davidlehn marked this pull request as ready for review April 25, 2022 21:11
Disable `jsdoc/check-examples` until eslint 8 related issue is fixed.
eslint/eslint#14745
`env.es2022=true` automatically sets `ecmaVersion` to `13` (2022). It
seems better to keep parsing mode and globals in sync with the `env`
setting rather than getting a newer `ecmaVersion` without other related
support.
@davidlehn davidlehn merged commit 3e6920e into main Apr 25, 2022
@davidlehn davidlehn deleted the set-env-2022 branch April 25, 2022 21:12
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

3 participants