@tcy/eslint-rules 1.11.0 → 1.12.0

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.
Files changed (44) hide show
  1. package/README.md +26 -0
  2. package/coverage/clover.xml +140 -4
  3. package/coverage/coverage-final.json +1 -0
  4. package/coverage/lcov-report/index.html +19 -19
  5. package/coverage/lcov-report/src/array-elements-per-line.js.html +1 -1
  6. package/coverage/lcov-report/src/back/back.js.html +1 -1
  7. package/coverage/lcov-report/src/back/http.js.html +1 -1
  8. package/coverage/lcov-report/src/back/index.html +1 -1
  9. package/coverage/lcov-report/src/back/recommended.js.html +1 -1
  10. package/coverage/lcov-report/src/bin/eslint-cache-guard.js.html +1 -1
  11. package/coverage/lcov-report/src/bin/index.html +1 -1
  12. package/coverage/lcov-report/src/client/client.js.html +5 -2
  13. package/coverage/lcov-report/src/client/index.html +1 -1
  14. package/coverage/lcov-report/src/client/recommended.js.html +1 -1
  15. package/coverage/lcov-report/src/consistent-const-scoping.js.html +1 -1
  16. package/coverage/lcov-report/src/decorator-type-enforcement.js.html +1 -1
  17. package/coverage/lcov-report/src/enforce-tailwind-important.js.html +1 -1
  18. package/coverage/lcov-report/src/export-specifiers-per-line.js.html +1 -1
  19. package/coverage/lcov-report/src/import-specifiers-per-line.js.html +1 -1
  20. package/coverage/lcov-report/src/index.html +24 -9
  21. package/coverage/lcov-report/src/index.js.html +1 -1
  22. package/coverage/lcov-report/src/jsx-boolean-shorthand.js.html +1 -1
  23. package/coverage/lcov-report/src/jsx-expression-string-literals.js.html +1 -1
  24. package/coverage/lcov-report/src/jsx-ref-string-exists.js.html +1 -1
  25. package/coverage/lcov-report/src/no-static-key-in-map.js.html +1 -1
  26. package/coverage/lcov-report/src/no-unused-setup-return.js.html +1009 -0
  27. package/coverage/lcov-report/src/no-v-model-on-prop.js.html +1 -1
  28. package/coverage/lcov-report/src/plugin.js.html +8 -2
  29. package/coverage/lcov-report/src/recommended.js.html +1 -1
  30. package/coverage/lcov-report/src/require-fragment-key.js.html +1 -1
  31. package/coverage/lcov-report/src/route-dto-required.js.html +1 -1
  32. package/coverage/lcov-report/src/v-model-name-match.js.html +1 -1
  33. package/coverage/lcov-report/src/vuejs-define-component.js.html +1 -1
  34. package/coverage/lcov-report/src/vuejs-define-workspace.js.html +1 -1
  35. package/coverage/lcov.info +317 -0
  36. package/decl/back/back.d.ts +42 -0
  37. package/decl/client/client.d.ts +43 -0
  38. package/decl/no-unused-setup-return.d.ts +64 -0
  39. package/decl/plugin.d.ts +42 -0
  40. package/package.json +2 -2
  41. package/src/client/client.js +1 -0
  42. package/src/no-unused-setup-return.js +308 -0
  43. package/src/plugin.js +2 -0
  44. package/tests/no-unused-setup-return.spec.js +88 -0
@@ -538,7 +538,7 @@ export const getPropsType = <span class="fstat-no" title="function not covered"
538
538
  <div class='footer quiet pad2 space-top1 center small'>
539
539
  Code coverage generated by
540
540
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
541
- at 2026-11-04T18:06:15.732Z
541
+ at 2026-11-13T16:47:18.615Z
542
542
  </div>
543
543
  <script src="../prettify.js"></script>
544
544
  <script>
@@ -98,7 +98,11 @@
98
98
  <a name='L33'></a><a href='#L33'>33</a>
99
99
  <a name='L34'></a><a href='#L34'>34</a>
100
100
  <a name='L35'></a><a href='#L35'>35</a>
101
- <a name='L36'></a><a href='#L36'>36</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
101
+ <a name='L36'></a><a href='#L36'>36</a>
102
+ <a name='L37'></a><a href='#L37'>37</a>
103
+ <a name='L38'></a><a href='#L38'>38</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
104
+ <span class="cline-any cline-neutral">&nbsp;</span>
105
+ <span class="cline-any cline-neutral">&nbsp;</span>
102
106
  <span class="cline-any cline-neutral">&nbsp;</span>
103
107
  <span class="cline-any cline-neutral">&nbsp;</span>
104
108
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -149,6 +153,7 @@ import requireFragmentKey from './require-fragment-key.js'
149
153
  import noStaticKeyInMap from './no-static-key-in-map.js'
150
154
  import consistentConstScoping from './consistent-const-scoping.js'
151
155
  import noVModelOnProp from './no-v-model-on-prop.js'
156
+ import noUnusedSetupReturn from './no-unused-setup-return.js'
152
157
  &nbsp;
153
158
  export default {
154
159
  'import-specifiers-per-line': importSpecifiersPerLineRule,
@@ -167,6 +172,7 @@ export default {
167
172
  'no-static-key-in-map': noStaticKeyInMap,
168
173
  'consistent-const-scoping': consistentConstScoping,
169
174
  'no-v-model-on-prop': noVModelOnProp,
175
+ 'no-unused-setup-return': noUnusedSetupReturn,
170
176
  }
171
177
  &nbsp;</pre></td></tr></table></pre>
172
178
 
@@ -175,7 +181,7 @@ export default {
175
181
  <div class='footer quiet pad2 space-top1 center small'>
176
182
  Code coverage generated by
177
183
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
178
- at 2026-11-04T18:06:15.732Z
184
+ at 2026-11-13T16:47:18.615Z
179
185
  </div>
180
186
  <script src="../prettify.js"></script>
181
187
  <script>
@@ -130,7 +130,7 @@
130
130
  <div class='footer quiet pad2 space-top1 center small'>
131
131
  Code coverage generated by
132
132
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
133
- at 2026-11-04T18:06:15.732Z
133
+ at 2026-11-13T16:47:18.615Z
134
134
  </div>
135
135
  <script src="../prettify.js"></script>
136
136
  <script>
@@ -772,7 +772,7 @@ export default {
772
772
  <div class='footer quiet pad2 space-top1 center small'>
773
773
  Code coverage generated by
774
774
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
775
- at 2026-11-04T18:06:15.732Z
775
+ at 2026-11-13T16:47:18.615Z
776
776
  </div>
777
777
  <script src="../prettify.js"></script>
778
778
  <script>
@@ -298,7 +298,7 @@ export default {
298
298
  <div class='footer quiet pad2 space-top1 center small'>
299
299
  Code coverage generated by
300
300
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
301
- at 2026-11-04T18:06:15.732Z
301
+ at 2026-11-13T16:47:18.615Z
302
302
  </div>
303
303
  <script src="../prettify.js"></script>
304
304
  <script>
@@ -289,7 +289,7 @@
289
289
  <div class='footer quiet pad2 space-top1 center small'>
290
290
  Code coverage generated by
291
291
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
292
- at 2026-11-04T18:06:15.732Z
292
+ at 2026-11-13T16:47:18.615Z
293
293
  </div>
294
294
  <script src="../prettify.js"></script>
295
295
  <script>
@@ -328,7 +328,7 @@ export default {
328
328
  <div class='footer quiet pad2 space-top1 center small'>
329
329
  Code coverage generated by
330
330
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
331
- at 2026-11-04T18:06:15.732Z
331
+ at 2026-11-13T16:47:18.615Z
332
332
  </div>
333
333
  <script src="../prettify.js"></script>
334
334
  <script>
@@ -265,7 +265,7 @@ export default {
265
265
  <div class='footer quiet pad2 space-top1 center small'>
266
266
  Code coverage generated by
267
267
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
268
- at 2026-11-04T18:06:15.732Z
268
+ at 2026-11-13T16:47:18.615Z
269
269
  </div>
270
270
  <script src="../prettify.js"></script>
271
271
  <script>
@@ -937,6 +937,323 @@ BRF:47
937
937
  BRH:37
938
938
  end_of_record
939
939
  TN:
940
+ SF:src/no-unused-setup-return.js
941
+ FN:46,(anonymous_0)
942
+ FN:62,(anonymous_1)
943
+ FN:67,(anonymous_2)
944
+ FN:69,(anonymous_3)
945
+ FN:88,(anonymous_4)
946
+ FN:89,(anonymous_5)
947
+ FN:94,(anonymous_6)
948
+ FN:106,(anonymous_7)
949
+ FN:115,(anonymous_8)
950
+ FN:130,(anonymous_9)
951
+ FN:135,(anonymous_10)
952
+ FN:140,(anonymous_11)
953
+ FN:158,(anonymous_12)
954
+ FN:200,(anonymous_13)
955
+ FN:204,(anonymous_14)
956
+ FN:207,(anonymous_15)
957
+ FN:209,(anonymous_16)
958
+ FN:213,(anonymous_17)
959
+ FN:223,(anonymous_18)
960
+ FN:240,(anonymous_19)
961
+ FN:248,(anonymous_20)
962
+ FN:266,(anonymous_21)
963
+ FN:272,(anonymous_22)
964
+ FN:282,(anonymous_23)
965
+ FN:292,(anonymous_24)
966
+ FN:299,(anonymous_25)
967
+ FNF:26
968
+ FNH:10
969
+ FNDA:0,(anonymous_0)
970
+ FNDA:0,(anonymous_1)
971
+ FNDA:0,(anonymous_2)
972
+ FNDA:0,(anonymous_3)
973
+ FNDA:0,(anonymous_4)
974
+ FNDA:0,(anonymous_5)
975
+ FNDA:0,(anonymous_6)
976
+ FNDA:0,(anonymous_7)
977
+ FNDA:0,(anonymous_8)
978
+ FNDA:6,(anonymous_9)
979
+ FNDA:0,(anonymous_10)
980
+ FNDA:0,(anonymous_11)
981
+ FNDA:0,(anonymous_12)
982
+ FNDA:1,(anonymous_13)
983
+ FNDA:19,(anonymous_14)
984
+ FNDA:10,(anonymous_15)
985
+ FNDA:10,(anonymous_16)
986
+ FNDA:10,(anonymous_17)
987
+ FNDA:10,(anonymous_18)
988
+ FNDA:6,(anonymous_19)
989
+ FNDA:0,(anonymous_20)
990
+ FNDA:6,(anonymous_21)
991
+ FNDA:0,(anonymous_22)
992
+ FNDA:0,(anonymous_23)
993
+ FNDA:4,(anonymous_24)
994
+ FNDA:0,(anonymous_25)
995
+ DA:47,0
996
+ DA:50,0
997
+ DA:51,0
998
+ DA:53,0
999
+ DA:55,0
1000
+ DA:56,0
1001
+ DA:60,0
1002
+ DA:61,0
1003
+ DA:62,0
1004
+ DA:63,0
1005
+ DA:64,0
1006
+ DA:65,0
1007
+ DA:67,0
1008
+ DA:69,0
1009
+ DA:73,0
1010
+ DA:74,0
1011
+ DA:76,0
1012
+ DA:77,0
1013
+ DA:79,0
1014
+ DA:80,0
1015
+ DA:81,0
1016
+ DA:82,0
1017
+ DA:87,0
1018
+ DA:88,0
1019
+ DA:89,0
1020
+ DA:91,0
1021
+ DA:93,0
1022
+ DA:95,0
1023
+ DA:96,0
1024
+ DA:97,0
1025
+ DA:107,0
1026
+ DA:109,0
1027
+ DA:110,0
1028
+ DA:116,0
1029
+ DA:117,0
1030
+ DA:118,0
1031
+ DA:119,0
1032
+ DA:127,1
1033
+ DA:130,1
1034
+ DA:131,6
1035
+ DA:132,6
1036
+ DA:135,1
1037
+ DA:137,1
1038
+ DA:140,1
1039
+ DA:141,0
1040
+ DA:143,0
1041
+ DA:144,0
1042
+ DA:146,0
1043
+ DA:149,0
1044
+ DA:150,0
1045
+ DA:151,0
1046
+ DA:154,1
1047
+ DA:158,1
1048
+ DA:160,0
1049
+ DA:161,0
1050
+ DA:163,0
1051
+ DA:166,0
1052
+ DA:167,0
1053
+ DA:169,0
1054
+ DA:170,0
1055
+ DA:171,0
1056
+ DA:174,0
1057
+ DA:175,0
1058
+ DA:177,0
1059
+ DA:178,0
1060
+ DA:179,0
1061
+ DA:180,0
1062
+ DA:181,0
1063
+ DA:182,0
1064
+ DA:185,0
1065
+ DA:192,0
1066
+ DA:193,0
1067
+ DA:200,1
1068
+ DA:204,19
1069
+ DA:207,1
1070
+ DA:208,10
1071
+ DA:209,10
1072
+ DA:213,1
1073
+ DA:214,10
1074
+ DA:215,10
1075
+ DA:223,1
1076
+ DA:224,10
1077
+ DA:225,10
1078
+ DA:227,9
1079
+ DA:228,9
1080
+ DA:230,7
1081
+ DA:231,7
1082
+ DA:232,7
1083
+ DA:234,7
1084
+ DA:235,7
1085
+ DA:236,7
1086
+ DA:240,1
1087
+ DA:241,6
1088
+ DA:242,6
1089
+ DA:245,1
1090
+ DA:248,1
1091
+ DA:249,0
1092
+ DA:250,0
1093
+ DA:251,0
1094
+ DA:252,0
1095
+ DA:254,0
1096
+ DA:255,0
1097
+ DA:256,0
1098
+ DA:257,0
1099
+ DA:262,0
1100
+ DA:266,1
1101
+ DA:267,6
1102
+ DA:268,6
1103
+ DA:272,1
1104
+ DA:273,0
1105
+ DA:274,0
1106
+ DA:275,0
1107
+ DA:276,0
1108
+ DA:277,0
1109
+ DA:279,0
1110
+ DA:282,1
1111
+ DA:283,0
1112
+ DA:284,0
1113
+ DA:285,0
1114
+ DA:286,0
1115
+ DA:287,0
1116
+ DA:289,0
1117
+ DA:292,1
1118
+ DA:293,4
1119
+ DA:294,2
1120
+ DA:295,1
1121
+ DA:296,0
1122
+ DA:299,1
1123
+ DA:300,0
1124
+ DA:301,0
1125
+ DA:302,0
1126
+ DA:304,0
1127
+ DA:305,0
1128
+ LF:133
1129
+ LH:43
1130
+ BRDA:47,0,0,0
1131
+ BRDA:47,0,1,0
1132
+ BRDA:51,1,0,0
1133
+ BRDA:51,1,1,0
1134
+ BRDA:51,2,0,0
1135
+ BRDA:51,2,1,0
1136
+ BRDA:53,3,0,0
1137
+ BRDA:53,4,0,0
1138
+ BRDA:53,4,1,0
1139
+ BRDA:56,5,0,0
1140
+ BRDA:56,5,1,0
1141
+ BRDA:61,6,0,0
1142
+ BRDA:61,6,1,0
1143
+ BRDA:62,7,0,0
1144
+ BRDA:62,7,1,0
1145
+ BRDA:63,8,0,0
1146
+ BRDA:63,8,1,0
1147
+ BRDA:63,9,0,0
1148
+ BRDA:63,9,1,0
1149
+ BRDA:64,10,0,0
1150
+ BRDA:64,10,1,0
1151
+ BRDA:67,11,0,0
1152
+ BRDA:67,11,1,0
1153
+ BRDA:74,12,0,0
1154
+ BRDA:74,12,1,0
1155
+ BRDA:74,13,0,0
1156
+ BRDA:74,13,1,0
1157
+ BRDA:77,14,0,0
1158
+ BRDA:77,14,1,0
1159
+ BRDA:81,15,0,0
1160
+ BRDA:81,15,1,0
1161
+ BRDA:96,16,0,0
1162
+ BRDA:96,16,1,0
1163
+ BRDA:96,17,0,0
1164
+ BRDA:96,17,1,0
1165
+ BRDA:109,18,0,0
1166
+ BRDA:109,18,1,0
1167
+ BRDA:109,19,0,0
1168
+ BRDA:109,19,1,0
1169
+ BRDA:116,20,0,0
1170
+ BRDA:116,20,1,0
1171
+ BRDA:118,21,0,0
1172
+ BRDA:118,21,1,0
1173
+ BRDA:118,22,0,0
1174
+ BRDA:118,22,1,0
1175
+ BRDA:132,23,0,6
1176
+ BRDA:132,23,1,3
1177
+ BRDA:132,23,2,3
1178
+ BRDA:135,24,0,0
1179
+ BRDA:135,24,1,0
1180
+ BRDA:169,25,0,0
1181
+ BRDA:169,25,1,0
1182
+ BRDA:170,26,0,0
1183
+ BRDA:170,26,1,0
1184
+ BRDA:170,27,0,0
1185
+ BRDA:170,27,1,0
1186
+ BRDA:175,28,0,0
1187
+ BRDA:175,28,1,0
1188
+ BRDA:175,29,0,0
1189
+ BRDA:175,29,1,0
1190
+ BRDA:175,29,2,0
1191
+ BRDA:175,29,3,0
1192
+ BRDA:180,30,0,0
1193
+ BRDA:180,30,1,0
1194
+ BRDA:215,31,0,10
1195
+ BRDA:215,31,1,0
1196
+ BRDA:215,32,0,10
1197
+ BRDA:215,32,1,1
1198
+ BRDA:225,33,0,1
1199
+ BRDA:225,33,1,9
1200
+ BRDA:228,34,0,2
1201
+ BRDA:228,34,1,7
1202
+ BRDA:242,35,0,6
1203
+ BRDA:242,35,1,5
1204
+ BRDA:251,36,0,0
1205
+ BRDA:251,36,1,0
1206
+ BRDA:251,36,2,0
1207
+ BRDA:252,37,0,0
1208
+ BRDA:252,37,1,0
1209
+ BRDA:268,38,0,6
1210
+ BRDA:268,38,1,5
1211
+ BRDA:268,38,2,4
1212
+ BRDA:274,39,0,0
1213
+ BRDA:274,39,1,0
1214
+ BRDA:274,40,0,0
1215
+ BRDA:274,40,1,0
1216
+ BRDA:275,41,0,0
1217
+ BRDA:275,41,1,0
1218
+ BRDA:276,42,0,0
1219
+ BRDA:276,42,1,0
1220
+ BRDA:276,43,0,0
1221
+ BRDA:276,43,1,0
1222
+ BRDA:277,44,0,0
1223
+ BRDA:277,44,1,0
1224
+ BRDA:277,44,2,0
1225
+ BRDA:284,45,0,0
1226
+ BRDA:284,45,1,0
1227
+ BRDA:285,46,0,0
1228
+ BRDA:285,46,1,0
1229
+ BRDA:285,47,0,0
1230
+ BRDA:285,47,1,0
1231
+ BRDA:285,47,2,0
1232
+ BRDA:286,48,0,0
1233
+ BRDA:286,48,1,0
1234
+ BRDA:286,49,0,0
1235
+ BRDA:286,49,1,0
1236
+ BRDA:286,49,2,0
1237
+ BRDA:293,50,0,2
1238
+ BRDA:293,50,1,2
1239
+ BRDA:293,51,0,4
1240
+ BRDA:293,51,1,3
1241
+ BRDA:294,52,0,1
1242
+ BRDA:294,52,1,1
1243
+ BRDA:295,53,0,1
1244
+ BRDA:295,53,1,0
1245
+ BRDA:295,54,0,1
1246
+ BRDA:295,54,1,1
1247
+ BRDA:302,55,0,0
1248
+ BRDA:302,55,1,0
1249
+ BRDA:302,56,0,0
1250
+ BRDA:302,56,1,0
1251
+ BRDA:304,57,0,0
1252
+ BRDA:304,57,1,0
1253
+ BRF:123
1254
+ BRH:24
1255
+ end_of_record
1256
+ TN:
940
1257
  SF:src/no-v-model-on-prop.js
941
1258
  FN:36,(anonymous_0)
942
1259
  FN:49,(anonymous_1)
@@ -304,6 +304,48 @@ declare const _default: {
304
304
  JSXAttribute(node: any): void;
305
305
  };
306
306
  };
307
+ 'no-unused-setup-return': {
308
+ meta: {
309
+ type: string;
310
+ docs: {
311
+ description: string;
312
+ };
313
+ messages: {
314
+ unused: string;
315
+ };
316
+ schema: {
317
+ type: string;
318
+ properties: {
319
+ ignore: {
320
+ type: string;
321
+ items: {
322
+ type: string;
323
+ };
324
+ };
325
+ };
326
+ additionalProperties: boolean;
327
+ }[];
328
+ };
329
+ create(context: any): {
330
+ Program?: undefined;
331
+ FunctionDeclaration?: undefined;
332
+ 'FunctionDeclaration:exit'?: undefined;
333
+ FunctionExpression?: undefined;
334
+ 'FunctionExpression:exit'?: undefined;
335
+ ArrowFunctionExpression?: undefined;
336
+ 'ArrowFunctionExpression:exit'?: undefined;
337
+ ReturnStatement?: undefined;
338
+ } | {
339
+ Program(program: any): void;
340
+ FunctionDeclaration: (node: any) => void;
341
+ 'FunctionDeclaration:exit': () => void;
342
+ FunctionExpression: (node: any) => void;
343
+ 'FunctionExpression:exit': () => void;
344
+ ArrowFunctionExpression(node: any): void;
345
+ 'ArrowFunctionExpression:exit': () => void;
346
+ ReturnStatement(node: any): void;
347
+ };
348
+ };
307
349
  };
308
350
  };
309
351
  };
@@ -304,6 +304,48 @@ declare const _default: {
304
304
  JSXAttribute(node: any): void;
305
305
  };
306
306
  };
307
+ 'no-unused-setup-return': {
308
+ meta: {
309
+ type: string;
310
+ docs: {
311
+ description: string;
312
+ };
313
+ messages: {
314
+ unused: string;
315
+ };
316
+ schema: {
317
+ type: string;
318
+ properties: {
319
+ ignore: {
320
+ type: string;
321
+ items: {
322
+ type: string;
323
+ };
324
+ };
325
+ };
326
+ additionalProperties: boolean;
327
+ }[];
328
+ };
329
+ create(context: any): {
330
+ Program?: undefined;
331
+ FunctionDeclaration?: undefined;
332
+ 'FunctionDeclaration:exit'?: undefined;
333
+ FunctionExpression?: undefined;
334
+ 'FunctionExpression:exit'?: undefined;
335
+ ArrowFunctionExpression?: undefined;
336
+ 'ArrowFunctionExpression:exit'?: undefined;
337
+ ReturnStatement?: undefined;
338
+ } | {
339
+ Program(program: any): void;
340
+ FunctionDeclaration: (node: any) => void;
341
+ 'FunctionDeclaration:exit': () => void;
342
+ FunctionExpression: (node: any) => void;
343
+ 'FunctionExpression:exit': () => void;
344
+ ArrowFunctionExpression(node: any): void;
345
+ 'ArrowFunctionExpression:exit': () => void;
346
+ ReturnStatement(node: any): void;
347
+ };
348
+ };
307
349
  };
308
350
  };
309
351
  };
@@ -324,6 +366,7 @@ declare const _default: {
324
366
  'tcy/no-static-key-in-map': string;
325
367
  'tcy/consistent-const-scoping': string;
326
368
  'tcy/no-v-model-on-prop': string;
369
+ 'tcy/no-unused-setup-return': string;
327
370
  };
328
371
  };
329
372
  export default _default;
@@ -0,0 +1,64 @@
1
+ declare const _default: {
2
+ meta: {
3
+ type: string;
4
+ docs: {
5
+ description: string;
6
+ };
7
+ messages: {
8
+ unused: string;
9
+ };
10
+ schema: {
11
+ type: string;
12
+ properties: {
13
+ ignore: {
14
+ type: string;
15
+ items: {
16
+ type: string;
17
+ };
18
+ };
19
+ };
20
+ additionalProperties: boolean;
21
+ }[];
22
+ };
23
+ create(context: any): {
24
+ Program?: undefined;
25
+ FunctionDeclaration?: undefined;
26
+ 'FunctionDeclaration:exit'?: undefined;
27
+ FunctionExpression?: undefined;
28
+ 'FunctionExpression:exit'?: undefined;
29
+ ArrowFunctionExpression?: undefined;
30
+ 'ArrowFunctionExpression:exit'?: undefined;
31
+ ReturnStatement?: undefined;
32
+ } | {
33
+ Program(program: any): void;
34
+ FunctionDeclaration: (node: any) => void;
35
+ 'FunctionDeclaration:exit': () => void;
36
+ FunctionExpression: (node: any) => void;
37
+ 'FunctionExpression:exit': () => void;
38
+ ArrowFunctionExpression(node: any): void;
39
+ 'ArrowFunctionExpression:exit': () => void;
40
+ ReturnStatement(node: any): void;
41
+ };
42
+ };
43
+ export default _default;
44
+ /** `useXxx.ts`, but not the render function */
45
+ export declare const isComposableFile: (filename: any) => boolean;
46
+ export declare const stripComments: (text: any) => any;
47
+ /** `name` found as a whole word in one of the texts */
48
+ export declare const isUsed: (name: any, texts: any) => any;
49
+ /**
50
+ * How the render uses its whole context (`c`):
51
+ * - `{ spread: true }` `...c`: any key can be read
52
+ * - `{ callees: [...] }` `foo(a, c)`: the names of the called functions, they read keys of `c`
53
+ */
54
+ export declare const getWholeContextUsage: (text: any) => {
55
+ spread: boolean;
56
+ callees: any[];
57
+ };
58
+ /** `usesWholeContext`: the render hides the keys it reads */
59
+ export declare const usesWholeContext: (text: any) => boolean;
60
+ /** Text of the file imported as `name` with a relative path, `null` if not resolvable */
61
+ export declare const readImported: (name: any, text: any, dir: any) => any;
62
+ /** `Component.ts`: not a composable, not the render */
63
+ export declare const isComponentFileName: (filename: any) => boolean;
64
+ export declare const getKeyName: (prop: any) => any;
package/decl/plugin.d.ts CHANGED
@@ -301,5 +301,47 @@ declare const _default: {
301
301
  JSXAttribute(node: any): void;
302
302
  };
303
303
  };
304
+ 'no-unused-setup-return': {
305
+ meta: {
306
+ type: string;
307
+ docs: {
308
+ description: string;
309
+ };
310
+ messages: {
311
+ unused: string;
312
+ };
313
+ schema: {
314
+ type: string;
315
+ properties: {
316
+ ignore: {
317
+ type: string;
318
+ items: {
319
+ type: string;
320
+ };
321
+ };
322
+ };
323
+ additionalProperties: boolean;
324
+ }[];
325
+ };
326
+ create(context: any): {
327
+ Program?: undefined;
328
+ FunctionDeclaration?: undefined;
329
+ 'FunctionDeclaration:exit'?: undefined;
330
+ FunctionExpression?: undefined;
331
+ 'FunctionExpression:exit'?: undefined;
332
+ ArrowFunctionExpression?: undefined;
333
+ 'ArrowFunctionExpression:exit'?: undefined;
334
+ ReturnStatement?: undefined;
335
+ } | {
336
+ Program(program: any): void;
337
+ FunctionDeclaration: (node: any) => void;
338
+ 'FunctionDeclaration:exit': () => void;
339
+ FunctionExpression: (node: any) => void;
340
+ 'FunctionExpression:exit': () => void;
341
+ ArrowFunctionExpression(node: any): void;
342
+ 'ArrowFunctionExpression:exit': () => void;
343
+ ReturnStatement(node: any): void;
344
+ };
345
+ };
304
346
  };
305
347
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tcy/eslint-rules",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "description": "```typescript import { plugin as customRules } from 'tcy@eslint-rules/src/index.mjs';",
5
5
  "homepage": "https://github.com/tcastelly/eslint-rules#readme",
6
6
  "bugs": {
@@ -47,7 +47,7 @@
47
47
  "test": "jest"
48
48
  },
49
49
  "devDependencies": {
50
- "@babel/core": "^8.1.0",
50
+ "@babel/core": "^8.1.2",
51
51
  "@babel/preset-env": "^8.0.7",
52
52
  "@types/jest": "^30.0.0",
53
53
  "@types/node": "^26.6.6",
@@ -22,5 +22,6 @@ export default {
22
22
  'tcy/no-static-key-in-map': 'error',
23
23
  'tcy/consistent-const-scoping': 'error',
24
24
  'tcy/no-v-model-on-prop': 'error',
25
+ 'tcy/no-unused-setup-return': 'error',
25
26
  }
26
27
  }