arui-presets-lint 9.4.0 → 9.4.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 9.4.1
2
+
3
+ ### Patch Changes
4
+
5
+ - [#116](https://github.com/core-ds/arui-presets-lint/pull/116) [`2ecbecb`](https://github.com/core-ds/arui-presets-lint/commit/2ecbecb0102403674642d7f39aa027ba99d65895) Thanks [@KalashnikovTV](https://github.com/KalashnikovTV)! - - Добавлены тесты для кастомного правила require-description
6
+
1
7
  ## 9.4.0
2
8
 
3
9
  ### Minor Changes
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,70 @@
1
+ /* eslint-disable */
2
+ var jumpToCode = (function init() {
3
+ // Classes of code we would like to highlight in the file view
4
+ var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5
+ // Elements to highlight in the file listing view
6
+ var fileListingElements = ['td.pct.low'];
7
+ // We don't want to select elements that are direct descendants of another match
8
+ var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
9
+ // Selector that finds elements on the page to which we can jump
10
+ var selector = fileListingElements.join(', ') +
11
+ ', ' +
12
+ notSelector +
13
+ missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
14
+ // The NodeList of matching elements
15
+ var missingCoverageElements = document.querySelectorAll(selector);
16
+ var currentIndex;
17
+ function toggleClass(index) {
18
+ missingCoverageElements
19
+ .item(currentIndex)
20
+ .classList.remove('highlighted');
21
+ missingCoverageElements.item(index).classList.add('highlighted');
22
+ }
23
+ function makeCurrent(index) {
24
+ toggleClass(index);
25
+ currentIndex = index;
26
+ missingCoverageElements.item(index).scrollIntoView({
27
+ behavior: 'smooth',
28
+ block: 'center',
29
+ inline: 'center'
30
+ });
31
+ }
32
+ function goToPrevious() {
33
+ var nextIndex = 0;
34
+ if (typeof currentIndex !== 'number' || currentIndex === 0) {
35
+ nextIndex = missingCoverageElements.length - 1;
36
+ }
37
+ else if (missingCoverageElements.length > 1) {
38
+ nextIndex = currentIndex - 1;
39
+ }
40
+ makeCurrent(nextIndex);
41
+ }
42
+ function goToNext() {
43
+ var nextIndex = 0;
44
+ if (typeof currentIndex === 'number' &&
45
+ currentIndex < missingCoverageElements.length - 1) {
46
+ nextIndex = currentIndex + 1;
47
+ }
48
+ makeCurrent(nextIndex);
49
+ }
50
+ return function jump(event) {
51
+ if (document.getElementById('fileSearch') === document.activeElement &&
52
+ document.activeElement != null) {
53
+ // if we're currently focused on the search input, we don't want to navigate
54
+ return;
55
+ }
56
+ switch (event.which) {
57
+ case 78: // n
58
+ case 74: // j
59
+ goToNext();
60
+ break;
61
+ case 66: // b
62
+ case 75: // k
63
+ case 80: // p
64
+ goToPrevious();
65
+ break;
66
+ }
67
+ };
68
+ })();
69
+ window.addEventListener('keydown', jumpToCode);
70
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,477 @@
1
+ /* eslint-disable */
2
+ window.PR_SHOULD_USE_CONTINUATION = true;
3
+ (function () { var h = ["break,continue,do,else,for,if,return,while"]; var u = [h, "auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"]; var p = [u, "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"]; var l = [p, "alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"]; var x = [p, "abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"]; var R = [x, "as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"]; var r = "all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes"; var w = [p, "debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"]; var s = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"; var I = [h, "and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"]; var f = [h, "alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"]; var H = [h, "case,done,elif,esac,eval,fi,function,in,local,set,then,until"]; var A = [l, R, w, s + I, f, H]; var e = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/; var C = "str"; var z = "kwd"; var j = "com"; var O = "typ"; var G = "lit"; var L = "pun"; var F = "pln"; var m = "tag"; var E = "dec"; var J = "src"; var P = "atn"; var n = "atv"; var N = "nocode"; var M = "(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*"; function k(Z) { var ad = 0; var S = false; var ac = false; for (var V = 0, U = Z.length; V < U; ++V) {
4
+ var ae = Z[V];
5
+ if (ae.ignoreCase) {
6
+ ac = true;
7
+ }
8
+ else {
9
+ if (/[a-z]/i.test(ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) {
10
+ S = true;
11
+ ac = false;
12
+ break;
13
+ }
14
+ }
15
+ } var Y = { b: 8, t: 9, n: 10, v: 11, f: 12, r: 13 }; function ab(ah) { var ag = ah.charCodeAt(0); if (ag !== 92) {
16
+ return ag;
17
+ } var af = ah.charAt(1); ag = Y[af]; if (ag) {
18
+ return ag;
19
+ }
20
+ else {
21
+ if ("0" <= af && af <= "7") {
22
+ return parseInt(ah.substring(1), 8);
23
+ }
24
+ else {
25
+ if (af === "u" || af === "x") {
26
+ return parseInt(ah.substring(2), 16);
27
+ }
28
+ else {
29
+ return ah.charCodeAt(1);
30
+ }
31
+ }
32
+ } } function T(af) { if (af < 32) {
33
+ return (af < 16 ? "\\x0" : "\\x") + af.toString(16);
34
+ } var ag = String.fromCharCode(af); if (ag === "\\" || ag === "-" || ag === "[" || ag === "]") {
35
+ ag = "\\" + ag;
36
+ } return ag; } function X(am) { var aq = am.substring(1, am.length - 1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]", "g")); var ak = []; var af = []; var ao = aq[0] === "^"; for (var ar = ao ? 1 : 0, aj = aq.length; ar < aj; ++ar) {
37
+ var ah = aq[ar];
38
+ if (/\\[bdsw]/i.test(ah)) {
39
+ ak.push(ah);
40
+ }
41
+ else {
42
+ var ag = ab(ah);
43
+ var al;
44
+ if (ar + 2 < aj && "-" === aq[ar + 1]) {
45
+ al = ab(aq[ar + 2]);
46
+ ar += 2;
47
+ }
48
+ else {
49
+ al = ag;
50
+ }
51
+ af.push([ag, al]);
52
+ if (!(al < 65 || ag > 122)) {
53
+ if (!(al < 65 || ag > 90)) {
54
+ af.push([Math.max(65, ag) | 32, Math.min(al, 90) | 32]);
55
+ }
56
+ if (!(al < 97 || ag > 122)) {
57
+ af.push([Math.max(97, ag) & ~32, Math.min(al, 122) & ~32]);
58
+ }
59
+ }
60
+ }
61
+ } af.sort(function (av, au) { return (av[0] - au[0]) || (au[1] - av[1]); }); var ai = []; var ap = [NaN, NaN]; for (var ar = 0; ar < af.length; ++ar) {
62
+ var at = af[ar];
63
+ if (at[0] <= ap[1] + 1) {
64
+ ap[1] = Math.max(ap[1], at[1]);
65
+ }
66
+ else {
67
+ ai.push(ap = at);
68
+ }
69
+ } var an = ["["]; if (ao) {
70
+ an.push("^");
71
+ } an.push.apply(an, ak); for (var ar = 0; ar < ai.length; ++ar) {
72
+ var at = ai[ar];
73
+ an.push(T(at[0]));
74
+ if (at[1] > at[0]) {
75
+ if (at[1] + 1 > at[0]) {
76
+ an.push("-");
77
+ }
78
+ an.push(T(at[1]));
79
+ }
80
+ } an.push("]"); return an.join(""); } function W(al) { var aj = al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)", "g")); var ah = aj.length; var an = []; for (var ak = 0, am = 0; ak < ah; ++ak) {
81
+ var ag = aj[ak];
82
+ if (ag === "(") {
83
+ ++am;
84
+ }
85
+ else {
86
+ if ("\\" === ag.charAt(0)) {
87
+ var af = +ag.substring(1);
88
+ if (af && af <= am) {
89
+ an[af] = -1;
90
+ }
91
+ }
92
+ }
93
+ } for (var ak = 1; ak < an.length; ++ak) {
94
+ if (-1 === an[ak]) {
95
+ an[ak] = ++ad;
96
+ }
97
+ } for (var ak = 0, am = 0; ak < ah; ++ak) {
98
+ var ag = aj[ak];
99
+ if (ag === "(") {
100
+ ++am;
101
+ if (an[am] === undefined) {
102
+ aj[ak] = "(?:";
103
+ }
104
+ }
105
+ else {
106
+ if ("\\" === ag.charAt(0)) {
107
+ var af = +ag.substring(1);
108
+ if (af && af <= am) {
109
+ aj[ak] = "\\" + an[am];
110
+ }
111
+ }
112
+ }
113
+ } for (var ak = 0, am = 0; ak < ah; ++ak) {
114
+ if ("^" === aj[ak] && "^" !== aj[ak + 1]) {
115
+ aj[ak] = "";
116
+ }
117
+ } if (al.ignoreCase && S) {
118
+ for (var ak = 0; ak < ah; ++ak) {
119
+ var ag = aj[ak];
120
+ var ai = ag.charAt(0);
121
+ if (ag.length >= 2 && ai === "[") {
122
+ aj[ak] = X(ag);
123
+ }
124
+ else {
125
+ if (ai !== "\\") {
126
+ aj[ak] = ag.replace(/[a-zA-Z]/g, function (ao) { var ap = ao.charCodeAt(0); return "[" + String.fromCharCode(ap & ~32, ap | 32) + "]"; });
127
+ }
128
+ }
129
+ }
130
+ } return aj.join(""); } var aa = []; for (var V = 0, U = Z.length; V < U; ++V) {
131
+ var ae = Z[V];
132
+ if (ae.global || ae.multiline) {
133
+ throw new Error("" + ae);
134
+ }
135
+ aa.push("(?:" + W(ae) + ")");
136
+ } return new RegExp(aa.join("|"), ac ? "gi" : "g"); } function a(V) { var U = /(?:^|\s)nocode(?:\s|$)/; var X = []; var T = 0; var Z = []; var W = 0; var S; if (V.currentStyle) {
137
+ S = V.currentStyle.whiteSpace;
138
+ }
139
+ else {
140
+ if (window.getComputedStyle) {
141
+ S = document.defaultView.getComputedStyle(V, null).getPropertyValue("white-space");
142
+ }
143
+ } var Y = S && "pre" === S.substring(0, 3); function aa(ab) { switch (ab.nodeType) {
144
+ case 1:
145
+ if (U.test(ab.className)) {
146
+ return;
147
+ }
148
+ for (var ae = ab.firstChild; ae; ae = ae.nextSibling) {
149
+ aa(ae);
150
+ }
151
+ var ad = ab.nodeName;
152
+ if ("BR" === ad || "LI" === ad) {
153
+ X[W] = "\n";
154
+ Z[W << 1] = T++;
155
+ Z[(W++ << 1) | 1] = ab;
156
+ }
157
+ break;
158
+ case 3:
159
+ case 4:
160
+ var ac = ab.nodeValue;
161
+ if (ac.length) {
162
+ if (!Y) {
163
+ ac = ac.replace(/[ \t\r\n]+/g, " ");
164
+ }
165
+ else {
166
+ ac = ac.replace(/\r\n?/g, "\n");
167
+ }
168
+ X[W] = ac;
169
+ Z[W << 1] = T;
170
+ T += ac.length;
171
+ Z[(W++ << 1) | 1] = ab;
172
+ }
173
+ break;
174
+ } } aa(V); return { sourceCode: X.join("").replace(/\n$/, ""), spans: Z }; } function B(S, U, W, T) { if (!U) {
175
+ return;
176
+ } var V = { sourceCode: U, basePos: S }; W(V); T.push.apply(T, V.decorations); } var v = /\S/; function o(S) { var V = undefined; for (var U = S.firstChild; U; U = U.nextSibling) {
177
+ var T = U.nodeType;
178
+ V = (T === 1) ? (V ? S : U) : (T === 3) ? (v.test(U.nodeValue) ? S : V) : V;
179
+ } return V === S ? undefined : V; } function g(U, T) { var S = {}; var V; (function () { var ad = U.concat(T); var ah = []; var ag = {}; for (var ab = 0, Z = ad.length; ab < Z; ++ab) {
180
+ var Y = ad[ab];
181
+ var ac = Y[3];
182
+ if (ac) {
183
+ for (var ae = ac.length; --ae >= 0;) {
184
+ S[ac.charAt(ae)] = Y;
185
+ }
186
+ }
187
+ var af = Y[1];
188
+ var aa = "" + af;
189
+ if (!ag.hasOwnProperty(aa)) {
190
+ ah.push(af);
191
+ ag[aa] = null;
192
+ }
193
+ } ah.push(/[\0-\uffff]/); V = k(ah); })(); var X = T.length; var W = function (ah) { var Z = ah.sourceCode, Y = ah.basePos; var ad = [Y, F]; var af = 0; var an = Z.match(V) || []; var aj = {}; for (var ae = 0, aq = an.length; ae < aq; ++ae) {
194
+ var ag = an[ae];
195
+ var ap = aj[ag];
196
+ var ai = void 0;
197
+ var am;
198
+ if (typeof ap === "string") {
199
+ am = false;
200
+ }
201
+ else {
202
+ var aa = S[ag.charAt(0)];
203
+ if (aa) {
204
+ ai = ag.match(aa[1]);
205
+ ap = aa[0];
206
+ }
207
+ else {
208
+ for (var ao = 0; ao < X; ++ao) {
209
+ aa = T[ao];
210
+ ai = ag.match(aa[1]);
211
+ if (ai) {
212
+ ap = aa[0];
213
+ break;
214
+ }
215
+ }
216
+ if (!ai) {
217
+ ap = F;
218
+ }
219
+ }
220
+ am = ap.length >= 5 && "lang-" === ap.substring(0, 5);
221
+ if (am && !(ai && typeof ai[1] === "string")) {
222
+ am = false;
223
+ ap = J;
224
+ }
225
+ if (!am) {
226
+ aj[ag] = ap;
227
+ }
228
+ }
229
+ var ab = af;
230
+ af += ag.length;
231
+ if (!am) {
232
+ ad.push(Y + ab, ap);
233
+ }
234
+ else {
235
+ var al = ai[1];
236
+ var ak = ag.indexOf(al);
237
+ var ac = ak + al.length;
238
+ if (ai[2]) {
239
+ ac = ag.length - ai[2].length;
240
+ ak = ac - al.length;
241
+ }
242
+ var ar = ap.substring(5);
243
+ B(Y + ab, ag.substring(0, ak), W, ad);
244
+ B(Y + ab + ak, al, q(ar, al), ad);
245
+ B(Y + ab + ac, ag.substring(ac), W, ad);
246
+ }
247
+ } ah.decorations = ad; }; return W; } function i(T) { var W = [], S = []; if (T.tripleQuotedStrings) {
248
+ W.push([C, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\""]);
249
+ }
250
+ else {
251
+ if (T.multiLineStrings) {
252
+ W.push([C, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`"]);
253
+ }
254
+ else {
255
+ W.push([C, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'"]);
256
+ }
257
+ } if (T.verbatimStrings) {
258
+ S.push([C, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
259
+ } var Y = T.hashComments; if (Y) {
260
+ if (T.cStyleComments) {
261
+ if (Y > 1) {
262
+ W.push([j, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, "#"]);
263
+ }
264
+ else {
265
+ W.push([j, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#"]);
266
+ }
267
+ S.push([C, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null]);
268
+ }
269
+ else {
270
+ W.push([j, /^#[^\r\n]*/, null, "#"]);
271
+ }
272
+ } if (T.cStyleComments) {
273
+ S.push([j, /^\/\/[^\r\n]*/, null]);
274
+ S.push([j, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
275
+ } if (T.regexLiterals) {
276
+ var X = ("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");
277
+ S.push(["lang-regex", new RegExp("^" + M + "(" + X + ")")]);
278
+ } var V = T.types; if (V) {
279
+ S.push([O, V]);
280
+ } var U = ("" + T.keywords).replace(/^ | $/g, ""); if (U.length) {
281
+ S.push([z, new RegExp("^(?:" + U.replace(/[\s,]+/g, "|") + ")\\b"), null]);
282
+ } W.push([F, /^\s+/, null, " \r\n\t\xA0"]); S.push([G, /^@[a-z_$][a-z_$@0-9]*/i, null], [O, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null], [F, /^[a-z_$][a-z_$@0-9]*/i, null], [G, new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*", "i"), null, "0123456789"], [F, /^\\[\s\S]?/, null], [L, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]); return g(W, S); } var K = i({ keywords: A, hashComments: true, cStyleComments: true, multiLineStrings: true, regexLiterals: true }); function Q(V, ag) { var U = /(?:^|\s)nocode(?:\s|$)/; var ab = /\r\n?|\n/; var ac = V.ownerDocument; var S; if (V.currentStyle) {
283
+ S = V.currentStyle.whiteSpace;
284
+ }
285
+ else {
286
+ if (window.getComputedStyle) {
287
+ S = ac.defaultView.getComputedStyle(V, null).getPropertyValue("white-space");
288
+ }
289
+ } var Z = S && "pre" === S.substring(0, 3); var af = ac.createElement("LI"); while (V.firstChild) {
290
+ af.appendChild(V.firstChild);
291
+ } var W = [af]; function ae(al) { switch (al.nodeType) {
292
+ case 1:
293
+ if (U.test(al.className)) {
294
+ break;
295
+ }
296
+ if ("BR" === al.nodeName) {
297
+ ad(al);
298
+ if (al.parentNode) {
299
+ al.parentNode.removeChild(al);
300
+ }
301
+ }
302
+ else {
303
+ for (var an = al.firstChild; an; an = an.nextSibling) {
304
+ ae(an);
305
+ }
306
+ }
307
+ break;
308
+ case 3:
309
+ case 4:
310
+ if (Z) {
311
+ var am = al.nodeValue;
312
+ var aj = am.match(ab);
313
+ if (aj) {
314
+ var ai = am.substring(0, aj.index);
315
+ al.nodeValue = ai;
316
+ var ah = am.substring(aj.index + aj[0].length);
317
+ if (ah) {
318
+ var ak = al.parentNode;
319
+ ak.insertBefore(ac.createTextNode(ah), al.nextSibling);
320
+ }
321
+ ad(al);
322
+ if (!ai) {
323
+ al.parentNode.removeChild(al);
324
+ }
325
+ }
326
+ }
327
+ break;
328
+ } } function ad(ak) { while (!ak.nextSibling) {
329
+ ak = ak.parentNode;
330
+ if (!ak) {
331
+ return;
332
+ }
333
+ } function ai(al, ar) { var aq = ar ? al.cloneNode(false) : al; var ao = al.parentNode; if (ao) {
334
+ var ap = ai(ao, 1);
335
+ var an = al.nextSibling;
336
+ ap.appendChild(aq);
337
+ for (var am = an; am; am = an) {
338
+ an = am.nextSibling;
339
+ ap.appendChild(am);
340
+ }
341
+ } return aq; } var ah = ai(ak.nextSibling, 0); for (var aj; (aj = ah.parentNode) && aj.nodeType === 1;) {
342
+ ah = aj;
343
+ } W.push(ah); } for (var Y = 0; Y < W.length; ++Y) {
344
+ ae(W[Y]);
345
+ } if (ag === (ag | 0)) {
346
+ W[0].setAttribute("value", ag);
347
+ } var aa = ac.createElement("OL"); aa.className = "linenums"; var X = Math.max(0, ((ag - 1)) | 0) || 0; for (var Y = 0, T = W.length; Y < T; ++Y) {
348
+ af = W[Y];
349
+ af.className = "L" + ((Y + X) % 10);
350
+ if (!af.firstChild) {
351
+ af.appendChild(ac.createTextNode("\xA0"));
352
+ }
353
+ aa.appendChild(af);
354
+ } V.appendChild(aa); } function D(ac) { var aj = /\bMSIE\b/.test(navigator.userAgent); var am = /\n/g; var al = ac.sourceCode; var an = al.length; var V = 0; var aa = ac.spans; var T = aa.length; var ah = 0; var X = ac.decorations; var Y = X.length; var Z = 0; X[Y] = an; var ar, aq; for (aq = ar = 0; aq < Y;) {
355
+ if (X[aq] !== X[aq + 2]) {
356
+ X[ar++] = X[aq++];
357
+ X[ar++] = X[aq++];
358
+ }
359
+ else {
360
+ aq += 2;
361
+ }
362
+ } Y = ar; for (aq = ar = 0; aq < Y;) {
363
+ var at = X[aq];
364
+ var ab = X[aq + 1];
365
+ var W = aq + 2;
366
+ while (W + 2 <= Y && X[W + 1] === ab) {
367
+ W += 2;
368
+ }
369
+ X[ar++] = at;
370
+ X[ar++] = ab;
371
+ aq = W;
372
+ } Y = X.length = ar; var ae = null; while (ah < T) {
373
+ var af = aa[ah];
374
+ var S = aa[ah + 2] || an;
375
+ var ag = X[Z];
376
+ var ap = X[Z + 2] || an;
377
+ var W = Math.min(S, ap);
378
+ var ak = aa[ah + 1];
379
+ var U;
380
+ if (ak.nodeType !== 1 && (U = al.substring(V, W))) {
381
+ if (aj) {
382
+ U = U.replace(am, "\r");
383
+ }
384
+ ak.nodeValue = U;
385
+ var ai = ak.ownerDocument;
386
+ var ao = ai.createElement("SPAN");
387
+ ao.className = X[Z + 1];
388
+ var ad = ak.parentNode;
389
+ ad.replaceChild(ao, ak);
390
+ ao.appendChild(ak);
391
+ if (V < S) {
392
+ aa[ah + 1] = ak = ai.createTextNode(al.substring(W, S));
393
+ ad.insertBefore(ak, ao.nextSibling);
394
+ }
395
+ }
396
+ V = W;
397
+ if (V >= S) {
398
+ ah += 2;
399
+ }
400
+ if (V >= ap) {
401
+ Z += 2;
402
+ }
403
+ } } var t = {}; function c(U, V) { for (var S = V.length; --S >= 0;) {
404
+ var T = V[S];
405
+ if (!t.hasOwnProperty(T)) {
406
+ t[T] = U;
407
+ }
408
+ else {
409
+ if (window.console) {
410
+ console.warn("cannot override language handler %s", T);
411
+ }
412
+ }
413
+ } } function q(T, S) { if (!(T && t.hasOwnProperty(T))) {
414
+ T = /^\s*</.test(S) ? "default-markup" : "default-code";
415
+ } return t[T]; } c(K, ["default-code"]); c(g([], [[F, /^[^<?]+/], [E, /^<!\w[^>]*(?:>|$)/], [j, /^<\!--[\s\S]*?(?:-\->|$)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], [L, /^(?:<[%?]|[%?]>)/], ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i], ["lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i], ["lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i], ["lang-in.tag", /^(<\/?[a-z][^<>]*>)/i]]), ["default-markup", "htm", "html", "mxml", "xhtml", "xml", "xsl"]); c(g([[F, /^[\s]+/, null, " \t\r\n"], [n, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, "\"'"]], [[m, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i], [P, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i], ["lang-uq.val", /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/], [L, /^[=<>\/]+/], ["lang-js", /^on\w+\s*=\s*\"([^\"]+)\"/i], ["lang-js", /^on\w+\s*=\s*\'([^\']+)\'/i], ["lang-js", /^on\w+\s*=\s*([^\"\'>\s]+)/i], ["lang-css", /^style\s*=\s*\"([^\"]+)\"/i], ["lang-css", /^style\s*=\s*\'([^\']+)\'/i], ["lang-css", /^style\s*=\s*([^\"\'>\s]+)/i]]), ["in.tag"]); c(g([], [[n, /^[\s\S]+/]]), ["uq.val"]); c(i({ keywords: l, hashComments: true, cStyleComments: true, types: e }), ["c", "cc", "cpp", "cxx", "cyc", "m"]); c(i({ keywords: "null,true,false" }), ["json"]); c(i({ keywords: R, hashComments: true, cStyleComments: true, verbatimStrings: true, types: e }), ["cs"]); c(i({ keywords: x, cStyleComments: true }), ["java"]); c(i({ keywords: H, hashComments: true, multiLineStrings: true }), ["bsh", "csh", "sh"]); c(i({ keywords: I, hashComments: true, multiLineStrings: true, tripleQuotedStrings: true }), ["cv", "py"]); c(i({ keywords: s, hashComments: true, multiLineStrings: true, regexLiterals: true }), ["perl", "pl", "pm"]); c(i({ keywords: f, hashComments: true, multiLineStrings: true, regexLiterals: true }), ["rb"]); c(i({ keywords: w, cStyleComments: true, regexLiterals: true }), ["js"]); c(i({ keywords: r, hashComments: 3, cStyleComments: true, multilineStrings: true, tripleQuotedStrings: true, regexLiterals: true }), ["coffee"]); c(g([], [[C, /^[\s\S]+/]]), ["regex"]); function d(V) { var U = V.langExtension; try {
416
+ var S = a(V.sourceNode);
417
+ var T = S.sourceCode;
418
+ V.sourceCode = T;
419
+ V.spans = S.spans;
420
+ V.basePos = 0;
421
+ q(U, T)(V);
422
+ D(V);
423
+ }
424
+ catch (W) {
425
+ if ("console" in window) {
426
+ console.log(W && W.stack ? W.stack : W);
427
+ }
428
+ } } function y(W, V, U) { var S = document.createElement("PRE"); S.innerHTML = W; if (U) {
429
+ Q(S, U);
430
+ } var T = { langExtension: V, numberLines: U, sourceNode: S }; d(T); return S.innerHTML; } function b(ad) { function Y(af) { return document.getElementsByTagName(af); } var ac = [Y("pre"), Y("code"), Y("xmp")]; var T = []; for (var aa = 0; aa < ac.length; ++aa) {
431
+ for (var Z = 0, V = ac[aa].length; Z < V; ++Z) {
432
+ T.push(ac[aa][Z]);
433
+ }
434
+ } ac = null; var W = Date; if (!W.now) {
435
+ W = { now: function () { return +(new Date); } };
436
+ } var X = 0; var S; var ab = /\blang(?:uage)?-([\w.]+)(?!\S)/; var ae = /\bprettyprint\b/; function U() { var ag = (window.PR_SHOULD_USE_CONTINUATION ? W.now() + 250 : Infinity); for (; X < T.length && W.now() < ag; X++) {
437
+ var aj = T[X];
438
+ var ai = aj.className;
439
+ if (ai.indexOf("prettyprint") >= 0) {
440
+ var ah = ai.match(ab);
441
+ var am;
442
+ if (!ah && (am = o(aj)) && "CODE" === am.tagName) {
443
+ ah = am.className.match(ab);
444
+ }
445
+ if (ah) {
446
+ ah = ah[1];
447
+ }
448
+ var al = false;
449
+ for (var ak = aj.parentNode; ak; ak = ak.parentNode) {
450
+ if ((ak.tagName === "pre" || ak.tagName === "code" || ak.tagName === "xmp") && ak.className && ak.className.indexOf("prettyprint") >= 0) {
451
+ al = true;
452
+ break;
453
+ }
454
+ }
455
+ if (!al) {
456
+ var af = aj.className.match(/\blinenums\b(?::(\d+))?/);
457
+ af = af ? af[1] && af[1].length ? +af[1] : true : false;
458
+ if (af) {
459
+ Q(aj, af);
460
+ }
461
+ S = { langExtension: ah, sourceNode: aj, numberLines: af };
462
+ d(S);
463
+ }
464
+ }
465
+ } if (X < T.length) {
466
+ setTimeout(U, 250);
467
+ }
468
+ else {
469
+ if (ad) {
470
+ ad();
471
+ }
472
+ } } U(); } window.prettyPrintOne = y; window.prettyPrint = b; window.PR = { createSimpleLexer: g, registerLangHandler: c, sourceDecorator: i, PR_ATTRIB_NAME: P, PR_ATTRIB_VALUE: n, PR_COMMENT: j, PR_DECLARATION: E, PR_KEYWORD: z, PR_LITERAL: G, PR_NOCODE: N, PR_PLAIN: F, PR_PUNCTUATION: L, PR_SOURCE: J, PR_STRING: C, PR_TAG: m, PR_TYPE: O }; })();
473
+ PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_DECLARATION, /^<!\w[^>]*(?:>|$)/], [PR.PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/], [PR.PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i], ["lang-handlebars", /^<script\b[^>]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i], ["lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i], ["lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i], ["lang-in.tag", /^(<\/?[a-z][^<>]*>)/i], [PR.PR_DECLARATION, /^{{[#^>/]?\s*[\w.][^}]*}}/], [PR.PR_DECLARATION, /^{{&?\s*[\w.][^}]*}}/], [PR.PR_DECLARATION, /^{{{>?\s*[\w.][^}]*}}}/], [PR.PR_COMMENT, /^{{![^}]*}}/]]), ["handlebars", "hbs"]);
474
+ PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN, /^[ \t\r\n\f]+/, null, " \t\r\n\f"]], [[PR.PR_STRING, /^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/, null], [PR.PR_STRING, /^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/, null], ["lang-css-str", /^url\(([^\)\"\']*)\)/i], [PR.PR_KEYWORD, /^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i, null], ["lang-css-kw", /^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i], [PR.PR_COMMENT, /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//], [PR.PR_COMMENT, /^(?:<!--|-->)/], [PR.PR_LITERAL, /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i], [PR.PR_LITERAL, /^#(?:[0-9a-f]{3}){1,2}/i], [PR.PR_PLAIN, /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i], [PR.PR_PUNCTUATION, /^[^\s\w\'\"]+/]]), ["css"]);
475
+ PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_KEYWORD, /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]), ["css-kw"]);
476
+ PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_STRING, /^[^\)\"\']+/]]), ["css-str"]);
477
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,176 @@
1
+ /* eslint-disable */
2
+ var addSorting = (function () {
3
+ 'use strict';
4
+ var cols, currentSort = {
5
+ index: 0,
6
+ desc: false
7
+ };
8
+ // returns the summary table element
9
+ function getTable() {
10
+ return document.querySelector('.coverage-summary');
11
+ }
12
+ // returns the thead element of the summary table
13
+ function getTableHeader() {
14
+ return getTable().querySelector('thead tr');
15
+ }
16
+ // returns the tbody element of the summary table
17
+ function getTableBody() {
18
+ return getTable().querySelector('tbody');
19
+ }
20
+ // returns the th element for nth column
21
+ function getNthColumn(n) {
22
+ return getTableHeader().querySelectorAll('th')[n];
23
+ }
24
+ function onFilterInput() {
25
+ const searchValue = document.getElementById('fileSearch').value;
26
+ const rows = document.getElementsByTagName('tbody')[0].children;
27
+ // Try to create a RegExp from the searchValue. If it fails (invalid regex),
28
+ // it will be treated as a plain text search
29
+ let searchRegex;
30
+ try {
31
+ searchRegex = new RegExp(searchValue, 'i'); // 'i' for case-insensitive
32
+ }
33
+ catch (error) {
34
+ searchRegex = null;
35
+ }
36
+ for (let i = 0; i < rows.length; i++) {
37
+ const row = rows[i];
38
+ let isMatch = false;
39
+ if (searchRegex) {
40
+ // If a valid regex was created, use it for matching
41
+ isMatch = searchRegex.test(row.textContent);
42
+ }
43
+ else {
44
+ // Otherwise, fall back to the original plain text search
45
+ isMatch = row.textContent
46
+ .toLowerCase()
47
+ .includes(searchValue.toLowerCase());
48
+ }
49
+ row.style.display = isMatch ? '' : 'none';
50
+ }
51
+ }
52
+ // loads the search box
53
+ function addSearchBox() {
54
+ var template = document.getElementById('filterTemplate');
55
+ var templateClone = template.content.cloneNode(true);
56
+ templateClone.getElementById('fileSearch').oninput = onFilterInput;
57
+ template.parentElement.appendChild(templateClone);
58
+ }
59
+ // loads all columns
60
+ function loadColumns() {
61
+ var colNodes = getTableHeader().querySelectorAll('th'), colNode, cols = [], col, i;
62
+ for (i = 0; i < colNodes.length; i += 1) {
63
+ colNode = colNodes[i];
64
+ col = {
65
+ key: colNode.getAttribute('data-col'),
66
+ sortable: !colNode.getAttribute('data-nosort'),
67
+ type: colNode.getAttribute('data-type') || 'string'
68
+ };
69
+ cols.push(col);
70
+ if (col.sortable) {
71
+ col.defaultDescSort = col.type === 'number';
72
+ colNode.innerHTML =
73
+ colNode.innerHTML + '<span class="sorter"></span>';
74
+ }
75
+ }
76
+ return cols;
77
+ }
78
+ // attaches a data attribute to every tr element with an object
79
+ // of data values keyed by column name
80
+ function loadRowData(tableRow) {
81
+ var tableCols = tableRow.querySelectorAll('td'), colNode, col, data = {}, i, val;
82
+ for (i = 0; i < tableCols.length; i += 1) {
83
+ colNode = tableCols[i];
84
+ col = cols[i];
85
+ val = colNode.getAttribute('data-value');
86
+ if (col.type === 'number') {
87
+ val = Number(val);
88
+ }
89
+ data[col.key] = val;
90
+ }
91
+ return data;
92
+ }
93
+ // loads all row data
94
+ function loadData() {
95
+ var rows = getTableBody().querySelectorAll('tr'), i;
96
+ for (i = 0; i < rows.length; i += 1) {
97
+ rows[i].data = loadRowData(rows[i]);
98
+ }
99
+ }
100
+ // sorts the table using the data for the ith column
101
+ function sortByIndex(index, desc) {
102
+ var key = cols[index].key, sorter = function (a, b) {
103
+ a = a.data[key];
104
+ b = b.data[key];
105
+ return a < b ? -1 : a > b ? 1 : 0;
106
+ }, finalSorter = sorter, tableBody = document.querySelector('.coverage-summary tbody'), rowNodes = tableBody.querySelectorAll('tr'), rows = [], i;
107
+ if (desc) {
108
+ finalSorter = function (a, b) {
109
+ return -1 * sorter(a, b);
110
+ };
111
+ }
112
+ for (i = 0; i < rowNodes.length; i += 1) {
113
+ rows.push(rowNodes[i]);
114
+ tableBody.removeChild(rowNodes[i]);
115
+ }
116
+ rows.sort(finalSorter);
117
+ for (i = 0; i < rows.length; i += 1) {
118
+ tableBody.appendChild(rows[i]);
119
+ }
120
+ }
121
+ // removes sort indicators for current column being sorted
122
+ function removeSortIndicators() {
123
+ var col = getNthColumn(currentSort.index), cls = col.className;
124
+ cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
125
+ col.className = cls;
126
+ }
127
+ // adds sort indicators for current column being sorted
128
+ function addSortIndicators() {
129
+ getNthColumn(currentSort.index).className += currentSort.desc
130
+ ? ' sorted-desc'
131
+ : ' sorted';
132
+ }
133
+ // adds event listeners for all sorter widgets
134
+ function enableUI() {
135
+ var i, el, ithSorter = function ithSorter(i) {
136
+ var col = cols[i];
137
+ return function () {
138
+ var desc = col.defaultDescSort;
139
+ if (currentSort.index === i) {
140
+ desc = !currentSort.desc;
141
+ }
142
+ sortByIndex(i, desc);
143
+ removeSortIndicators();
144
+ currentSort.index = i;
145
+ currentSort.desc = desc;
146
+ addSortIndicators();
147
+ };
148
+ };
149
+ for (i = 0; i < cols.length; i += 1) {
150
+ if (cols[i].sortable) {
151
+ // add the click event handler on the th so users
152
+ // dont have to click on those tiny arrows
153
+ el = getNthColumn(i).querySelector('.sorter').parentElement;
154
+ if (el.addEventListener) {
155
+ el.addEventListener('click', ithSorter(i));
156
+ }
157
+ else {
158
+ el.attachEvent('onclick', ithSorter(i));
159
+ }
160
+ }
161
+ }
162
+ }
163
+ // adds sorting functionality to the UI
164
+ return function () {
165
+ if (!getTable()) {
166
+ return;
167
+ }
168
+ cols = loadColumns();
169
+ loadData();
170
+ addSearchBox();
171
+ addSortIndicators();
172
+ enableUI();
173
+ };
174
+ })();
175
+ window.addEventListener('load', addSorting);
176
+ export {};
@@ -1,8 +1,8 @@
1
1
  import { type TSESTree } from '@typescript-eslint/utils';
2
2
  import { type DirectiveData, type DirectiveKind } from '../types/index.js';
3
3
  export declare class CommentValidator {
4
- private ignoredDirectives;
5
- private allComments;
4
+ private readonly ignoredDirectives;
5
+ private readonly allComments;
6
6
  constructor(ignoredDirectives: DirectiveKind[], allComments: TSESTree.Comment[]);
7
7
  private getMeaningfulAboveComment;
8
8
  validate(comment: TSESTree.Comment): {
@@ -1,3 +1,5 @@
1
1
  import { type TSESLint, type TSESTree } from '@typescript-eslint/utils';
2
+ export declare function fixSingleLineComment(fixer: TSESLint.RuleFixer, comment: TSESTree.Comment, description: string): TSESLint.RuleFix;
3
+ export declare function fixBlockComment(fixer: TSESLint.RuleFixer, comment: TSESTree.Comment, description: string): TSESLint.RuleFix | null;
2
4
  export declare function createSuggestionFix(comment: TSESTree.Comment, description: string): (fixer: TSESLint.RuleFixer) => TSESLint.RuleFix | null;
3
5
  export declare function createAboveCommentFix(comment: TSESTree.Comment, description: string): (fixer: TSESLint.RuleFixer) => TSESLint.RuleFix | null;
@@ -5,11 +5,11 @@ function formatCommentWithDescription(comment, description) {
5
5
  const baseText = commentValue.replace(DESCRIPTION_REPLACEMENT, '').trim();
6
6
  return `${baseText} -- ${description}`;
7
7
  }
8
- function fixSingleLineComment(fixer, comment, description) {
8
+ export function fixSingleLineComment(fixer, comment, description) {
9
9
  const newCommentText = formatCommentWithDescription(comment, description);
10
10
  return fixer.replaceText(comment, `// ${newCommentText}`);
11
11
  }
12
- function fixBlockComment(fixer, comment, description) {
12
+ export function fixBlockComment(fixer, comment, description) {
13
13
  const commentText = comment.value;
14
14
  const lines = commentText?.split('\n');
15
15
  if (lines.length === 1) {
@@ -1,4 +1,4 @@
1
1
  export { parseDirectiveComment, getPreviousComment, isAdjacentComment, isValidDescription, validateAboveComment, } from './comment-parser.js';
2
- export { createSuggestionFix, createAboveCommentFix } from './fixers.js';
2
+ export { createSuggestionFix, createAboveCommentFix, fixSingleLineComment, fixBlockComment, } from './fixers.js';
3
3
  export { CommentValidator } from './comment-validator.js';
4
4
  export { buildSuggestions } from './build-suggestions.js';
@@ -1,4 +1,4 @@
1
1
  export { parseDirectiveComment, getPreviousComment, isAdjacentComment, isValidDescription, validateAboveComment, } from './comment-parser.js';
2
- export { createSuggestionFix, createAboveCommentFix } from './fixers.js';
2
+ export { createSuggestionFix, createAboveCommentFix, fixSingleLineComment, fixBlockComment, } from './fixers.js';
3
3
  export { CommentValidator } from './comment-validator.js';
4
4
  export { buildSuggestions } from './build-suggestions.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arui-presets-lint",
3
- "version": "9.4.0",
3
+ "version": "9.4.1",
4
4
  "description": "Config files for arui-apps",
5
5
  "author": "core-ds contributors",
6
6
  "license": "MIT",
@@ -46,17 +46,22 @@
46
46
  "@changesets/cli": "2.30.0",
47
47
  "@types/node": "24.12.2",
48
48
  "@types/react": "19.2.14",
49
+ "@vitest/coverage-istanbul": "4.1.5",
49
50
  "copyfiles": "2.4.1",
50
51
  "es-toolkit": "1.45.1",
51
52
  "eslint-config-prettier": "10.1.8",
53
+ "eslint-vitest-rule-tester": "3.1.0",
52
54
  "react": "19.2.5",
53
55
  "rimraf": "6.1.3",
54
56
  "tsx": "4.21.0",
55
- "typescript": "6.0.2"
57
+ "typescript": "6.0.2",
58
+ "vite": "8.0.10",
59
+ "vitest": "4.1.5"
56
60
  },
57
61
  "scripts": {
58
62
  "build": "rimraf dist && tsc -p tsconfig.build.json && copyfiles 'README.md' 'CHANGELOG.md' 'lefthook/*.yml' 'eslint/**/*.md' dist",
59
- "test": "tsc --noEmit && eslint-config-prettier ./eslint/index.ts && tsx ./cli/duplicates-checker.ts && yarn lint",
63
+ "test": "tsc --noEmit && eslint-config-prettier ./eslint/index.ts && tsx ./cli/duplicates-checker.ts && yarn lint && yarn test:unit",
64
+ "test:unit": "vitest --run --coverage",
60
65
  "lint": "yarn lint:styles && yarn lint:scripts && yarn format:check",
61
66
  "lint:fix": "yarn lint:styles --fix && yarn lint:scripts --fix && yarn format",
62
67
  "lint:styles": "tsx ./cli/index.mts styles",
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { configDefaults, defineConfig } from 'vitest/config';
2
+ export default defineConfig({
3
+ test: {
4
+ globals: true,
5
+ coverage: {
6
+ enabled: true,
7
+ provider: 'istanbul',
8
+ reporter: ['text', 'json', 'lcov'],
9
+ thresholds: {
10
+ statements: 90,
11
+ functions: 90,
12
+ branches: 85,
13
+ lines: 90,
14
+ },
15
+ exclude: [...configDefaults.exclude],
16
+ },
17
+ exclude: [...configDefaults.exclude],
18
+ clearMocks: true,
19
+ },
20
+ });