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

ESLint crashes after 7.8.0 update #13641

Closed
CallMeFoxie opened this issue Sep 1, 2020 · 4 comments
Closed

ESLint crashes after 7.8.0 update #13641

CallMeFoxie opened this issue Sep 1, 2020 · 4 comments
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly patch candidate This issue may necessitate a patch release in the next few days

Comments

@CallMeFoxie
Copy link

CallMeFoxie commented Sep 1, 2020

Tell us about your environment
Ubuntu Focal, npm and nodejs from ubuntu repository

  • ESLint Version: 7.8.0
  • Node Version: 10.19.0
  • npm Version: 6.14.4

What parser (default, @babel/eslint-parser, @typescript-eslint/parser, etc.) are you using?
default

Please show your full configuration:

Configuration
module.exports = {
    "settings": {
      "react": {
        "createClass": "createReactClass", // Regex for Component Factory to use,
                                           // default to "createReactClass"
        "pragma": "React",  // Pragma to use, default to "React"
        "version": "detect", // React version. "detect" automatically picks the version you have installed.
                             // You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
                             // default to latest and warns if missing
                             // It will default to "detect" in the future
        "flowVersion": "0.53" // Flow version
      }
    },
    "env": {
        "browser": true,
        "es6": true
    },
    "extends": [
        "eslint:recommended",
        "plugin:react/recommended"
    ],
    "globals": {
        "Atomics": "readonly",
        "SharedArrayBuffer": "readonly"
    },
    "parserOptions": {
        "ecmaFeatures": {
            "jsx": true
        },
        "ecmaVersion": 2018,
        "sourceType": "module"
    },
    "plugins": [
        "react",
        "react-hooks"
    ],
    "rules": {
      "react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
      "react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
      "react/prop-types": 0,
      "react/no-deprecated": 0
    }
};

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

no source code

./node_modules/.bin/eslint

What did you expect to happen?
anything other than crash. Happens when initializing the ESLint probably. Started after the 7.8.0 release.

What actually happened? Please include the actual, raw output from ESLint.
crashed with a stack trace

ashley@foxtop:~/repos/adm-kubernetes-deployer/spa$ ./node_modules/.bin/eslint 

Oops! Something went wrong! :(

ESLint: 7.8.0

TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at getDiff (/home/ashley/repos/adm-kubernetes-deployer/spa/node_modules/@eslint/eslintrc/conf/environments.js:26:39)
    at Object.<anonymous> (/home/ashley/repos/adm-kubernetes-deployer/spa/node_modules/@eslint/eslintrc/conf/environments.js:35:24)
    at Module._compile (/home/ashley/repos/adm-kubernetes-deployer/spa/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (/home/ashley/repos/adm-kubernetes-deployer/spa/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)

Are you willing to submit a pull request to fix this bug?
I have no idea what is happening.

@CallMeFoxie CallMeFoxie added bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon labels Sep 1, 2020
@anikethsaha
Copy link
Member

Thanks for the report.

Looks like related to eslint/eslintrc#1
Fix here: eslint/eslintrc#2

@anikethsaha anikethsaha added evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Sep 1, 2020
@CallMeFoxie
Copy link
Author

Yup adding globals to dependencies seems to have fixed it! Thanks!

@maxymczech
Copy link

Confirm, I have same problem after updating to 7.8.0, some sort of conflict in versions of globals. Thank you for the fix!

@mdjermanovic mdjermanovic added the patch candidate This issue may necessitate a patch release in the next few days label Sep 1, 2020
@nzakas nzakas self-assigned this Sep 1, 2020
@nzakas nzakas added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Sep 1, 2020
@nzakas
Copy link
Member

nzakas commented Sep 1, 2020

Just published a new version of @eslint/eslintrc. PR incoming.

@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Mar 18, 2021
@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 Mar 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly patch candidate This issue may necessitate a patch release in the next few days
Projects
None yet
Development

No branches or pull requests

5 participants