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

[flat config] ecmaVersion: "latest" #15366

Closed
1 task done
mdjermanovic opened this issue Nov 28, 2021 · 6 comments · Fixed by #17958
Closed
1 task done

[flat config] ecmaVersion: "latest" #15366

mdjermanovic opened this issue Nov 28, 2021 · 6 comments · Fixed by #17958
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion core Relates to ESLint's core APIs and features enhancement This change enhances an existing feature of ESLint
Projects

Comments

@mdjermanovic
Copy link
Member

mdjermanovic commented Nov 28, 2021

ESLint version

flat-config-linter branch

What problem do you want to solve?

ref: #15185 (comment)

With this configuration, ESLint will use espree.latestEcmaVersion as ecmaVersion:

{
    languageOptions: {
        ecmaVersion: "latest"
    }
}

What do you think is the correct solution?

ESLint should maintain its own latestEcmaVersion instead of using espree.latestEcmaVersion.

languageOptions.ecmaVersion is an ESLint option, and it is used not only for parsing.

An in-range version of espree can support ecmaVersion that is not supported by currently used version of ESLint. If we use espree.latestEcmaVersion, parsing will work well, but other features that are based on ecmaVersion may not. For example, in the mentioned scenario, ESLint will not add any ES globals.

Participation

  • I am willing to submit a pull request for this change.

Additional comments

No response

@mdjermanovic mdjermanovic added enhancement This change enhances an existing feature of ESLint core Relates to ESLint's core APIs and features labels Nov 28, 2021
@eslint-github-bot eslint-github-bot bot added this to Needs Triage in Triage Nov 28, 2021
@mdjermanovic mdjermanovic moved this from Needs Triage to Feedback Needed in Triage Nov 28, 2021
@btmills
Copy link
Member

btmills commented Dec 29, 2021

Good call. Is there any discussion we need to have here before marking as accepted and moving to Ready to Implement?

@github-actions
Copy link

Oops! It looks like we lost track of this issue. What do we want to do here? This issue will auto-close in 7 days without an update.

@github-actions github-actions bot added the Stale label Feb 28, 2022
@mdjermanovic
Copy link
Member Author

@nzakas what do you think about this?

@github-actions github-actions bot removed the Stale label Mar 7, 2022
@nzakas nzakas added the accepted There is consensus among the team that this change meets the criteria for inclusion label Mar 8, 2022
@nzakas nzakas moved this from Feedback Needed to Ready to Implement in Triage Mar 8, 2022
@nzakas
Copy link
Member

nzakas commented Mar 8, 2022

Good idea. 👍

@fasttime
Copy link
Member

@mdjermanovic Would you like to submit a PR for this change?

@mdjermanovic
Copy link
Member Author

I'm working on this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion core Relates to ESLint's core APIs and features enhancement This change enhances an existing feature of ESLint
Projects
Archived in project
Triage
Ready to Implement
Development

Successfully merging a pull request may close this issue.

4 participants