https://github.com/vuetifyjs/eslint-plugin-vuetify
An eslint plugin for Vuetify
https://github.com/vuetifyjs/eslint-plugin-vuetify
eslint-plugin vuetify
Last synced: 7 months ago
JSON representation
An eslint plugin for Vuetify
- Host: GitHub
- URL: https://github.com/vuetifyjs/eslint-plugin-vuetify
- Owner: vuetifyjs
- License: other
- Created: 2019-06-22T18:07:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-18T11:32:19.000Z (9 months ago)
- Last Synced: 2025-05-09T14:53:38.429Z (7 months ago)
- Topics: eslint-plugin, vuetify
- Language: JavaScript
- Homepage:
- Size: 281 KB
- Stars: 121
- Watchers: 23
- Forks: 26
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# eslint-plugin-vuetify
This package is for migrating from Vuetify v2 to v3, use [eslint-plugin-vuetify@vuetify-2](https://www.npmjs.com/package/eslint-plugin-vuetify/v/vuetify-2) for v1 to v2.
Support the maintainer of this plugin:
Kael Watts-Deuchar
## 💿 Install
You should have [`eslint`](https://eslint.org/docs/latest/use/getting-started) and [`eslint-plugin-vue`](https://eslint.vuejs.org/user-guide/#installation) set up first.
```bash
yarn add eslint-plugin-vuetify -D
# OR
npm install eslint-plugin-vuetify --save-dev
```
```js
// eslint.config.js
import vue from 'eslint-plugin-vue'
import vuetify from 'eslint-plugin-vuetify'
export default [
...vue.configs['flat/base'],
...vuetify.configs['flat/base'],
]
```
Eslint 8 can alternatively use the older configuration format:
```js
// .eslintrc.js
module.exports = {
extends: [
'plugin:vue/base',
'plugin:vuetify/base'
]
}
```
**NOTE** This plugin does not affect _**pug**_ templates due to [a limitation in vue-eslint-parser](https://github.com/mysticatea/vue-eslint-parser/issues/29). I suggest converting your pug templates to HTML with [pug-to-html](https://github.com/leo-buneev/pug-to-html) in order to use this plugin.
## Rules
### Deprecations
These rules will help you avoid deprecated components, props, and classes. They are included in the `base` preset.
- Prevent the use of components that have been removed from Vuetify ([`no-deprecated-components`])
- Prevent the use of props that have been removed from Vuetify ([`no-deprecated-props`])
- Prevent the use of events that have been removed from Vuetify ([`no-deprecated-events`])
- Prevent the use of classes that have been removed from Vuetify ([`no-deprecated-classes`])
- Prevent the use of the old theme class syntax ([`no-deprecated-colors`])
- Prevent the use of deprecated import paths ([`no-deprecated-imports`])
- Ensure icon buttons have a variant defined ([`icon-button-variant`])
### Grid system
These rules are designed to help migrate to the new grid system in Vuetify v2. They are included in the `recommended` preset.
- Warn about unknown attributes not being converted to classes on new grid components ([`grid-unknown-attributes`])
[`grid-unknown-attributes`]: ./docs/rules/grid-unknown-attributes.md
[`no-deprecated-components`]: ./docs/rules/no-deprecated-components.md
[`no-deprecated-props`]: ./docs/rules/no-deprecated-props.md
[`no-deprecated-events`]: ./docs/rules/no-deprecated-events.md
[`no-deprecated-classes`]: ./docs/rules/no-deprecated-classes.md
[`no-deprecated-colors`]: ./docs/rules/no-deprecated-colors.md
[`no-deprecated-imports`]: ./docs/rules/no-deprecated-imports.md
[`icon-button-variant`]: ./docs/rules/icon-button-variant.md
## 💪 Supporting Vuetify
Vuetify is an open source MIT project that has been made possible due to the generous contributions by community backers. If you are interested in supporting this project, please consider:
-
Becoming a sponsor on Github
(supports Kael)
-
Becoming a backer on OpenCollective
(supports the Dev team)
-
Become a subscriber on Tidelift
-
Make a one-time payment with Paypal
-
Book time with John
### 📑 License
[MIT](http://opensource.org/licenses/MIT)
Copyright (c) 2016-present Vuetify LLC