GithubHelp home page GithubHelp logo

upgrade to eslint 8.0.0 about eslint HOT 6 CLOSED

nuxt avatar nuxt commented on September 27, 2024 18
upgrade to eslint 8.0.0

from eslint.

Comments (6)

mrleblanc101 avatar mrleblanc101 commented on September 27, 2024 8

At first it seemed to work on my side after yarn dev.
But I get Environment key "jest/globals" is unknown #98 every time I save now.

from eslint.

larryh avatar larryh commented on September 27, 2024 2

Well, the error message I copied and pasted above didn't even appear when I fired up my IDE the next day. (Seems to happen to a lot of folks: one day the error message just showed up, and the next day it disappeared.)
There were other error messages => other rabbit holes to descend into and spend time in. (And then they wonder why people hate upgrading software - man, it can be soooo painful and sooo time-consuming.)
Anyway, finally got everything resolved => no need to re-open.
P.S. Thanks to all of the work you good people do to provide us with free software. I know it must be a RPITA at times, and it is MUCH APPRECIATED!

from eslint.

apasov avatar apasov commented on September 27, 2024

Here's what I get:

c:\Users\User\myProject>yarn lint
yarn run v1.22.15
$ eslint --fix --ext .js,.vue client/

Oops! Something went wrong! :(

ESLint: 8.0.0

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Failed to load plugin 'import' declared in '.eslintrc.js » @nuxtjs/eslint-config': Package subpath './lib/util/glob-util' is not defined by "exports" in c:\Users\User\myProject\node_modules\eslint\package.json
Referenced from: c:\Users\User\myProject\node_modules\@nuxtjs\eslint-config\index.js
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:692:3)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (c:\Users\User\myProject\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
    at Object.<anonymous> (c:\Users\User\myProject\node_modules\eslint-plugin-import\lib\rules\no-unused-modules.js:43:34)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

from eslint.

pi0 avatar pi0 commented on September 27, 2024

I believe this should be solved.

from eslint.

larryh avatar larryh commented on September 27, 2024

Hi,
I just upgraded eslint from 7.30.0 to 8.17.0, and eslint-plugin-nuxt from 2.0.0 to 3.2.0, i.e. the latest and greatest versions of each.

I am getting the error talked about is this issue, and the infuriating thing is that I don't even use Jest or have it installed. I have searched around and tried different fixes and nothing seems to help. The "Details" are below.

Now every time I open a file in my (RubyMine) IDE I get an annoying red banner at the top of the file.

Can someone please re-open this or tell me what I should do?

Thanks,
Larry

Error: .eslintrc.js » @nuxtjs/eslint-config:
Environment key "jest/globals" is unknown

Error: .eslintrc.js » @nuxtjs/eslint-config:
Environment key "jest/globals" is unknown

at /home/larry/RubymineProjects/FrontEnd/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2058:23
at Array.forEach (<anonymous>)
at ConfigValidator.validateEnvironment (/home/larry/RubymineProjects/FrontEnd/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2052:34)
at ConfigValidator.validateConfigArray (/home/larry/RubymineProjects/FrontEnd/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2202:18)
at CascadingConfigArrayFactory._finalizeConfigArray (/home/larry/RubymineProjects/FrontEnd/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3947:23)
at CascadingConfigArrayFactory.getConfigArrayForFile (/home/larry/RubymineProjects/FrontEnd/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3753:21)
at CLIEngine.isPathIgnored (/home/larry/RubymineProjects/FrontEnd/node_modules/eslint/lib/cli-engine/cli-engine.js:989:18)
at ESLint.isPathIgnored (/home/larry/RubymineProjects/FrontEnd/node_modules/eslint/lib/eslint/eslint.js:678:26)
at ESLint8Plugin.<anonymous> (/snap/rubymine/290/plugins/JavaScriptLanguage/languageService/eslint/bin/eslint8-plugin.js:164:57)
at step (/snap/rubymine/290/plugins/JavaScriptLanguage/languageService/eslint/bin/eslint8-plugin.js:44:23)

Process finished with exit code -1

from eslint.

larryh avatar larryh commented on September 27, 2024

Hello again,

I found another of your issues related to this (#98) and they said to make sure @nuxtjs/eslint-config was updated. I was way behind on that so I updated from 6.0.1 to the latest, 10.0.0

The "jest/globals" error message went away, but now I have this:
Error: ENOENT: no such file or directory, open '/node_modules/@nuxtjs/eslint-config/node_modules/eslint-config-standard/index.js'

I have node/modules/@nuxtjs/esling-config... but no /node_modules directory under that => I need to look into this.

I can't work on this any more today, but I wanted to add this update so as not to waste anyone's time on my error. I will look into this tomorrow and report back. Hopefully I can resolve the problem and this will help anyone else who stumbles across this.

from eslint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.