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

Bug: (fill in) #15470

Closed
1 task
dland512 opened this issue Dec 31, 2021 · 2 comments
Closed
1 task

Bug: (fill in) #15470

dland512 opened this issue Dec 31, 2021 · 2 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly repro:needed
Projects

Comments

@dland512
Copy link

Environment

Node version: v14.17.4
npm version: 6.14.14
Local ESLint version: 7.32.0
Global ESLint version: n/a
Operating System: macOS 11.6 (20G165)

What parser are you using?

Default (Espree)

What did you do?

I created a new project and installed eslint using these options:

npx eslint --init
✔ How would you like to use ESLint? · style
✔ What type of modules does your project use? · esm
✔ Which framework does your project use? · vue
✔ Does your project use TypeScript? · No / Yes
✔ Where does your code run? · browser
✔ How would you like to define a style for your project? · guide
✔ Which style guide do you want to follow? · standard
✔ What format do you want your config file to be in? · JavaScript
Checking peerDependencies of eslint-config-standard@latest
The config that you've selected requires the following dependencies:

eslint-plugin-vue@latest eslint-config-standard@latest eslint@^7.12.1 eslint-plugin-import@^2.22.1 eslint-plugin-node@^11.1.0 eslint-plugin-promise@^4.2.1 || ^5.0.0
✔ Would you like to install them now with npm? · Yes

which resulted in this config file:

module.exports = {
  env: {
    browser: true,
    es2021: true
  },
  extends: [
    'plugin:vue/essential',
    'standard'
  ],
  parserOptions: {
    ecmaVersion: 13,
    sourceType: 'module'
  },
  plugins: [
    'vue'
  ],
  rules: {
  }
}

Notice that it has es2021: true but ecmaVersion: 13 which doesn't seem right.

What did you expect to happen?

I expect eslint to work

What actually happened?

I am getting the following error:

/temp/.eslintrc.js
  0:0  error  Parsing error: Invalid ecmaVersion

Participation

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

Additional comments

If I change the ecmaVersion from 13 to 12 it works. This makes sense since ecmascript 2021 is actually version 12.

Is this a config creation bug?

@dland512 dland512 added bug ESLint is working incorrectly repro:needed labels Dec 31, 2021
@eslint-github-bot eslint-github-bot bot added this to Needs Triage in Triage Dec 31, 2021
@aladdin-add
Copy link
Member

we are working on a new cli @eslint/create-config to replace eslint --init. it will be fixed in the new repo, please follow #14768 .

@aladdin-add
Copy link
Member

Duplicate of #15159

@aladdin-add aladdin-add marked this as a duplicate of #15159 Dec 31, 2021
Triage automation moved this from Needs Triage to Complete Dec 31, 2021
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Jun 30, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jun 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly repro:needed
Projects
Archived in project
Triage
Complete
Development

No branches or pull requests

2 participants