quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
25.89k stars 3.51k forks source link

don't install eslint-plugin-standard #13439

Closed mixmix closed 2 years ago

mixmix commented 2 years ago

What happened?

I asked for standard linting, and it took me down a path which resuted in errors specifically a conflicting dependency (eslint-plugin-n)

Reading around I find that eslint-plugin-standard is deprecated - not needed - any more https://github.com/standard/standard/issues/1316

What did you expect to happen?

standard config / deps that "just work"

Reproduction URL

-

How to reproduce?

-

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)

Platforms/Browsers

No response

Quasar info output

-

Relevant log output

-

Additional context

-

github-actions[bot] commented 2 years ago

Hi @mixmix! ๐Ÿ‘‹

It looks like you provided an invalid or unsupported reproduction URL. Do not use any service other than Codepen, jsFiddle, Codesandbox, and GitHub. Make sure the URL you provided is correct and reachable. You can test it by visiting it in a private tab, another device, etc. Please edit your original post above and provide a valid reproduction URL as explained.

Without a proper reproduction, your issue will have to get closed.

Thank you for your collaboration. ๐Ÿ‘

leandro-almeida commented 2 years ago

Hi, i've faced the same problem here:

image

โˆš Install project dependencies? (recommended) ยป Yes, use npm

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: celebra-ui@0.0.1
npm ERR! Found: eslint-plugin-n@14.0.0
npm ERR! node_modules/eslint-plugin-n
npm ERR!   dev eslint-plugin-n@"^14.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint-plugin-n@"^15.0.0" from eslint-config-standard@17.0.0
npm ERR! node_modules/eslint-config-standard
npm ERR!   dev eslint-config-standard@"^17.0.0-1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\almei\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\almei\AppData\Local\npm-cache\_logs\2022-05-18T00_40_03_987Z-debug-0.log

 npm FAILED...
leandro-almeida commented 2 years ago

Also, i've noticed that the docs (https://quasar.dev/start/quasar-cli) recommends Yarn, and then states this command to install quasar cli globally:

$ yarn global add @quasar/cli

But we cant do this anymore in yarn 2+: The 'yarn global' commands have been removed.

I cant bootstrap a quasar project using either yarn or npm...

leandro-almeida commented 2 years ago

Ok, now i tried correctly with yarn:

yarn create quasar
 - answered the questions and yarn install at the end
yarn quasar dev

Success!

IlCallo commented 2 years ago

@mixmix could you please provide reproduction steps? You left the whole issue template empty, we'll need to close the issue if we don't know how to reproduce it. Currently we don't install any eslint-plugin-standard dep while creating a new project

mixmix commented 2 years ago

sorry I don't have capacity to fill all that in. if it's not useful as is, please feel free to close

I understand (as an open source maintainer) that having good issues helps a lot. the form was a bit overwhelming was my feedback.

On Wed, 18 May 2022, 21:13 Paolo Caleffi, @.***> wrote:

@mixmix https://github.com/mixmix could you please provide reproduction steps? You left the whole issue template empty, we'll need to close the issue if we don't know how to reproduce it. Currently we don't install any eslint-plugin-standard dep while creating a new project

โ€” Reply to this email directly, view it on GitHub https://github.com/quasarframework/quasar/issues/13439#issuecomment-1129767728, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUK3HRJISMYW6WYJS4AYGLVKSYC3ANCNFSM5V7YNPDQ . You are receiving this because you were mentioned.Message ID: @.***>

IlCallo commented 2 years ago

Well... Can you at least tell us which command you run to create the project and get the error you mentioned? Did you use yarn create quasar or the old Quasar CLI way of quasar create?

mixmix commented 2 years ago

Yeah sorry I see I was quite vague.

I went to quasar.dev and followed the steps for installing a vite based @quasar/cli install

npm i -g @quasar/cli
npm init quasar

 .d88888b.
d88P" "Y88b
888     888
888     888 888  888  8888b.  .d8888b   8888b.  888d888
888     888 888  888     "88b 88K          "88b 888P"
888 Y8b 888 888  888 .d888888 "Y8888b. .d888888 888
Y88b.Y8b88P Y88b 888 888  888      X88 888  888 888
 "Y888888"   "Y88888 "Y888888  88888P' "Y888888 888
       Y8b

โœ” What would you like to build? โ€บ App with Quasar CLI, let's go!
โœ” Project folder: โ€ฆ quasar-demo
โœ” Pick Quasar version: โ€บ Quasar v2 (Vue 3 | latest and greatest)
โœ” Pick script type: โ€บ Javascript
โœ” Pick Quasar App CLI variant: โ€บ Quasar App CLI with Vite (BETA stage)
โœ” Package name: โ€ฆ quasar-demo
โœ” Project product name: (must start with letter if building mobile apps) โ€ฆ Quasar App
โœ” Project description: โ€ฆ A Quasar Project
โœ” Author: โ€ฆ mixmix
โœ” Pick your CSS preprocessor: โ€บ Sass with SCSS syntax
โœ” Check the features needed for your project: โ€บ ESLint, State Management (Pinia), Vue-i18n
โœ” Pick an ESLint preset: โ€บ Standard

 Quasar โ€ข Generating files...

 - README.md
 - .editorconfig
 - .gitignore
 - jsconfig.json
 - package.json
 - index.html
 - postcss.config.js
 - quasar.config.js
 - .vscode/extensions.json
 - .vscode/settings.json
 - public/favicon.ico
 - src/App.vue
 - public/icons/favicon-128x128.png
 - public/icons/favicon-16x16.png
 - public/icons/favicon-32x32.png
 - public/icons/favicon-96x96.png
 - src/assets/quasar-logo-vertical.svg
 - src/boot/.gitkeep
 - src/components/EssentialLink.vue
 - src/layouts/MainLayout.vue
 - src/pages/ErrorNotFound.vue
 - src/pages/IndexPage.vue
 - src/router/index.js
 - src/router/routes.js
 - src/css/app.scss
 - src/css/quasar.variables.scss
 - src/boot/i18n.js
 - src/i18n/index.js
 - src/i18n/en-US/index.js
 - .eslintignore
 - .eslintrc.js
 - src/stores/example-store.js
 - src/stores/index.js
 - src/stores/store-flag.d.ts

 Quasar โ€ข  SUCCESS  โ€ข The project has been scaffolded

โœ” Install project dependencies? (recommended) โ€บ Yes, use npm

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: quasar-demo@0.0.1
npm ERR! Found: eslint-plugin-n@14.0.0
npm ERR! node_modules/eslint-plugin-n
npm ERR!   dev eslint-plugin-n@"^14.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint-plugin-n@"^15.0.0" from eslint-config-standard@17.0.0
npm ERR! node_modules/eslint-config-standard
npm ERR!   dev eslint-config-standard@"^17.0.0-1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/myhome/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/myhome/.npm/_logs/2022-05-18T10_36_24_182Z-debug-0.log

 npm FAILED...

 Quasar โ€ข โš ๏ธ  Could not auto install dependencies. Probably a temporary npm registry issue?

To get started:

  cd quasar-demo
  yarn #or: npm install
  yarn lint --fix # or: npm run lint -- --fix
  quasar dev # or: yarn quasar dev # or: npx quasar dev
mixmix commented 2 years ago
โžœ  DEMO node -v
v14.19.0
โžœ  DEMO npm -v
8.5.4
mixmix commented 2 years ago

Seems like the way I fixed it was to take these package.json deps installed by CLI

    "eslint": "^8.10.0",
    "eslint-config-standard": "^17.0.0-1",
    "eslint-plugin-import": "^2.19.1",
    "eslint-plugin-n": "^14.0.0",
    "eslint-plugin-promise": "^6.0.0",
    "eslint-plugin-vue": "^8.5.0",

and change them to :

    "eslint": "^8.10.0",
    "eslint-config-standard": "^17.0.0", // <<<< difference since I installed?
    "eslint-plugin-import": "^2.19.1",
    "eslint-plugin-n": "^15.2.0",    // <<<<<<<< upgrade
    "eslint-plugin-promise": "^6.0.0",
    "eslint-plugin-vue": "^8.5.0",
mixmix commented 2 years ago

yeah upgrading to "eslint-plugin-n": "^15.2.0", fixes the install error.

I don't know if the title about eslint-plugin-standard was a typo or if I was using an older cli that did install that. Anyway there was still an error here.

IlCallo commented 2 years ago

Thanks, we're on it :)