https://github.com/monade/eslint-plugin-vue2
A couple of quality of life eslint rules for vue2 + class components
https://github.com/monade/eslint-plugin-vue2
eslint eslint-plugin vue
Last synced: about 2 months ago
JSON representation
A couple of quality of life eslint rules for vue2 + class components
- Host: GitHub
- URL: https://github.com/monade/eslint-plugin-vue2
- Owner: monade
- License: mit
- Created: 2021-08-06T21:40:06.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-24T14:38:13.000Z (over 4 years ago)
- Last Synced: 2025-11-11T19:33:35.273Z (8 months ago)
- Topics: eslint, eslint-plugin, vue
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @monade/eslint-plugin-vue2
A couple of quality-of-life eslint rules for vue2 + class components.
## Usage
Install:
```bash
$ yarn add https://github.com/monade/eslint-plugin-vue2.git
```
Add to your .eslint.js:
```javascript
plugins: [
...,
"@monade/vue2"
]
...
rules: {
...,
"@monade/vue2/readonly-props": 2,
"@monade/vue2/missing-component-decorator": 2,
"@monade/vue2/broken-reactivity": 2,
}
```
## Rules
### missing-component-decorator
It marks an error when you forget to add the @Component decorator to a Vue component.
### readonly-props
It marks error if a @Prop or @Ref is missing the readonly statement.
### broken-reactivity
It marks an error when you forget to set a default value to data in vue components.
## TODO
* Improve documentation