@nekoyasuii/config 0.1.4 → 0.1.7
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/dist/{chunk-fqcw0kzp.js → chunk-5vqtdgjy.js} +134 -10
- package/dist/{chunk-0xdbbpn5.js → chunk-cpyyjvfv.js} +2 -2
- package/dist/{chunk-08m6971b.js → chunk-k5zpegn9.js} +5 -5
- package/dist/{chunk-41590bpf.js → chunk-tvk9tq03.js} +2 -2
- package/dist/tools/oxfmt/index.js +3 -4
- package/dist/tools/oxlint/config/core/index.js +4 -5
- package/dist/tools/oxlint/config/index.d.ts +47 -45
- package/dist/tools/oxlint/config/index.js +11 -20
- package/dist/tools/oxlint/config/js-plugins/index.d.ts +270 -64
- package/dist/tools/oxlint/config/js-plugins/index.js +6 -7
- package/dist/tools/oxlint/config/react/index.js +3 -4
- package/dist/tools/oxlint/config/remix/index.js +0 -2
- package/dist/tools/oxlint/config/tanstack/index.js +0 -2
- package/dist/tools/oxlint/config/tanstack/js-plugins/index.d.ts +4 -4
- package/dist/tools/oxlint/config/tanstack/js-plugins/index.js +0 -2
- package/dist/tools/oxlint/config/{anti-slop/plugin.js → vendors/anti-slop.js} +717 -35
- package/dist/tools/oxlint/config/{no-comment-slop/plugin.d.ts → vendors/no-comment-slop.d.ts} +34 -0
- package/dist/tools/oxlint/config/{no-comment-slop/plugin.js → vendors/no-comment-slop.js} +72 -8
- package/dist/tools/oxlint/config/vendors/shadcn.d.ts +41 -0
- package/dist/tools/oxlint/config/vendors/shadcn.js +7159 -0
- package/dist/tools/oxlint/rules/index.js +7 -9
- package/dist/tools/shared/ignores.js +3 -4
- package/package.json +3 -8
- package/dist/chunk-5wgwscd0.js +0 -4
- package/dist/chunk-97s6xvc6.js +0 -32
- package/dist/chunk-c8jq73qx.js +0 -38
- package/dist/tools/oxlint/config/anti-slop/index.d.ts +0 -42
- package/dist/tools/oxlint/config/anti-slop/index.js +0 -7
- package/dist/tools/oxlint/config/no-comment-slop/index.d.ts +0 -19
- package/dist/tools/oxlint/config/no-comment-slop/index.js +0 -7
- /package/dist/tools/oxlint/config/{anti-slop/plugin.d.ts → vendors/anti-slop.d.ts} +0 -0
package/dist/tools/oxlint/config/{no-comment-slop/plugin.d.ts → vendors/no-comment-slop.d.ts}
RENAMED
|
@@ -257,6 +257,23 @@ declare var meta: {
|
|
|
257
257
|
Program(): void;
|
|
258
258
|
};
|
|
259
259
|
};
|
|
260
|
+
"no-prose-semicolon": {
|
|
261
|
+
meta: {
|
|
262
|
+
type: string;
|
|
263
|
+
docs: {
|
|
264
|
+
description: string;
|
|
265
|
+
recommended: boolean;
|
|
266
|
+
url: string;
|
|
267
|
+
};
|
|
268
|
+
schema: never[];
|
|
269
|
+
messages: {
|
|
270
|
+
semicolon: string;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
create(context: any): {
|
|
274
|
+
Program(): void;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
260
277
|
"no-jargon": {
|
|
261
278
|
meta: {
|
|
262
279
|
type: string;
|
|
@@ -585,6 +602,23 @@ declare var src_default: {
|
|
|
585
602
|
Program(): void;
|
|
586
603
|
};
|
|
587
604
|
};
|
|
605
|
+
"no-prose-semicolon": {
|
|
606
|
+
meta: {
|
|
607
|
+
type: string;
|
|
608
|
+
docs: {
|
|
609
|
+
description: string;
|
|
610
|
+
recommended: boolean;
|
|
611
|
+
url: string;
|
|
612
|
+
};
|
|
613
|
+
schema: never[];
|
|
614
|
+
messages: {
|
|
615
|
+
semicolon: string;
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
create(context: any): {
|
|
619
|
+
Program(): void;
|
|
620
|
+
};
|
|
621
|
+
};
|
|
588
622
|
"no-jargon": {
|
|
589
623
|
meta: {
|
|
590
624
|
type: string;
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// tools/oxlint/config/no-comment-slop/plugin.ts
|
|
1
|
+
// tools/oxlint/config/vendors/no-comment-slop.ts
|
|
4
2
|
var DIRECTIVE = new RegExp([
|
|
5
3
|
/^\s*@ts-(?:ignore|expect-error|nocheck|check)/,
|
|
6
4
|
/^\s*@(?:type|typedef|satisfies|license|preserve|jsx|jsxImportSource|vite-ignore|vue-ignore|__PURE__)\b/,
|
|
7
5
|
/^\s*#__(?:PURE|NO_SIDE_EFFECTS)__/,
|
|
8
6
|
/^\s*(?:eslint|oxlint|biome)-(?:disable|enable)/,
|
|
9
|
-
/^\s*eslint(?:\s|-env\b|$)/,
|
|
10
7
|
/^\s*tslint:/,
|
|
11
8
|
/^\s*biome-ignore/,
|
|
12
9
|
/^\s*(?:prettier|deno-lint|deno-fmt)-ignore/,
|
|
13
10
|
/^\s*(?:istanbul|c8|v8|node|jest|vitest)\s+ignore/,
|
|
14
|
-
/^\s*(?:globals?|exported)\s/,
|
|
15
11
|
/^\s*SPDX-License-Identifier/,
|
|
16
12
|
/^\s*\/\s*<(?:reference|amd-module|amd-dependency)\b/,
|
|
17
13
|
/^\s*webpack[A-Z]/
|
|
18
14
|
].map((r) => `(?:${r.source})`).join("|"), "i");
|
|
19
|
-
var
|
|
15
|
+
var BLOCK_DIRECTIVE = /^\s*(?:globals?|exported|eslint(?:\s|-env\b|$))/i;
|
|
16
|
+
var isDirective = (comment) => DIRECTIVE.test(comment.value) || comment.type === "Block" && BLOCK_DIRECTIVE.test(comment.value);
|
|
20
17
|
var isJsdoc = (comment) => comment.type === "Block" && comment.value.startsWith("*");
|
|
21
18
|
function getSource(context) {
|
|
22
19
|
const anyContext = context;
|
|
@@ -205,8 +202,8 @@ var maxCommentLines = {
|
|
|
205
202
|
if (isJsdoc(block[0])) {
|
|
206
203
|
const comment = block[0];
|
|
207
204
|
const documentsExport = exportStarts.some((start) => documentsExportAt(text, comment.range[0], comment.range[1], start));
|
|
208
|
-
const
|
|
209
|
-
for (const section of splitSections(
|
|
205
|
+
const lines = withoutFencedCode(commentLines(comment));
|
|
206
|
+
for (const section of splitSections(lines)) {
|
|
210
207
|
if (isExampleSection(section))
|
|
211
208
|
continue;
|
|
212
209
|
const isTag = /^@\w/.test(section[0].text);
|
|
@@ -565,6 +562,71 @@ var noEmDash = {
|
|
|
565
562
|
};
|
|
566
563
|
}
|
|
567
564
|
};
|
|
565
|
+
var MARKDOWN_TARGET = /!?\[[^\]\n]*\]\([^)\n]*\)|!?\[[^\]\n]*\]\[[^\]\n]*\]|<[^>\s]+>|\b(?:https?:\/\/|www\.)\S+/g;
|
|
566
|
+
var maskMarkdown = (value) => value.replace(MARKDOWN_TARGET, (span) => " ".repeat(span.length));
|
|
567
|
+
var HTML_ENTITY = /&#?[0-9a-z]+$/i;
|
|
568
|
+
var CODE_PUNCTUATION = /[=(){}[\]]/;
|
|
569
|
+
var DECLARATION = /^(?:const|let|var|function|class|import|export)\b/;
|
|
570
|
+
var CLAUSE_BEFORE = /[\p{L}\p{N}_]\s*$/u;
|
|
571
|
+
var CLAUSE_AFTER = /^\s+\p{L}/u;
|
|
572
|
+
var noProseSemicolon = {
|
|
573
|
+
meta: {
|
|
574
|
+
type: "suggestion",
|
|
575
|
+
docs: {
|
|
576
|
+
description: "Disallow semicolons that join two clauses in comment prose",
|
|
577
|
+
recommended: true,
|
|
578
|
+
url: docsUrl("no-prose-semicolon")
|
|
579
|
+
},
|
|
580
|
+
schema: [],
|
|
581
|
+
messages: {
|
|
582
|
+
semicolon: "Rewrite this without a semicolon: start a new sentence, or use a comma or parentheses. For code in a comment, wrap it in backticks"
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
create(context) {
|
|
586
|
+
const sourceCode = getSource(context);
|
|
587
|
+
return {
|
|
588
|
+
Program() {
|
|
589
|
+
for (const comment of getComments(sourceCode)) {
|
|
590
|
+
if (isDirective(comment))
|
|
591
|
+
continue;
|
|
592
|
+
const raw = comment.value.split(`
|
|
593
|
+
`);
|
|
594
|
+
const masked = maskMarkdown(maskLiterals(comment.value)).split(`
|
|
595
|
+
`);
|
|
596
|
+
let offset = 0;
|
|
597
|
+
let fenced = false;
|
|
598
|
+
for (const [index, line] of masked.entries()) {
|
|
599
|
+
const start = offset;
|
|
600
|
+
offset += line.length + 1;
|
|
601
|
+
if (raw[index].replace(GUTTER, "").startsWith("```")) {
|
|
602
|
+
fenced = !fenced;
|
|
603
|
+
continue;
|
|
604
|
+
}
|
|
605
|
+
if (fenced)
|
|
606
|
+
continue;
|
|
607
|
+
const gutter = GUTTER.exec(line)[0].length;
|
|
608
|
+
const text = line.slice(gutter);
|
|
609
|
+
if (CODE_PUNCTUATION.test(text) || DECLARATION.test(text))
|
|
610
|
+
continue;
|
|
611
|
+
for (let i = text.indexOf(";");i !== -1; i = text.indexOf(";", i + 1)) {
|
|
612
|
+
const before = text.slice(0, i);
|
|
613
|
+
if (!CLAUSE_BEFORE.test(before))
|
|
614
|
+
continue;
|
|
615
|
+
if (HTML_ENTITY.test(before))
|
|
616
|
+
continue;
|
|
617
|
+
if (!CLAUSE_AFTER.test(text.slice(i + 1)))
|
|
618
|
+
continue;
|
|
619
|
+
context.report({
|
|
620
|
+
loc: spanAt(comment, start + gutter + i, 1),
|
|
621
|
+
messageId: "semicolon"
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
};
|
|
568
630
|
var defaultJargonWords = [
|
|
569
631
|
"utilize",
|
|
570
632
|
"utilise",
|
|
@@ -883,6 +945,7 @@ var plugin = {
|
|
|
883
945
|
"multiline-jsdoc-format": multilineJsdocFormat,
|
|
884
946
|
"no-trailing-period": noTrailingPeriod,
|
|
885
947
|
"no-em-dash": noEmDash,
|
|
948
|
+
"no-prose-semicolon": noProseSemicolon,
|
|
886
949
|
"no-jargon": noJargon,
|
|
887
950
|
"no-foreign-syntax": noForeignSyntax
|
|
888
951
|
},
|
|
@@ -902,6 +965,7 @@ Object.assign(plugin.configs, {
|
|
|
902
965
|
"no-comment-slop/multiline-jsdoc-format": "error",
|
|
903
966
|
"no-comment-slop/no-trailing-period": "error",
|
|
904
967
|
"no-comment-slop/no-em-dash": "error",
|
|
968
|
+
"no-comment-slop/no-prose-semicolon": "error",
|
|
905
969
|
"no-comment-slop/no-jargon": "error",
|
|
906
970
|
"no-comment-slop/no-foreign-syntax": "error"
|
|
907
971
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare function projectFor(fromFile: any): any;
|
|
2
|
+
declare function themeFileFor(fromFile: any): any;
|
|
3
|
+
declare function colorTokensFor(fromFile: any): any;
|
|
4
|
+
declare function componentsFor(fromFile: any): any;
|
|
5
|
+
declare function variantDefinitionsOf(file: any): any;
|
|
6
|
+
declare function variantNamesFor(file: any, component: any): any;
|
|
7
|
+
declare var plugin: {
|
|
8
|
+
meta: {
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
rules: {
|
|
12
|
+
"no-restyle": any;
|
|
13
|
+
"no-raw-colors": any;
|
|
14
|
+
"no-arbitrary-values": any;
|
|
15
|
+
"no-inline-styles": any;
|
|
16
|
+
"require-static-classes": any;
|
|
17
|
+
"no-unknown-classes": any;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
declare var project: {
|
|
21
|
+
projectFor: typeof projectFor;
|
|
22
|
+
themeFileFor: typeof themeFileFor;
|
|
23
|
+
colorTokensFor: typeof colorTokensFor;
|
|
24
|
+
componentsFor: typeof componentsFor;
|
|
25
|
+
variantDefinitionsOf: typeof variantDefinitionsOf;
|
|
26
|
+
variantNamesFor: typeof variantNamesFor;
|
|
27
|
+
};
|
|
28
|
+
declare var src_default: {
|
|
29
|
+
meta: {
|
|
30
|
+
name: string;
|
|
31
|
+
};
|
|
32
|
+
rules: {
|
|
33
|
+
"no-restyle": any;
|
|
34
|
+
"no-raw-colors": any;
|
|
35
|
+
"no-arbitrary-values": any;
|
|
36
|
+
"no-inline-styles": any;
|
|
37
|
+
"require-static-classes": any;
|
|
38
|
+
"no-unknown-classes": any;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export { src_default as default, plugin, project };
|