eslint-plugin-vuetify icon indicating copy to clipboard operation
eslint-plugin-vuetify copied to clipboard

Required changes to be compatible with eslint 9.x

Open jewpaltz opened this issue 1 year ago • 2 comments

Fixes references to context methods that were moved onto the SourceCode object and/or renamed in eslint 9.x as explained at https://eslint.org/docs/latest/use/migrate-to-9.0.0#-removed-multiple-context-methods

This is the first step in remedying issue https://github.com/vuetifyjs/eslint-plugin-vuetify/issues/93.

I've split up my proposed changes into two PRs. So that you can easily evaluate each aspects benefits and proposed solution independently.

After merging this PR it will be possible to run this plugin with eslint version 9.0.0 and higher. As it does fix all of the breaking changes. However it will take a little extra code in the eslint.config.js. I will improve on that with a follow up PR which will give an option to add eslint-plugin-vuetify to the new "flat" options file now required in eslint 9.x

In the meantime. In order to use this plugin with eslint 9.x in the flat configuration file. You need to add the following code to your eslint.config.js or equivalent file.

import pluginVuetify from "../../eslint-plugin-vuetify/src/index.js"

export default [
  {
    files: ['*.vue', '**/*.vue'],
    plugins: {
      vuetify: pluginVuetify,
    },
    rules: {
      ...pluginVuetify.configs.base.rules,
    },
  },
]

Eslint 9.0 was released in April 2024. It is imperative as an eslint plugin that we provide a 9.x compatible version of our product ASAP.It is hampering developers offorts in migrating their vuetify 2.x code to 3.x

jewpaltz avatar Aug 19 '24 11:08 jewpaltz

I only changed the peerDependency to ^9.0.0 The eslint controlling the code in this repo is still 8.x It is not necessary to update it to 9.x for the published plugin to work for eslint 9.x I will leave upgrading that to someone else.

jewpaltz avatar Aug 19 '24 11:08 jewpaltz

Ok, Github is putting both commits into the same PR. So, the PR now includes all changes needed to migrate this plugin completely to eslint 9.x including the new "flat" configuration system.

This PR now completely CLOSES issue https://github.com/vuetifyjs/eslint-plugin-vuetify/issues/93

@KaelWD please take a look at this and merge it as soon as possible. I know that a number of people are waiting for it to migrate their projects from Vuetify 2.x to 3.x and by extension migrating their projects from vue 2.x to 3.x

jewpaltz avatar Aug 19 '24 16:08 jewpaltz