Skip to content

Commit 7e4c894

Browse files
committed
Init rule vue/require-valid-default-prop.
1 parent 3361366 commit 7e4c894

File tree

3 files changed

+401
-0
lines changed

3 files changed

+401
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Enforces prop default values to be valid. (require-valid-default-prop)
2+
3+
Please describe the origin of the rule here.
4+
5+
6+
## Rule Details
7+
8+
This rule aims to...
9+
10+
Examples of **incorrect** code for this rule:
11+
12+
```js
13+
14+
// fill me in
15+
16+
```
17+
18+
Examples of **correct** code for this rule:
19+
20+
```js
21+
22+
// fill me in
23+
24+
```
25+
26+
### Options
27+
28+
If there are any options, describe them here. Otherwise, delete this section.
29+
30+
## When Not To Use It
31+
32+
Give a short description of when it would be appropriate to turn off this rule.
33+
34+
## Further Reading
35+
36+
If there are other links that describe the issue this rule addresses, please include them here in a bulleted list.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/**
2+
* @fileoverview Enforces prop default values to be valid.
3+
* @author Armano
4+
*/
5+
'use strict'
6+
const utils = require('../utils')
7+
8+
// ------------------------------------------------------------------------------
9+
// Rule Definition
10+
// ------------------------------------------------------------------------------
11+
12+
module.exports = {
13+
meta: {
14+
docs: {
15+
description: 'Enforces prop default values to be valid.',
16+
category: 'Possible Errors',
17+
recommended: false
18+
},
19+
fixable: null, // or "code" or "whitespace"
20+
schema: []
21+
},
22+
23+
create (context) {
24+
// variables should be defined here
25+
26+
// ----------------------------------------------------------------------
27+
// Helpers
28+
// ----------------------------------------------------------------------
29+
30+
// any helper functions should go here or else delete this section
31+
32+
// ----------------------------------------------------------------------
33+
// Public
34+
// ----------------------------------------------------------------------
35+
36+
return utils.executeOnVue(context, properties => {
37+
// give me methods
38+
})
39+
}
40+
}

0 commit comments

Comments
 (0)