@neralabs/rerail-pack-vue 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -12
- package/licenses/eslint-plugin-vue/UPSTREAM.md +192 -1
- package/pack.json +136 -2
- package/package.json +1 -1
- package/rules/eslint-plugin-vue-attribute-hyphenation.json +570 -0
- package/rules/eslint-plugin-vue-no-async-in-computed-properties.json +1749 -0
- package/rules/eslint-plugin-vue-no-child-content.json +193 -0
- package/rules/eslint-plugin-vue-no-deprecated-v-on-native-modifier.json +59 -0
- package/rules/eslint-plugin-vue-no-duplicate-attributes.json +163 -0
- package/rules/eslint-plugin-vue-no-export-in-script-setup.json +213 -0
- package/rules/eslint-plugin-vue-no-mutating-props.json +2427 -0
- package/rules/eslint-plugin-vue-no-ref-as-operand.json +1164 -0
- package/rules/eslint-plugin-vue-no-setup-props-reactivity-loss.json +2098 -0
- package/rules/eslint-plugin-vue-no-side-effects-in-computed-properties.json +1627 -0
- package/rules/eslint-plugin-vue-no-template-shadow.json +749 -0
- package/rules/eslint-plugin-vue-no-unused-vars.json +545 -0
- package/rules/eslint-plugin-vue-no-use-v-if-with-v-for.json +355 -0
- package/rules/eslint-plugin-vue-no-v-html.json +43 -0
- package/rules/eslint-plugin-vue-no-v-text-v-html-on-component.json +456 -0
- package/rules/eslint-plugin-vue-no-watch-after-await.json +483 -0
- package/rules/eslint-plugin-vue-require-v-for-key.json +568 -0
- package/rules/eslint-plugin-vue-v-on-event-hyphenation.json +498 -0
- package/rules/eslint-plugin-vue-valid-v-for.json +1744 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "rerail.policy/v1",
|
|
3
|
+
"id": "eslint-plugin-vue-no-child-content",
|
|
4
|
+
"revision": 1,
|
|
5
|
+
"mode": "steer",
|
|
6
|
+
"description": "Don't put child content inside a Vue element that has v-html or v-text; the directive overwrites it.",
|
|
7
|
+
"scope": {
|
|
8
|
+
"include": [
|
|
9
|
+
"**/*.vue"
|
|
10
|
+
],
|
|
11
|
+
"exclude": []
|
|
12
|
+
},
|
|
13
|
+
"clauses": [
|
|
14
|
+
{
|
|
15
|
+
"id": "v-html",
|
|
16
|
+
"forbid": {
|
|
17
|
+
"ast": {
|
|
18
|
+
"language": "vue",
|
|
19
|
+
"rule": {
|
|
20
|
+
"any": [
|
|
21
|
+
{
|
|
22
|
+
"kind": "element"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"kind": "template_element"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"regex": "^<(?:[^>\"']|\"[^\"]*\"|'[^']*')*>(?P<CHILDREN>[\\s\\S]*)</[^<>]*>$",
|
|
29
|
+
"has": {
|
|
30
|
+
"stopBy": "neighbor",
|
|
31
|
+
"kind": "start_tag",
|
|
32
|
+
"has": {
|
|
33
|
+
"stopBy": "neighbor",
|
|
34
|
+
"kind": "directive_attribute",
|
|
35
|
+
"has": {
|
|
36
|
+
"stopBy": "neighbor",
|
|
37
|
+
"kind": "directive_name",
|
|
38
|
+
"regex": "^v-html$"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"all": [
|
|
42
|
+
{
|
|
43
|
+
"precedes": {
|
|
44
|
+
"stopBy": "end",
|
|
45
|
+
"kind": "end_tag"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"precedes": {
|
|
50
|
+
"stopBy": "end",
|
|
51
|
+
"any": [
|
|
52
|
+
{
|
|
53
|
+
"kind": "interpolation"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"kind": "comment"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"kind": "element"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"kind": "template_element"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"kind": "script_element"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"kind": "style_element"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"kind": "entity",
|
|
72
|
+
"not": {
|
|
73
|
+
"regex": "^&(?:#(?:0*(?:9|1[0-3]|32|160|5760|819[2-9]|820[0-2]|8232|8233|8239|8287|12288|65279)|[xX]0*(?:9|[a-dA-D]|20|[aA]0|1680|200[0-9aA]|202[89]|202[fF]|205[fF]|3000|[fF][eE][fF][fF]))|Tab|NewLine|nbsp|NonBreakingSpace|ensp|emsp|emsp13|emsp14|numsp|puncsp|thinsp|ThinSpace|hairsp|VeryThinSpace|MediumSpace);?$"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"kind": "text",
|
|
78
|
+
"not": {
|
|
79
|
+
"regex": "^(?:\\s|&(?:#(?:0*(?:9|1[0-3]|32|160|5760|819[2-9]|820[0-2]|8232|8233|8239|8287|12288|65279)|[xX]0*(?:9|[a-dA-D]|20|[aA]0|1680|200[0-9aA]|202[89]|202[fF]|205[fF]|3000|[fF][eE][fF][fF]))|Tab|NewLine|nbsp|NonBreakingSpace|ensp|emsp|emsp13|emsp14|numsp|puncsp|thinsp|ThinSpace|hairsp|VeryThinSpace|MediumSpace);?)*$"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"violation": {
|
|
91
|
+
"anchor": "capture.CHILDREN",
|
|
92
|
+
"code": "vue/no-child-content",
|
|
93
|
+
"message": "Child content is disallowed because it will be overwritten by the v-html directive.",
|
|
94
|
+
"suppress": {
|
|
95
|
+
"eslint": {
|
|
96
|
+
"rules": [
|
|
97
|
+
"vue/no-child-content"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "v-text",
|
|
105
|
+
"forbid": {
|
|
106
|
+
"ast": {
|
|
107
|
+
"language": "vue",
|
|
108
|
+
"rule": {
|
|
109
|
+
"any": [
|
|
110
|
+
{
|
|
111
|
+
"kind": "element"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"kind": "template_element"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"regex": "^<(?:[^>\"']|\"[^\"]*\"|'[^']*')*>(?P<CHILDREN>[\\s\\S]*)</[^<>]*>$",
|
|
118
|
+
"has": {
|
|
119
|
+
"stopBy": "neighbor",
|
|
120
|
+
"kind": "start_tag",
|
|
121
|
+
"has": {
|
|
122
|
+
"stopBy": "neighbor",
|
|
123
|
+
"kind": "directive_attribute",
|
|
124
|
+
"has": {
|
|
125
|
+
"stopBy": "neighbor",
|
|
126
|
+
"kind": "directive_name",
|
|
127
|
+
"regex": "^v-text$"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"all": [
|
|
131
|
+
{
|
|
132
|
+
"precedes": {
|
|
133
|
+
"stopBy": "end",
|
|
134
|
+
"kind": "end_tag"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"precedes": {
|
|
139
|
+
"stopBy": "end",
|
|
140
|
+
"any": [
|
|
141
|
+
{
|
|
142
|
+
"kind": "interpolation"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"kind": "comment"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"kind": "element"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"kind": "template_element"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"kind": "script_element"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"kind": "style_element"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"kind": "entity",
|
|
161
|
+
"not": {
|
|
162
|
+
"regex": "^&(?:#(?:0*(?:9|1[0-3]|32|160|5760|819[2-9]|820[0-2]|8232|8233|8239|8287|12288|65279)|[xX]0*(?:9|[a-dA-D]|20|[aA]0|1680|200[0-9aA]|202[89]|202[fF]|205[fF]|3000|[fF][eE][fF][fF]))|Tab|NewLine|nbsp|NonBreakingSpace|ensp|emsp|emsp13|emsp14|numsp|puncsp|thinsp|ThinSpace|hairsp|VeryThinSpace|MediumSpace);?$"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"kind": "text",
|
|
167
|
+
"not": {
|
|
168
|
+
"regex": "^(?:\\s|&(?:#(?:0*(?:9|1[0-3]|32|160|5760|819[2-9]|820[0-2]|8232|8233|8239|8287|12288|65279)|[xX]0*(?:9|[a-dA-D]|20|[aA]0|1680|200[0-9aA]|202[89]|202[fF]|205[fF]|3000|[fF][eE][fF][fF]))|Tab|NewLine|nbsp|NonBreakingSpace|ensp|emsp|emsp13|emsp14|numsp|puncsp|thinsp|ThinSpace|hairsp|VeryThinSpace|MediumSpace);?)*$"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"violation": {
|
|
180
|
+
"anchor": "capture.CHILDREN",
|
|
181
|
+
"code": "vue/no-child-content",
|
|
182
|
+
"message": "Child content is disallowed because it will be overwritten by the v-text directive.",
|
|
183
|
+
"suppress": {
|
|
184
|
+
"eslint": {
|
|
185
|
+
"rules": [
|
|
186
|
+
"vue/no-child-content"
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "rerail.policy/v1",
|
|
3
|
+
"id": "eslint-plugin-vue-no-deprecated-v-on-native-modifier",
|
|
4
|
+
"revision": 1,
|
|
5
|
+
"mode": "steer",
|
|
6
|
+
"description": "Remove the .native modifier from v-on listeners; Vue 3 dropped it and passes listeners to the component root on its own.",
|
|
7
|
+
"scope": {
|
|
8
|
+
"include": [
|
|
9
|
+
"**/*.vue"
|
|
10
|
+
],
|
|
11
|
+
"exclude": []
|
|
12
|
+
},
|
|
13
|
+
"clauses": [
|
|
14
|
+
{
|
|
15
|
+
"id": "upstream",
|
|
16
|
+
"forbid": {
|
|
17
|
+
"ast": {
|
|
18
|
+
"language": "vue",
|
|
19
|
+
"rule": {
|
|
20
|
+
"kind": "directive_modifier",
|
|
21
|
+
"regex": "^native$",
|
|
22
|
+
"inside": {
|
|
23
|
+
"stopBy": "neighbor",
|
|
24
|
+
"kind": "directive_modifiers",
|
|
25
|
+
"inside": {
|
|
26
|
+
"stopBy": "neighbor",
|
|
27
|
+
"kind": "directive_attribute",
|
|
28
|
+
"any": [
|
|
29
|
+
{
|
|
30
|
+
"has": {
|
|
31
|
+
"stopBy": "neighbor",
|
|
32
|
+
"kind": "directive_name",
|
|
33
|
+
"regex": "^v-on$"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"regex": "^@"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"violation": {
|
|
46
|
+
"anchor": "witness.span",
|
|
47
|
+
"code": "vue/no-deprecated-v-on-native-modifier",
|
|
48
|
+
"message": "Remove the .native modifier from this v-on listener; Vue 3 passes listeners to the component root itself.",
|
|
49
|
+
"suppress": {
|
|
50
|
+
"eslint": {
|
|
51
|
+
"rules": [
|
|
52
|
+
"vue/no-deprecated-v-on-native-modifier"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "rerail.policy/v1",
|
|
3
|
+
"id": "eslint-plugin-vue-no-duplicate-attributes",
|
|
4
|
+
"revision": 1,
|
|
5
|
+
"mode": "steer",
|
|
6
|
+
"description": "Avoid repeating an attribute on one Vue template element; only class and style may appear twice, once plain and once bound.",
|
|
7
|
+
"scope": {
|
|
8
|
+
"include": [
|
|
9
|
+
"**/*.vue"
|
|
10
|
+
],
|
|
11
|
+
"exclude": []
|
|
12
|
+
},
|
|
13
|
+
"clauses": [
|
|
14
|
+
{
|
|
15
|
+
"id": "upstream",
|
|
16
|
+
"forbid": {
|
|
17
|
+
"ast": {
|
|
18
|
+
"language": "vue",
|
|
19
|
+
"utils": {
|
|
20
|
+
"plain-x": {
|
|
21
|
+
"kind": "attribute",
|
|
22
|
+
"has": {
|
|
23
|
+
"stopBy": "neighbor",
|
|
24
|
+
"kind": "attribute_name",
|
|
25
|
+
"pattern": "$N"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"bind-x": {
|
|
29
|
+
"kind": "directive_attribute",
|
|
30
|
+
"any": [
|
|
31
|
+
{
|
|
32
|
+
"regex": "^[:.]"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"has": {
|
|
36
|
+
"stopBy": "neighbor",
|
|
37
|
+
"kind": "directive_name",
|
|
38
|
+
"regex": "^v-bind$"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"has": {
|
|
43
|
+
"stopBy": "neighbor",
|
|
44
|
+
"kind": "directive_value",
|
|
45
|
+
"pattern": "$N"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"plain-p": {
|
|
49
|
+
"kind": "attribute",
|
|
50
|
+
"has": {
|
|
51
|
+
"stopBy": "neighbor",
|
|
52
|
+
"kind": "attribute_name",
|
|
53
|
+
"pattern": "$P"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"bind-p": {
|
|
57
|
+
"kind": "directive_attribute",
|
|
58
|
+
"any": [
|
|
59
|
+
{
|
|
60
|
+
"regex": "^[:.]"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"has": {
|
|
64
|
+
"stopBy": "neighbor",
|
|
65
|
+
"kind": "directive_name",
|
|
66
|
+
"regex": "^v-bind$"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"has": {
|
|
71
|
+
"stopBy": "neighbor",
|
|
72
|
+
"kind": "directive_value",
|
|
73
|
+
"pattern": "$P"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"rule": {
|
|
78
|
+
"any": [
|
|
79
|
+
{
|
|
80
|
+
"matches": "plain-x",
|
|
81
|
+
"follows": {
|
|
82
|
+
"stopBy": "end",
|
|
83
|
+
"matches": "plain-p",
|
|
84
|
+
"compare": {
|
|
85
|
+
"left": "P",
|
|
86
|
+
"op": "eq",
|
|
87
|
+
"right": "N",
|
|
88
|
+
"text": "source"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"matches": "bind-x",
|
|
94
|
+
"follows": {
|
|
95
|
+
"stopBy": "end",
|
|
96
|
+
"matches": "bind-p",
|
|
97
|
+
"compare": {
|
|
98
|
+
"left": "P",
|
|
99
|
+
"op": "eq",
|
|
100
|
+
"right": "N",
|
|
101
|
+
"text": "source"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"matches": "plain-x",
|
|
107
|
+
"not": {
|
|
108
|
+
"has": {
|
|
109
|
+
"stopBy": "neighbor",
|
|
110
|
+
"kind": "attribute_name",
|
|
111
|
+
"regex": "^(?:class|style)$"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"follows": {
|
|
115
|
+
"stopBy": "end",
|
|
116
|
+
"matches": "bind-p",
|
|
117
|
+
"compare": {
|
|
118
|
+
"left": "P",
|
|
119
|
+
"op": "eq",
|
|
120
|
+
"right": "N",
|
|
121
|
+
"text": "source"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"matches": "bind-x",
|
|
127
|
+
"not": {
|
|
128
|
+
"has": {
|
|
129
|
+
"stopBy": "neighbor",
|
|
130
|
+
"kind": "directive_value",
|
|
131
|
+
"regex": "^(?:class|style)$"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"follows": {
|
|
135
|
+
"stopBy": "end",
|
|
136
|
+
"matches": "plain-p",
|
|
137
|
+
"compare": {
|
|
138
|
+
"left": "P",
|
|
139
|
+
"op": "eq",
|
|
140
|
+
"right": "N",
|
|
141
|
+
"text": "source"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"violation": {
|
|
150
|
+
"anchor": "witness.span",
|
|
151
|
+
"code": "vue/no-duplicate-attributes",
|
|
152
|
+
"message": "Duplicate attribute '$N'.",
|
|
153
|
+
"suppress": {
|
|
154
|
+
"eslint": {
|
|
155
|
+
"rules": [
|
|
156
|
+
"vue/no-duplicate-attributes"
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "rerail.policy/v1",
|
|
3
|
+
"id": "eslint-plugin-vue-no-export-in-script-setup",
|
|
4
|
+
"revision": 1,
|
|
5
|
+
"mode": "steer",
|
|
6
|
+
"description": "Don't export values from a Vue script setup block (type exports are fine); put shared exports in a separate regular script block.",
|
|
7
|
+
"scope": {
|
|
8
|
+
"include": [
|
|
9
|
+
"**/*.vue"
|
|
10
|
+
],
|
|
11
|
+
"exclude": []
|
|
12
|
+
},
|
|
13
|
+
"clauses": [
|
|
14
|
+
{
|
|
15
|
+
"id": "shared",
|
|
16
|
+
"define": {
|
|
17
|
+
"language": "vue",
|
|
18
|
+
"utils": {
|
|
19
|
+
"forbidden-export": {
|
|
20
|
+
"all": [
|
|
21
|
+
{
|
|
22
|
+
"kind": "export_statement"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"follows": {
|
|
26
|
+
"stopBy": {
|
|
27
|
+
"kind": "empty_statement",
|
|
28
|
+
"host": {
|
|
29
|
+
"kind": "start_tag",
|
|
30
|
+
"regex": "^<script\\b"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"kind": "empty_statement",
|
|
34
|
+
"host": {
|
|
35
|
+
"kind": "start_tag",
|
|
36
|
+
"regex": "^<script(?:\\s+[^\\s\"'<>/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s\"'<>=`]+))?)*\\s+setup(?:[\\s/>=]|$)"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"not": {
|
|
42
|
+
"any": [
|
|
43
|
+
{
|
|
44
|
+
"has": {
|
|
45
|
+
"regex": "^type$",
|
|
46
|
+
"not": {
|
|
47
|
+
"any": [
|
|
48
|
+
{
|
|
49
|
+
"kind": "identifier"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"kind": "string"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"has": {
|
|
60
|
+
"field": "declaration",
|
|
61
|
+
"any": [
|
|
62
|
+
{
|
|
63
|
+
"kind": "type_alias_declaration"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"kind": "interface_declaration"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"kind": "ambient_declaration",
|
|
70
|
+
"has": {
|
|
71
|
+
"any": [
|
|
72
|
+
{
|
|
73
|
+
"kind": "type_alias_declaration"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"kind": "interface_declaration"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"has": {
|
|
86
|
+
"kind": "export_clause",
|
|
87
|
+
"all": [
|
|
88
|
+
{
|
|
89
|
+
"has": {
|
|
90
|
+
"kind": "export_specifier"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"not": {
|
|
95
|
+
"has": {
|
|
96
|
+
"kind": "export_specifier",
|
|
97
|
+
"not": {
|
|
98
|
+
"has": {
|
|
99
|
+
"regex": "^type$",
|
|
100
|
+
"not": {
|
|
101
|
+
"any": [
|
|
102
|
+
{
|
|
103
|
+
"kind": "identifier"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"kind": "string"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"declaration-export": {
|
|
124
|
+
"has": {
|
|
125
|
+
"field": "declaration",
|
|
126
|
+
"regex": "\\S"
|
|
127
|
+
},
|
|
128
|
+
"not": {
|
|
129
|
+
"has": {
|
|
130
|
+
"regex": "^default$",
|
|
131
|
+
"not": {
|
|
132
|
+
"any": [
|
|
133
|
+
{
|
|
134
|
+
"kind": "identifier"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"kind": "string"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "export-declaration-in-script-setup",
|
|
149
|
+
"forbid": {
|
|
150
|
+
"ast": {
|
|
151
|
+
"language": "vue",
|
|
152
|
+
"embedded": "script-block",
|
|
153
|
+
"rule": {
|
|
154
|
+
"regex": "^(?P<KW>export)",
|
|
155
|
+
"all": [
|
|
156
|
+
{
|
|
157
|
+
"matches": "forbidden-export"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"matches": "declaration-export"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"violation": {
|
|
167
|
+
"code": "vue/no-export-in-script-setup",
|
|
168
|
+
"anchor": "capture.KW",
|
|
169
|
+
"message": "Move this export into a separate regular `<script>` block; `<script setup>` cannot export values.",
|
|
170
|
+
"suppress": {
|
|
171
|
+
"eslint": {
|
|
172
|
+
"rules": [
|
|
173
|
+
"vue/no-export-in-script-setup"
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"id": "export-in-script-setup",
|
|
181
|
+
"forbid": {
|
|
182
|
+
"ast": {
|
|
183
|
+
"language": "vue",
|
|
184
|
+
"embedded": "script-block",
|
|
185
|
+
"rule": {
|
|
186
|
+
"all": [
|
|
187
|
+
{
|
|
188
|
+
"matches": "forbidden-export"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"not": {
|
|
192
|
+
"matches": "declaration-export"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"violation": {
|
|
200
|
+
"code": "vue/no-export-in-script-setup",
|
|
201
|
+
"anchor": "witness.span",
|
|
202
|
+
"message": "Move this export into a separate regular `<script>` block; `<script setup>` cannot export values.",
|
|
203
|
+
"suppress": {
|
|
204
|
+
"eslint": {
|
|
205
|
+
"rules": [
|
|
206
|
+
"vue/no-export-in-script-setup"
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
}
|