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

Support ESLint 9.x #93

Closed
1Luc1 opened this issue Apr 8, 2024 · 18 comments · Fixed by #107
Closed

Support ESLint 9.x #93

1Luc1 opened this issue Apr 8, 2024 · 18 comments · Fixed by #107
Labels
enhancement New feature or request

Comments

@1Luc1
Copy link

1Luc1 commented Apr 8, 2024

ESLint v9.0.0 is released !

It would be awesome to have official ESLint 9 support.
https://eslint.org/blog/2024/04/eslint-v9.0.0-released/

@cpontvieux-systra

This comment was marked as duplicate.

@kieuminhcanh
Copy link
Member

kieuminhcanh commented Apr 19, 2024

import vuetify from 'eslint-config-vuetify'

{
  ... 
  rules: {
      ...vuetify.rules,
      // Other rules
  }
  ...
}

@1Luc1
Copy link
Author

1Luc1 commented Apr 19, 2024

import vuetify from 'eslint-config-vuetify'

{
  ... 
  rules: {
      ...vuetify.rules,
      // Other rules
  }
  ...
}

// .eslintrc.js
https://eslint.org/docs/latest/use/configure/migration-guide

@kieuminhcanh meant to have dependency support for ESLint 9.x; still get ERESOLVE unable to resolve dependency tree for npm update:

npm ERR! While resolving: rehearsal-room-web@1.0.3
npm ERR! Found: eslint@9.0.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^9.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^8.0.0" from eslint-plugin-vuetify@2.4.0
npm ERR! node_modules/eslint-plugin-vuetify
npm ERR!   dev eslint-plugin-vuetify@"^2.4.0" from the root project

@corbinu
Copy link

corbinu commented Apr 20, 2024

@kieuminhcanh Can you please reopen? This request was for eslint-plugin-vuetify not eslint-config-vuetify.

@corbinu
Copy link

corbinu commented Apr 20, 2024

@1Luc1 I tried updating this repo to 9 but all the tests fail for not being flat file config. I will take a look to see if I can get them updated tomorrow and make a PR

@SamPulmanCL
Copy link

Hi, are there any updates on this?

@crystalfp
Copy link

Tried brute force to use the plugin in flat config file.
After installing eslint-plugin-vuetify , I have added the following lines to eslint.config.mjs as all other plugins:

import vuetifyPlugin from "eslint-plugin-vuetify";
. . .
    plugins: {
        . . .
        vuetify: vuetifyPlugin
    }
. . .
    rules: {
        . . .
        ...vuetifyPlugin.configs["base"].rules,
    }

elicited a

TypeError: Error while loading rule 'vuetify/no-deprecated-classes': Cannot read properties of undefined (reading 'defineTemplateBodyVisitor')

This means I should I wait for an official release that supports ESlint 9.0?
Thanks!
mario

@matteiben-onx
Copy link

matteiben-onx commented Jun 17, 2024

I found you can use this guide for compatibility

https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config

import { FlatCompat } from "@eslint/eslintrc"
import pluginVue from "eslint-plugin-vue"
import pluginVuetify from "eslint-plugin-vuetify"

const compat = new FlatCompat({
  config: pluginVuetify.configs.recommended,
})

export default [
  ...pluginVue.configs["flat/essential"],
  ...pluginVue.configs["flat/recommended"],
  ...pluginVue.configs["flat/strongly-recommended"],
  ...compat.extends("plugin:vue/base", "plugin:vuetify/base"),
]

@crystalfp
Copy link

crystalfp commented Jun 17, 2024

Yes, thanks! This helps but not solve the problem that a simple npm up fails because it expects eslint 8.56.0 and I should remember to use npm up --force

@jakubmatisak
Copy link

Hi, is there any update on this? Eslint 9.8 is already released and we cannot upgrade without using --force.
Thanks.

@jewpaltz
Copy link

jewpaltz commented Aug 7, 2024

Is this going anywhere?
What is the recommended way to upgrade a large project without an eslint plugin?

@jewpaltz
Copy link

I submitted a PR that fixes this and makes eslint-plugin-vuetifyc compatible with eslint 9.x
#102

@jewpaltz
Copy link

To use my fork until they merge my PR into the official npm package:
Clone https://github.com/jewpaltz/eslint-plugin-vuetify into a folder in your repo (creating a submodule).
Then in your eslint.config.js add

// eslint.config.js
import pluginVuetify from "../eslint-plugin-vuetify/src/configs/flat/base.js" // or whatever the path to your submodule is.
// To use the `recommended` configuration (including extra rules for the grid system) replace `base.js` with `recommended.js`

export default [
  pluginVuetify
]

Remember that my code will need to be available to your CI/CD system. So keep that in mind when cloning your repo. Make sure that it's included in your git repo.

@sk-tjdownes
Copy link

I would like to see the fixed merged, just a friendly reminder. Thanks!

@Manush54
Copy link

Manush54 commented Oct 23, 2024

Please resolve this as soon as possible. Thanks! @KaelWD

@jewpaltz
Copy link

I submitted a pull request that fixes this two months ago. It still hasn't been merged

@cpontvieux-systra
Copy link

@derwaldgeist
Copy link

Bump.

@KaelWD KaelWD mentioned this issue Nov 15, 2024
1 task
KaelWD added a commit that referenced this issue Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet