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: Brand new setup: Oops! Something went wrong! :( ESLint: 8.15.0 AssertionError [ERR_ASSERTION]: Node must be provided when reporting error if location is not provided #32

Closed
1 task
ormanlis opened this issue May 16, 2022 · 5 comments · Fixed by #33
Labels

Comments

@ormanlis
Copy link

Environment

Node version: v16.14.0
npm version: v8.3.1
Local ESLint version: v8.15.0 (Currently used)
Global ESLint version: Not found
Operating System: darwin 21.4.0

What parser are you using?

@typescript-eslint/parser

What did you do?

Configuration

On a brand new setup of aslant wizard it breaks.

  • yarn add -D eslint
  • npm init @eslint/config

wizard settings:

Need to install the following packages:
  @eslint/create-config
Ok to proceed? (y) y
✔ How would you like to use ESLint? · style
✔ What type of modules does your project use? · esm
✔ Which framework does your project use? · react
✔ 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? · airbnb
✔ What format do you want your config file to be in? · JavaScript
Checking peerDependencies of eslint-config-airbnb@latest
The config that you've selected requires the following dependencies:

eslint-plugin-react@^7.28.0 @typescript-eslint/eslint-plugin@latest eslint-config-airbnb@latest eslint@^7.32.0 || ^8.2.0 eslint-plugin-import@^2.25.3 eslint-plugin-jsx-a11y@^6.5.1 eslint-plugin-react-hooks@^4.3.0 @typescript-eslint/parser@latest
✔ Would you like to install them now? · No / **Yes**
✔ Which package manager do you want to use? · yarn
Installing eslint-plugin-react@^7.28.0, @typescript-eslint/eslint-plugin@latest, eslint-config-airbnb@latest, eslint@^7.32.0 || ^8.2.0, eslint-plugin-import@^2.25.3, eslint-plugin-jsx-a11y@^6.5.1, eslint-plugin-react-hooks@^4.3.0, @typescript-eslint/parser@latest
yarn add v1.22.17

module.exports = {
  env: {
    browser: true,
    es2021: true,
    node: true,
  },
  extends: [
    'plugin:react/recommended',
    'airbnb',
  ],
  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaFeatures: {
      jsx: true,
    },
    ecmaVersion: 'latest',
    sourceType: 'module',
  },
  plugins: [
    'react',
    '@typescript-eslint',
  ],
  rules: {},
};

What did you expect to happen?

No error

What actually happened?

Oops! Something went wrong! :(

ESLint: 8.15.0

AssertionError [ERR_ASSERTION]: Node must be provided when reporting error if location is not provided

Participation

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

Additional comments

No response

@ormanlis ormanlis added bug Something isn't working repro:needed labels May 16, 2022
@ormanlis
Copy link
Author

Adding

  rules: {
    'no-unused-vars': 'off',
    '@typescript-eslint/no-unused-vars': ['warn']
  },

Fixes it, but as a user is a bad UX to get started and get an error immediately. Maybe this could be fixed.

@aladdin-add aladdin-add transferred this issue from eslint/eslint May 16, 2022
@aladdin-add
Copy link
Member

thanks for the report, I've made a fix #31.

@nzakas
Copy link
Member

nzakas commented Jun 4, 2022

@aladdin-add please be sure to move issues that you’re triaging to the “Triaging” column. Once you have verified a bug, please label as “accepted” and move to “Ready to Implement”. Thanks for helping us keep issues organized.

@nzakas nzakas added the accepted label Jun 4, 2022
@aladdin-add
Copy link
Member

right, missed it somehow.

@wardydev
Copy link

this work for me
"unsafe-optional-chaining": 0, "no-unsafe-optional-chaining": 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
4 participants