@tai-kun/vp-lint-plugins 0.0.5 → 0.0.6

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 (48) hide show
  1. package/dist/src/rules/{blank-line-utils.d.ts → _blank-line-utils.d.ts} +1 -1
  2. package/dist/src/rules/_blank-line-utils.d.ts.map +1 -0
  3. package/dist/src/rules/{comment-utils.d.ts → _comment-utils.d.ts} +1 -1
  4. package/dist/src/rules/_comment-utils.d.ts.map +1 -0
  5. package/dist/src/rules/{comment-utils.js → _comment-utils.js} +2 -1
  6. package/dist/src/rules/{jsdoc-utils.d.ts → _jsdoc-utils.d.ts} +1 -1
  7. package/dist/src/rules/_jsdoc-utils.d.ts.map +1 -0
  8. package/dist/src/rules/{jsdoc-utils.js → _jsdoc-utils.js} +1 -1
  9. package/dist/src/rules/{object-sort-utils.d.ts → _object-sort-utils.d.ts} +1 -1
  10. package/dist/src/rules/_object-sort-utils.d.ts.map +1 -0
  11. package/dist/src/rules/blank-line.js +1 -1
  12. package/dist/src/rules/comment-japanese-spacing.js +1 -1
  13. package/dist/src/rules/comment-one-sentence-per-line.d.ts +1 -1
  14. package/dist/src/rules/comment-one-sentence-per-line.js +2 -2
  15. package/dist/src/rules/jsdoc-param-order.js +1 -1
  16. package/dist/src/rules/jsdoc-tag-lines.js +1 -1
  17. package/dist/src/rules/jsdoc-tag-order.js +1 -1
  18. package/dist/src/rules/object-properties-newline.d.ts +2 -1
  19. package/dist/src/rules/object-properties-newline.d.ts.map +1 -1
  20. package/dist/src/rules/object-properties-newline.js +39 -8
  21. package/dist/src/rules/overload-signatures-adjacent.js +1 -1
  22. package/dist/src/rules/sort-import-export-specifiers.js +1 -1
  23. package/dist/src/rules/sort-jsx-props.js +1 -1
  24. package/dist/src/rules/sort-object-properties.js +1 -1
  25. package/dist/src/rules/sort-type-members.js +1 -1
  26. package/package.json +1 -1
  27. package/src/rules/{comment-utils.ts → _comment-utils.ts} +2 -1
  28. package/src/rules/{jsdoc-utils.ts → _jsdoc-utils.ts} +1 -1
  29. package/src/rules/blank-line.ts +1 -1
  30. package/src/rules/comment-japanese-spacing.ts +2 -2
  31. package/src/rules/comment-one-sentence-per-line.ts +3 -3
  32. package/src/rules/jsdoc-param-order.ts +1 -1
  33. package/src/rules/jsdoc-tag-lines.ts +2 -2
  34. package/src/rules/jsdoc-tag-order.ts +1 -1
  35. package/src/rules/object-properties-newline.ts +93 -10
  36. package/src/rules/overload-signatures-adjacent.ts +1 -1
  37. package/src/rules/sort-import-export-specifiers.ts +1 -1
  38. package/src/rules/sort-jsx-props.ts +1 -1
  39. package/src/rules/sort-object-properties.ts +1 -1
  40. package/src/rules/sort-type-members.ts +1 -1
  41. package/dist/src/rules/blank-line-utils.d.ts.map +0 -1
  42. package/dist/src/rules/comment-utils.d.ts.map +0 -1
  43. package/dist/src/rules/jsdoc-utils.d.ts.map +0 -1
  44. package/dist/src/rules/object-sort-utils.d.ts.map +0 -1
  45. /package/dist/src/rules/{blank-line-utils.js → _blank-line-utils.js} +0 -0
  46. /package/dist/src/rules/{object-sort-utils.js → _object-sort-utils.js} +0 -0
  47. /package/src/rules/{blank-line-utils.ts → _blank-line-utils.ts} +0 -0
  48. /package/src/rules/{object-sort-utils.ts → _object-sort-utils.ts} +0 -0
@@ -27,4 +27,4 @@ declare function getBlankLineFix(fixer: Fixer, sourceCode: SourceCode, node: EST
27
27
  */
28
28
  declare function getRemoveBlankLineFix(fixer: Fixer, sourceCode: SourceCode, node: ESTree.Node, target: ESTree.Node | Comment): Fix | null;
29
29
  export { isComment, hasBlankLine, isDocComment, getBlankLineFix, getNextStatement, getInsertionTarget, getPreviousStatement, getRemoveBlankLineFix, };
30
- //# sourceMappingURL=blank-line-utils.d.ts.map
30
+ //# sourceMappingURL=_blank-line-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_blank-line-utils.d.ts","sourceRoot":"","sources":["../../../src/rules/_blank-line-utils.ts"],"names":[],"mappings":"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,EACT,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,GACtB,CAAC"}
@@ -27,4 +27,4 @@ declare function getLineGroupInfos(group: readonly Comment[], sourceCode: Source
27
27
  declare function getCommentLineInfos(comment: Comment, sourceCode: SourceCode): (CommentLine | null)[];
28
28
  export type { CommentLine };
29
29
  export { isTag, isBlank, isFence, isCodeLike, isDirective, isLabelLine, isSentenceEnd, isListOrHeading, getLineGroupInfos, getCommentLineInfos, isSkippableProseLine, };
30
- //# sourceMappingURL=comment-utils.d.ts.map
30
+ //# sourceMappingURL=_comment-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_comment-utils.d.ts","sourceRoot":"","sources":["../../../src/rules/_comment-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAElE,UAAU,WAAW;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AA6BD,iBAAS,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtC;AAED,iBAAS,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAI1C;AAED,iBAAS,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAI1C;AAED,iBAAS,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpC;AAED,iBAAS,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9C;AAED,iBAAS,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQzC;AAED,iBAAS,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAItC;AAED,iBAAS,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAI5C;AAED;;GAEG;AACH,iBAAS,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAcnD;AAiDD,iBAAS,iBAAiB,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,EAAE,UAAU,EAAE,UAAU,GAAG,WAAW,EAAE,CAe3F;AAiBD;;;;GAIG;AACH,iBAAS,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,CAgB7F;AAED,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B,OAAO,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,GACrB,CAAC"}
@@ -1,4 +1,5 @@
1
- const SENTENCE_END = /[。..!?!?]$/u;
1
+ // ラベル行とは別に、閉じ括弧付きのコロン終わりも文末とします。
2
+ const SENTENCE_END = /[。..!?!?::]$/u;
2
3
  const TRAILING_CLOSERS = /[」』】)》)〕〉]}"'”’]+$/u;
3
4
  const DIRECTIVE_PREFIXES = [
4
5
  "#!",
@@ -23,4 +23,4 @@ declare function hasExampleOrFence(lines: readonly JSDocLine[]): boolean;
23
23
  declare function getNodeJSDoc(node: ESTree.Node, sourceCode: SourceCode): Comment | null;
24
24
  export type { JSDocLine };
25
25
  export { getTagName, getNodeJSDoc, getParamName, getJSDocLines, hasExampleOrFence };
26
- //# sourceMappingURL=jsdoc-utils.d.ts.map
26
+ //# sourceMappingURL=_jsdoc-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_jsdoc-utils.d.ts","sourceRoot":"","sources":["../../../src/rules/_jsdoc-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAI1E,UAAU,SAAS;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,iBAAS,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/C;AAyBD;;GAEG;AACH,iBAAS,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAqBpD;AAED;;;;GAIG;AACH,iBAAS,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,SAAS,EAAE,GAAG,IAAI,CA8DnF;AAED,iBAAS,iBAAiB,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,GAAG,OAAO,CAE/D;AAcD;;GAEG;AACH,iBAAS,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,GAAG,IAAI,CAmB/E;AAED,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { isFence } from "./comment-utils.js";
1
+ import { isFence } from "./_comment-utils.js";
2
2
  function getTagName(text) {
3
3
  const match = /^@(?<tag>[A-Za-z][\w-]*)/u.exec(text.trimStart());
4
4
  return match?.groups?.["tag"] ?? null;
@@ -41,4 +41,4 @@ declare function compareNames(left: string, right: string): number;
41
41
  */
42
42
  declare function getSortPlan(node: SortableObject, sourceCode: SourceCode, options?: SortPlanOptions): SortPlan | null;
43
43
  export { getSortPlan, compareNames };
44
- //# sourceMappingURL=object-sort-utils.d.ts.map
44
+ //# sourceMappingURL=_object-sort-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_object-sort-utils.d.ts","sourceRoot":"","sources":["../../../src/rules/_object-sort-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAW,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAE1E,KAAK,cAAc,GAAG,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,aAAa,CAAC;AAIrE,UAAU,eAAe;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAYD,UAAU,QAAQ;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAID,KAAK,QAAQ,GACT;IACE,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,EAAE,KAAK,CAAC;IAChB,WAAW,EAAE,IAAI,CAAC;CACnB,GACD;IACE,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,EAAE,IAAI,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB,GACD;IACE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,QAAQ,EAAE,IAAI,CAAC;IACf,WAAW,EAAE,IAAI,CAAC;CACnB,CAAC;AAuEN,iBAAS,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAiBzD;AAyCD;;;;;;;;;GASG;AACH,iBAAS,WAAW,CAClB,IAAI,EAAE,cAAc,EACpB,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,eAAoB,GAC5B,QAAQ,GAAG,IAAI,CAuNjB;AAED,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
- import { isComment, hasBlankLine, isDocComment, getBlankLineFix, getInsertionTarget, getRemoveBlankLineFix, } from "./blank-line-utils.js";
2
+ import { isComment, hasBlankLine, isDocComment, getBlankLineFix, getInsertionTarget, getRemoveBlankLineFix, } from "./_blank-line-utils.js";
3
3
  const CONTROL_STATEMENT_TYPES = new Set([
4
4
  "DoWhileStatement",
5
5
  "ForInStatement",
@@ -1,5 +1,5 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
- import { isBlank, isFence, isCodeLike, isDirective, getLineGroupInfos, getCommentLineInfos, } from "./comment-utils.js";
2
+ import { isBlank, isFence, isCodeLike, isDirective, getLineGroupInfos, getCommentLineInfos, } from "./_comment-utils.js";
3
3
  const JAPANESE = /^[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\u30FC\uFF66-\uFF9F]$/u;
4
4
  const ASCII_BOUNDARY = /^[A-Za-z0-9+#@%/&=$~^|:\\`]$/u;
5
5
  const EXCLUDED_PUNCTUATION = new Set(["、", "。", "(", ")", "「", "」"]);
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * コメントを 1 行 1 文にします。
3
3
  *
4
- * 複数行のコメントで、文の途中(「、」など)で改行している箇所を検出し、次の行と結合します。文末は「。」「.」「.」「!」「?」などを判定します。
4
+ * 複数行のコメントで、文の途中(「、」など)で改行している箇所を検出し、次の行と結合します。文末は「。」「.」「.」「!」「?」「:」「:」などを判定します。
5
5
  * `requireEndPunctuation` を有効にすると、文末の句読点がない散文行も報告します。
6
6
  */
7
7
  declare const commentOneSentencePerLine: import("vite-plus/lint/plugins").Rule;
@@ -1,5 +1,5 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
- import { isTag, isBlank, isFence, isCodeLike, isDirective, isLabelLine, isSentenceEnd, isListOrHeading, getLineGroupInfos, getCommentLineInfos, isSkippableProseLine, } from "./comment-utils.js";
2
+ import { isTag, isBlank, isFence, isCodeLike, isDirective, isLabelLine, isSentenceEnd, isListOrHeading, getLineGroupInfos, getCommentLineInfos, isSkippableProseLine, } from "./_comment-utils.js";
3
3
  function needsSpace(left, right) {
4
4
  const leftIsAscii = /[A-Za-z0-9`)]$/u.test(left);
5
5
  const leftIsWord = /[\p{L}\p{N}]$/u.test(left);
@@ -102,7 +102,7 @@ function collectDiagnostics(infos, requireEndPunctuation) {
102
102
  /**
103
103
  * コメントを 1 行 1 文にします。
104
104
  *
105
- * 複数行のコメントで、文の途中(「、」など)で改行している箇所を検出し、次の行と結合します。文末は「。」「.」「.」「!」「?」などを判定します。
105
+ * 複数行のコメントで、文の途中(「、」など)で改行している箇所を検出し、次の行と結合します。文末は「。」「.」「.」「!」「?」「:」「:」などを判定します。
106
106
  * `requireEndPunctuation` を有効にすると、文末の句読点がない散文行も報告します。
107
107
  */
108
108
  const commentOneSentencePerLine = defineRule({
@@ -1,5 +1,5 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
- import { getNodeJSDoc, getParamName, getJSDocLines, hasExampleOrFence } from "./jsdoc-utils.js";
2
+ import { getNodeJSDoc, getParamName, getJSDocLines, hasExampleOrFence } from "./_jsdoc-utils.js";
3
3
  function getParamNameFromPattern(param) {
4
4
  if (param.type === "Identifier") {
5
5
  return param.name;
@@ -1,5 +1,5 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
- import { getJSDocLines, hasExampleOrFence } from "./jsdoc-utils.js";
2
+ import { getJSDocLines, hasExampleOrFence } from "./_jsdoc-utils.js";
3
3
  function getBlankPrefix(line) {
4
4
  return line.prefix.trimEnd();
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
- import { getJSDocLines, hasExampleOrFence } from "./jsdoc-utils.js";
2
+ import { getJSDocLines, hasExampleOrFence } from "./_jsdoc-utils.js";
3
3
  const TAG_ORDER = {
4
4
  see: 70,
5
5
  beta: 65,
@@ -1,8 +1,9 @@
1
1
  /**
2
- * プロパティーが 2 つ以上あるオブジェクトリテラルを複数行にします。
2
+ * プロパティーが 2 つ以上あるオブジェクトリテラルと JSON オブジェクトを複数行にします。
3
3
  *
4
4
  * Oxfmt の `objectWrap` には「プロパティー数で改行を強制する」オプションがないため、改行を挿入する最小限の fix を提供します。
5
5
  * `objectWrap: "preserve"` と組み合わせることで、後続の Oxfmt がプロパティーごとの改行とインデントを整えます。
6
+ * JSON (`JSONObjectExpression`) も同じ fix で複数行化します。
6
7
  */
7
8
  declare const objectPropertiesNewline: import("vite-plus/lint/plugins").Rule;
8
9
  export default objectPropertiesNewline;
@@ -1 +1 @@
1
- {"version":3,"file":"object-properties-newline.d.ts","sourceRoot":"","sources":["../../../src/rules/object-properties-newline.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,QAAA,MAAM,uBAAuB,uCAyC3B,CAAC;eAEY,uBAAuB"}
1
+ {"version":3,"file":"object-properties-newline.d.ts","sourceRoot":"","sources":["../../../src/rules/object-properties-newline.ts"],"names":[],"mappings":"AA2EA;;;;;;GAMG;AACH,QAAA,MAAM,uBAAuB,uCAoD3B,CAAC;eAEY,uBAAuB"}
@@ -1,15 +1,35 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
- import { getSortPlan } from "./object-sort-utils.js";
2
+ import { getSortPlan } from "./_object-sort-utils.js";
3
3
  /**
4
- * プロパティーが 2 つ以上あるオブジェクトリテラルを複数行にします。
4
+ * 複数行にすべき 1 行オブジェクトかどうかを判定します。
5
+ *
6
+ * プロパティーが 2 つ以上あり、最初のプロパティーが `{` と同じ行にある場合に `true` を返します。
7
+ *
8
+ * @param node 判定対象のオブジェクトです。
9
+ *
10
+ * @returns 複数行にすべき場合に `true` です。
11
+ */
12
+ function needsMultiline(node) {
13
+ if (node.properties.length < 2) {
14
+ return false;
15
+ }
16
+ const firstProperty = node.properties[0];
17
+ if (firstProperty === undefined) {
18
+ return false;
19
+ }
20
+ return firstProperty.loc.start.line === node.loc.start.line;
21
+ }
22
+ /**
23
+ * プロパティーが 2 つ以上あるオブジェクトリテラルと JSON オブジェクトを複数行にします。
5
24
  *
6
25
  * Oxfmt の `objectWrap` には「プロパティー数で改行を強制する」オプションがないため、改行を挿入する最小限の fix を提供します。
7
26
  * `objectWrap: "preserve"` と組み合わせることで、後続の Oxfmt がプロパティーごとの改行とインデントを整えます。
27
+ * JSON (`JSONObjectExpression`) も同じ fix で複数行化します。
8
28
  */
9
29
  const objectPropertiesNewline = defineRule({
10
30
  meta: {
11
31
  docs: {
12
- description: "Enforce multiline object literals when they have two or more properties.",
32
+ description: "Enforce multiline objects when they have two or more properties.",
13
33
  },
14
34
  type: "layout",
15
35
  fixable: "whitespace",
@@ -20,16 +40,12 @@ const objectPropertiesNewline = defineRule({
20
40
  create(context) {
21
41
  return {
22
42
  ObjectExpression(node) {
23
- if (node.properties.length < 2) {
24
- return;
25
- }
26
43
  // 並び替え可能なオブジェクトは sort-object-properties が複数行化も担当します。
27
44
  if (getSortPlan(node, context.sourceCode) !== null) {
28
45
  return;
29
46
  }
30
47
  // Oxfmt は `{` の直後に改行があるかどうかで複数行を維持するため、最初のプロパティーが `{` と同じ行にある場合だけを対象にします。
31
- const firstProperty = node.properties[0];
32
- if (firstProperty === undefined || firstProperty.loc.start.line !== node.loc.start.line) {
48
+ if (!needsMultiline(node)) {
33
49
  return;
34
50
  }
35
51
  context.report({
@@ -41,6 +57,21 @@ const objectPropertiesNewline = defineRule({
41
57
  messageId: "multiline",
42
58
  });
43
59
  },
60
+ JSONObjectExpression(node) {
61
+ const target = node;
62
+ if (!needsMultiline(target)) {
63
+ return;
64
+ }
65
+ context.report({
66
+ fix(fixer) {
67
+ // JSON も `objectWrap: "preserve"` で整形されるため、JS と同じく `{` の直後に改行を 1 つ挿入するだけで十分です。
68
+ return fixer.insertTextAfterRange([target.range[0], target.range[0] + 1], "\n");
69
+ },
70
+ // `JSONObjectExpression` は `VisitorObject` の既定の型に含まれないため、報告時は `node` をそのまま渡します。
71
+ node: node,
72
+ messageId: "multiline",
73
+ });
74
+ },
44
75
  };
45
76
  },
46
77
  });
@@ -1,5 +1,5 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
- import { getNextStatement, getRemoveBlankLineFix } from "./blank-line-utils.js";
2
+ import { getNextStatement, getRemoveBlankLineFix } from "./_blank-line-utils.js";
3
3
  function getFunction(node) {
4
4
  if (node.type === "FunctionDeclaration" || node.type === "TSDeclareFunction") {
5
5
  return node;
@@ -1,5 +1,5 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
- import { compareNames } from "./object-sort-utils.js";
2
+ import { compareNames } from "./_object-sort-utils.js";
3
3
  function getSpecifierName(node) {
4
4
  if (node.type === "Identifier") {
5
5
  return node.name;
@@ -1,5 +1,5 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
- import { compareNames } from "./object-sort-utils.js";
2
+ import { compareNames } from "./_object-sort-utils.js";
3
3
  function isNamedAttribute(attribute) {
4
4
  return attribute.type === "JSXAttribute" && attribute.name.type === "JSXIdentifier";
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
- import { getSortPlan } from "./object-sort-utils.js";
2
+ import { getSortPlan } from "./_object-sort-utils.js";
3
3
  /**
4
4
  * オブジェクトリテラルのプロパティーを、名前の長さが短い順、同じ長さなら名前順に並べます。
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
- import { compareNames } from "./object-sort-utils.js";
2
+ import { compareNames } from "./_object-sort-utils.js";
3
3
  function getLineStarts(text) {
4
4
  const starts = [0];
5
5
  for (let index = 0; index < text.length; index += 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tai-kun/vp-lint-plugins",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "",
5
5
  "homepage": "https://tai-kun.github.io/vp-lint-plugins/",
6
6
  "license": "MIT",
@@ -8,7 +8,8 @@ interface CommentLine {
8
8
  start: number;
9
9
  }
10
10
 
11
- const SENTENCE_END = /[。..!?!?]$/u;
11
+ // ラベル行とは別に、閉じ括弧付きのコロン終わりも文末とします。
12
+ const SENTENCE_END = /[。..!?!?::]$/u;
12
13
  const TRAILING_CLOSERS = /[」』】)》)〕〉]}"'”’]+$/u;
13
14
  const DIRECTIVE_PREFIXES = [
14
15
  "#!",
@@ -1,6 +1,6 @@
1
1
  import type { ESTree, Comment, SourceCode } from "vite-plus/lint/plugins";
2
2
 
3
- import { isFence } from "./comment-utils.js";
3
+ import { isFence } from "./_comment-utils.js";
4
4
 
5
5
  interface JSDocLine {
6
6
  content: string;
@@ -8,7 +8,7 @@ import {
8
8
  getBlankLineFix,
9
9
  getInsertionTarget,
10
10
  getRemoveBlankLineFix,
11
- } from "./blank-line-utils.js";
11
+ } from "./_blank-line-utils.js";
12
12
 
13
13
  type ControlStatement =
14
14
  | ESTree.DoWhileStatement
@@ -1,7 +1,7 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
2
  import type { Comment, Context } from "vite-plus/lint/plugins";
3
3
 
4
- import type { CommentLine } from "./comment-utils.js";
4
+ import type { CommentLine } from "./_comment-utils.js";
5
5
  import {
6
6
  isBlank,
7
7
  isFence,
@@ -9,7 +9,7 @@ import {
9
9
  isDirective,
10
10
  getLineGroupInfos,
11
11
  getCommentLineInfos,
12
- } from "./comment-utils.js";
12
+ } from "./_comment-utils.js";
13
13
 
14
14
  interface SpacingEdit {
15
15
  end: number;
@@ -1,7 +1,7 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
2
  import type { Comment, Location } from "vite-plus/lint/plugins";
3
3
 
4
- import type { CommentLine } from "./comment-utils.js";
4
+ import type { CommentLine } from "./_comment-utils.js";
5
5
  import {
6
6
  isTag,
7
7
  isBlank,
@@ -14,7 +14,7 @@ import {
14
14
  getLineGroupInfos,
15
15
  getCommentLineInfos,
16
16
  isSkippableProseLine,
17
- } from "./comment-utils.js";
17
+ } from "./_comment-utils.js";
18
18
 
19
19
  interface SentenceFix {
20
20
  end: number;
@@ -162,7 +162,7 @@ function collectDiagnostics(
162
162
  /**
163
163
  * コメントを 1 行 1 文にします。
164
164
  *
165
- * 複数行のコメントで、文の途中(「、」など)で改行している箇所を検出し、次の行と結合します。文末は「。」「.」「.」「!」「?」などを判定します。
165
+ * 複数行のコメントで、文の途中(「、」など)で改行している箇所を検出し、次の行と結合します。文末は「。」「.」「.」「!」「?」「:」「:」などを判定します。
166
166
  * `requireEndPunctuation` を有効にすると、文末の句読点がない散文行も報告します。
167
167
  */
168
168
  const commentOneSentencePerLine = defineRule({
@@ -1,7 +1,7 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
2
  import type { ESTree, Context, SourceCode } from "vite-plus/lint/plugins";
3
3
 
4
- import { getNodeJSDoc, getParamName, getJSDocLines, hasExampleOrFence } from "./jsdoc-utils.js";
4
+ import { getNodeJSDoc, getParamName, getJSDocLines, hasExampleOrFence } from "./_jsdoc-utils.js";
5
5
 
6
6
  function getParamNameFromPattern(param: ESTree.ParamPattern): string | null {
7
7
  if (param.type === "Identifier") {
@@ -1,7 +1,7 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
2
 
3
- import type { JSDocLine } from "./jsdoc-utils.js";
4
- import { getJSDocLines, hasExampleOrFence } from "./jsdoc-utils.js";
3
+ import type { JSDocLine } from "./_jsdoc-utils.js";
4
+ import { getJSDocLines, hasExampleOrFence } from "./_jsdoc-utils.js";
5
5
 
6
6
  interface Entry {
7
7
  groupId: number;
@@ -1,6 +1,6 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
2
 
3
- import { getJSDocLines, hasExampleOrFence } from "./jsdoc-utils.js";
3
+ import { getJSDocLines, hasExampleOrFence } from "./_jsdoc-utils.js";
4
4
 
5
5
  const TAG_ORDER: Record<string, number> = {
6
6
  see: 70,
@@ -1,17 +1,89 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
+ import type { ESTree } from "vite-plus/lint/plugins";
2
3
 
3
- import { getSortPlan } from "./object-sort-utils.js";
4
+ import { getSortPlan } from "./_object-sort-utils.js";
4
5
 
5
6
  /**
6
- * プロパティーが 2 つ以上あるオブジェクトリテラルを複数行にします。
7
+ * 改行判定に必要な最小限のオブジェクト形状です。
8
+ *
9
+ * `ObjectExpression` と JSON パーサーの `JSONObjectExpression` の両方を受け付けます。
10
+ */
11
+ interface MultilineTarget {
12
+ /**
13
+ * オブジェクトの位置情報です。
14
+ */
15
+ loc: {
16
+ /**
17
+ * 開始位置です。
18
+ */
19
+ start: {
20
+ /**
21
+ * 1 始まりの行番号です。
22
+ */
23
+ line: number;
24
+ };
25
+ };
26
+
27
+ /**
28
+ * プロパティーの一覧です。
29
+ */
30
+ properties: readonly {
31
+ /**
32
+ * プロパティーの位置情報です。
33
+ */
34
+ loc: {
35
+ /**
36
+ * 開始位置です。
37
+ */
38
+ start: {
39
+ /**
40
+ * 1 始まりの行番号です。
41
+ */
42
+ line: number;
43
+ };
44
+ };
45
+ }[];
46
+
47
+ /**
48
+ * オブジェクトの範囲です。
49
+ */
50
+ range: readonly [number, number];
51
+ }
52
+
53
+ /**
54
+ * 複数行にすべき 1 行オブジェクトかどうかを判定します。
55
+ *
56
+ * プロパティーが 2 つ以上あり、最初のプロパティーが `{` と同じ行にある場合に `true` を返します。
57
+ *
58
+ * @param node 判定対象のオブジェクトです。
59
+ *
60
+ * @returns 複数行にすべき場合に `true` です。
61
+ */
62
+ function needsMultiline(node: MultilineTarget): boolean {
63
+ if (node.properties.length < 2) {
64
+ return false;
65
+ }
66
+
67
+ const firstProperty = node.properties[0];
68
+
69
+ if (firstProperty === undefined) {
70
+ return false;
71
+ }
72
+
73
+ return firstProperty.loc.start.line === node.loc.start.line;
74
+ }
75
+
76
+ /**
77
+ * プロパティーが 2 つ以上あるオブジェクトリテラルと JSON オブジェクトを複数行にします。
7
78
  *
8
79
  * Oxfmt の `objectWrap` には「プロパティー数で改行を強制する」オプションがないため、改行を挿入する最小限の fix を提供します。
9
80
  * `objectWrap: "preserve"` と組み合わせることで、後続の Oxfmt がプロパティーごとの改行とインデントを整えます。
81
+ * JSON (`JSONObjectExpression`) も同じ fix で複数行化します。
10
82
  */
11
83
  const objectPropertiesNewline = defineRule({
12
84
  meta: {
13
85
  docs: {
14
- description: "Enforce multiline object literals when they have two or more properties.",
86
+ description: "Enforce multiline objects when they have two or more properties.",
15
87
  },
16
88
  type: "layout",
17
89
  fixable: "whitespace",
@@ -22,19 +94,13 @@ const objectPropertiesNewline = defineRule({
22
94
  create(context) {
23
95
  return {
24
96
  ObjectExpression(node): void {
25
- if (node.properties.length < 2) {
26
- return;
27
- }
28
-
29
97
  // 並び替え可能なオブジェクトは sort-object-properties が複数行化も担当します。
30
98
  if (getSortPlan(node, context.sourceCode) !== null) {
31
99
  return;
32
100
  }
33
101
 
34
102
  // Oxfmt は `{` の直後に改行があるかどうかで複数行を維持するため、最初のプロパティーが `{` と同じ行にある場合だけを対象にします。
35
- const firstProperty = node.properties[0];
36
-
37
- if (firstProperty === undefined || firstProperty.loc.start.line !== node.loc.start.line) {
103
+ if (!needsMultiline(node)) {
38
104
  return;
39
105
  }
40
106
 
@@ -47,6 +113,23 @@ const objectPropertiesNewline = defineRule({
47
113
  messageId: "multiline",
48
114
  });
49
115
  },
116
+ JSONObjectExpression(node): void {
117
+ const target = node as unknown as MultilineTarget;
118
+
119
+ if (!needsMultiline(target)) {
120
+ return;
121
+ }
122
+
123
+ context.report({
124
+ fix(fixer) {
125
+ // JSON も `objectWrap: "preserve"` で整形されるため、JS と同じく `{` の直後に改行を 1 つ挿入するだけで十分です。
126
+ return fixer.insertTextAfterRange([target.range[0], target.range[0] + 1], "\n");
127
+ },
128
+ // `JSONObjectExpression` は `VisitorObject` の既定の型に含まれないため、報告時は `node` をそのまま渡します。
129
+ node: node as unknown as ESTree.ObjectExpression,
130
+ messageId: "multiline",
131
+ });
132
+ },
50
133
  };
51
134
  },
52
135
  });
@@ -1,7 +1,7 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
2
  import type { ESTree, Context, SourceCode } from "vite-plus/lint/plugins";
3
3
 
4
- import { getNextStatement, getRemoveBlankLineFix } from "./blank-line-utils.js";
4
+ import { getNextStatement, getRemoveBlankLineFix } from "./_blank-line-utils.js";
5
5
 
6
6
  function getFunction(node: ESTree.Node): ESTree.Function | null {
7
7
  if (node.type === "FunctionDeclaration" || node.type === "TSDeclareFunction") {
@@ -1,7 +1,7 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
2
  import type { ESTree, SourceCode } from "vite-plus/lint/plugins";
3
3
 
4
- import { compareNames } from "./object-sort-utils.js";
4
+ import { compareNames } from "./_object-sort-utils.js";
5
5
 
6
6
  interface SpecifierUnit {
7
7
  group: number;
@@ -1,7 +1,7 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
2
  import type { ESTree, SourceCode } from "vite-plus/lint/plugins";
3
3
 
4
- import { compareNames } from "./object-sort-utils.js";
4
+ import { compareNames } from "./_object-sort-utils.js";
5
5
 
6
6
  interface AttributeUnit {
7
7
  name: string;
@@ -1,6 +1,6 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
2
 
3
- import { getSortPlan } from "./object-sort-utils.js";
3
+ import { getSortPlan } from "./_object-sort-utils.js";
4
4
 
5
5
  /**
6
6
  * オブジェクトリテラルのプロパティーを、名前の長さが短い順、同じ長さなら名前順に並べます。
@@ -1,7 +1,7 @@
1
1
  import { defineRule } from "vite-plus/lint/plugins";
2
2
  import type { Fix, ESTree, Comment, SourceCode } from "vite-plus/lint/plugins";
3
3
 
4
- import { compareNames } from "./object-sort-utils.js";
4
+ import { compareNames } from "./_object-sort-utils.js";
5
5
 
6
6
  interface MemberUnit {
7
7
  endLine: number;
@@ -1 +0,0 @@
1
- {"version":3,"file":"blank-line-utils.d.ts","sourceRoot":"","sources":["../../../src/rules/blank-line-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AA4BtF,iBAAS,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,GAAG,IAAI,CAc/D;AAED,iBAAS,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAA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../../src/rules/jsdoc-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAI1E,UAAU,SAAS;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,iBAAS,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI/C;AAyBD;;GAEG;AACH,iBAAS,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAqBpD;AAED;;;;GAIG;AACH,iBAAS,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,GAAG,SAAS,EAAE,GAAG,IAAI,CA8DnF;AAED,iBAAS,iBAAiB,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,GAAG,OAAO,CAE/D;AAcD;;GAEG;AACH,iBAAS,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,GAAG,IAAI,CAmB/E;AAED,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"object-sort-utils.d.ts","sourceRoot":"","sources":["../../../src/rules/object-sort-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAW,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAE1E,KAAK,cAAc,GAAG,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,aAAa,CAAC;AAIrE,UAAU,eAAe;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,O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