@tai-kun/vp-lint-plugins 0.0.5 → 0.0.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/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/plugin.js +2 -0
- package/dist/src/rules/{blank-line-utils.d.ts → _blank-line-utils.d.ts} +1 -1
- package/dist/src/rules/_blank-line-utils.d.ts.map +1 -0
- package/dist/src/rules/{comment-utils.d.ts → _comment-utils.d.ts} +1 -1
- package/dist/src/rules/_comment-utils.d.ts.map +1 -0
- package/dist/src/rules/{comment-utils.js → _comment-utils.js} +3 -1
- package/dist/src/rules/{jsdoc-utils.d.ts → _jsdoc-utils.d.ts} +1 -1
- package/dist/src/rules/_jsdoc-utils.d.ts.map +1 -0
- package/dist/src/rules/{jsdoc-utils.js → _jsdoc-utils.js} +1 -1
- package/dist/src/rules/{object-sort-utils.d.ts → _object-sort-utils.d.ts} +1 -1
- package/dist/src/rules/_object-sort-utils.d.ts.map +1 -0
- package/dist/src/rules/blank-line.js +1 -1
- package/dist/src/rules/comment-japanese-spacing.js +1 -1
- package/dist/src/rules/comment-one-sentence-per-line.d.ts +1 -1
- package/dist/src/rules/comment-one-sentence-per-line.js +2 -2
- package/dist/src/rules/jsdoc-param-order.js +1 -1
- package/dist/src/rules/jsdoc-tag-lines.js +1 -1
- package/dist/src/rules/jsdoc-tag-order.js +1 -1
- package/dist/src/rules/no-await-in-expect.d.ts +10 -0
- package/dist/src/rules/no-await-in-expect.d.ts.map +1 -0
- package/dist/src/rules/no-await-in-expect.js +115 -0
- package/dist/src/rules/object-properties-newline.d.ts +2 -1
- package/dist/src/rules/object-properties-newline.d.ts.map +1 -1
- package/dist/src/rules/object-properties-newline.js +39 -8
- package/dist/src/rules/overload-signatures-adjacent.js +1 -1
- package/dist/src/rules/sort-import-export-specifiers.js +1 -1
- package/dist/src/rules/sort-jsx-props.js +1 -1
- package/dist/src/rules/sort-object-properties.js +1 -1
- package/dist/src/rules/sort-type-members.js +1 -1
- package/dist/src/rules/spaced-comment.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/plugin.ts +2 -0
- package/src/rules/{comment-utils.ts → _comment-utils.ts} +3 -1
- package/src/rules/{jsdoc-utils.ts → _jsdoc-utils.ts} +1 -1
- package/src/rules/blank-line.ts +1 -1
- package/src/rules/comment-japanese-spacing.ts +2 -2
- package/src/rules/comment-one-sentence-per-line.ts +3 -3
- package/src/rules/jsdoc-param-order.ts +1 -1
- package/src/rules/jsdoc-tag-lines.ts +2 -2
- package/src/rules/jsdoc-tag-order.ts +1 -1
- package/src/rules/no-await-in-expect.ts +139 -0
- package/src/rules/object-properties-newline.ts +93 -10
- package/src/rules/overload-signatures-adjacent.ts +1 -1
- package/src/rules/sort-import-export-specifiers.ts +1 -1
- package/src/rules/sort-jsx-props.ts +1 -1
- package/src/rules/sort-object-properties.ts +1 -1
- package/src/rules/sort-type-members.ts +1 -1
- package/src/rules/spaced-comment.ts +1 -1
- package/dist/src/rules/blank-line-utils.d.ts.map +0 -1
- package/dist/src/rules/comment-utils.d.ts.map +0 -1
- package/dist/src/rules/jsdoc-utils.d.ts.map +0 -1
- package/dist/src/rules/object-sort-utils.d.ts.map +0 -1
- /package/dist/src/rules/{blank-line-utils.js → _blank-line-utils.js} +0 -0
- /package/dist/src/rules/{object-sort-utils.js → _object-sort-utils.js} +0 -0
- /package/src/rules/{blank-line-utils.ts → _blank-line-utils.ts} +0 -0
- /package/src/rules/{object-sort-utils.ts → _object-sort-utils.ts} +0 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { default as jsdocTagLines } from "./rules/jsdoc-tag-lines.js";
|
|
|
6
6
|
export { default as jsdocTagOrder } from "./rules/jsdoc-tag-order.js";
|
|
7
7
|
export { default as memberOrdering } from "./rules/member-ordering.js";
|
|
8
8
|
export { default as mergeImports } from "./rules/merge-imports.js";
|
|
9
|
+
export { default as noAwaitInExpect } from "./rules/no-await-in-expect.js";
|
|
9
10
|
export { default as objectPropertiesNewline } from "./rules/object-properties-newline.js";
|
|
10
11
|
export { default as overloadSignaturesAdjacent } from "./rules/overload-signatures-adjacent.js";
|
|
11
12
|
export { default as sortImportExportSpecifiers } from "./rules/sort-import-export-specifiers.js";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAChG,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAErG,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAChG,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAErG,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export { default as jsdocTagLines } from "./rules/jsdoc-tag-lines.js";
|
|
|
6
6
|
export { default as jsdocTagOrder } from "./rules/jsdoc-tag-order.js";
|
|
7
7
|
export { default as memberOrdering } from "./rules/member-ordering.js";
|
|
8
8
|
export { default as mergeImports } from "./rules/merge-imports.js";
|
|
9
|
+
export { default as noAwaitInExpect } from "./rules/no-await-in-expect.js";
|
|
9
10
|
export { default as objectPropertiesNewline } from "./rules/object-properties-newline.js";
|
|
10
11
|
export { default as overloadSignaturesAdjacent } from "./rules/overload-signatures-adjacent.js";
|
|
11
12
|
export { default as sortImportExportSpecifiers } from "./rules/sort-import-export-specifiers.js";
|
package/dist/src/plugin.js
CHANGED
|
@@ -7,6 +7,7 @@ import jsdocTagLines from "./rules/jsdoc-tag-lines.js";
|
|
|
7
7
|
import jsdocTagOrder from "./rules/jsdoc-tag-order.js";
|
|
8
8
|
import memberOrdering from "./rules/member-ordering.js";
|
|
9
9
|
import mergeImports from "./rules/merge-imports.js";
|
|
10
|
+
import noAwaitInExpect from "./rules/no-await-in-expect.js";
|
|
10
11
|
import objectPropertiesNewline from "./rules/object-properties-newline.js";
|
|
11
12
|
import overloadSignaturesAdjacent from "./rules/overload-signatures-adjacent.js";
|
|
12
13
|
import sortImportExportSpecifiers from "./rules/sort-import-export-specifiers.js";
|
|
@@ -27,6 +28,7 @@ export default definePlugin({
|
|
|
27
28
|
"member-ordering": memberOrdering,
|
|
28
29
|
"jsdoc-param-order": jsdocParamOrder,
|
|
29
30
|
"sort-type-members": sortTypeMembers,
|
|
31
|
+
"no-await-in-expect": noAwaitInExpect,
|
|
30
32
|
"sort-object-properties": sortObjectProperties,
|
|
31
33
|
"comment-japanese-spacing": commentJapaneseSpacing,
|
|
32
34
|
"object-properties-newline": objectPropertiesNewline,
|
|
@@ -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=
|
|
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":"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,CAAC,IAAI,GAAG,IAAI,CAcnE;AAED;;;;;GAKG;AACH,iBAAS,kBAAkB,CACzB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,aAAa,EAAE,MAAM,CAAC,IAAI,EAC1B,UAAU,EAAE,UAAU,GACrB,MAAM,CAAC,IAAI,GAAG,OAAO,CAWvB;AAED,iBAAS,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,GAAG,OAAO,CAE/E;AAED;;;;GAIG;AACH,iBAAS,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,IAAI,OAAO,CAInE;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,IAAI,OAAO,CAEtE;AAED,iBAAS,eAAe,CACtB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,MAAM,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,GAC5B,GAAG,GAAG,IAAI,CAYZ;AAED;;GAEG;AACH,iBAAS,qBAAqB,CAC5B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,MAAM,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,GAC5B,GAAG,GAAG,IAAI,CAmBZ;AAED,OAAO,EACL,SAAS,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=
|
|
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;AA8BD,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
|
-
|
|
1
|
+
// ラベル行とは別に、閉じ括弧付きのコロン終わりも文末とします。
|
|
2
|
+
const SENTENCE_END = /[。..!?!?::)…]$/u;
|
|
2
3
|
const TRAILING_CLOSERS = /[」』】)》)〕〉]}"'”’]+$/u;
|
|
3
4
|
const DIRECTIVE_PREFIXES = [
|
|
4
5
|
"#!",
|
|
@@ -12,6 +13,7 @@ const DIRECTIVE_PREFIXES = [
|
|
|
12
13
|
"@link",
|
|
13
14
|
"TODO",
|
|
14
15
|
"FIXME",
|
|
16
|
+
"#__PURE__",
|
|
15
17
|
"NOTE",
|
|
16
18
|
"HACK",
|
|
17
19
|
"XXX",
|
|
@@ -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=
|
|
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"}
|
|
@@ -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=
|
|
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 "./
|
|
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 "./
|
|
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 "./
|
|
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 "./
|
|
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;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `expect(await ...)` の代わりに `await expect(...).resolves` / `.rejects` を使います。
|
|
3
|
+
*
|
|
4
|
+
* `expect()` の引数で `await` すると、拒否された Promise を `.rejects` で検証できません。
|
|
5
|
+
* 成功の検証には `await expect(...).resolves` を、失敗の検証には `await expect(...).rejects` を使ってください。
|
|
6
|
+
* 自動修正では `.resolves` を付けて書き換えるため、拒否の検証が必要な場合は手で `.rejects` に直してください。
|
|
7
|
+
*/
|
|
8
|
+
declare const noAwaitInExpect: import("vite-plus/lint/plugins").Rule;
|
|
9
|
+
export default noAwaitInExpect;
|
|
10
|
+
//# sourceMappingURL=no-await-in-expect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-await-in-expect.d.ts","sourceRoot":"","sources":["../../../src/rules/no-await-in-expect.ts"],"names":[],"mappings":"AAoEA;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,uCA6DnB,CAAC;eAEY,eAAe"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { defineRule } from "vite-plus/lint/plugins";
|
|
2
|
+
/**
|
|
3
|
+
* 括弧で包まれた式を剥がして中身を返します。
|
|
4
|
+
*/
|
|
5
|
+
function unwrapParenthesized(node) {
|
|
6
|
+
let current = node;
|
|
7
|
+
while (current.type === "ParenthesizedExpression") {
|
|
8
|
+
current = current.expression;
|
|
9
|
+
}
|
|
10
|
+
return current;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* `expect(...)` から `.resolves` / `.rejects` に続くチェーンかどうかを返します。
|
|
14
|
+
*/
|
|
15
|
+
function usesResolvesStyle(node) {
|
|
16
|
+
let current = node;
|
|
17
|
+
let parent = node.parent;
|
|
18
|
+
while (parent !== undefined &&
|
|
19
|
+
parent.type === "MemberExpression" &&
|
|
20
|
+
!parent.computed &&
|
|
21
|
+
parent.object === current &&
|
|
22
|
+
parent.property.type === "Identifier") {
|
|
23
|
+
if (parent.property.name === "resolves" || parent.property.name === "rejects") {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
current = parent;
|
|
27
|
+
parent = parent.parent;
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* `expect(...)` を含む式全体がすでに `await` されているかどうかを返します。
|
|
33
|
+
*
|
|
34
|
+
* `await expect(await ...).toBe(1)` のように、チェーンの外側で待たれている場合は `await` を追加しません。
|
|
35
|
+
*/
|
|
36
|
+
function isAlreadyAwaited(node) {
|
|
37
|
+
let outer = node;
|
|
38
|
+
let parent = node.parent;
|
|
39
|
+
while (parent !== undefined) {
|
|
40
|
+
if (parent.type === "ParenthesizedExpression" || parent.type === "ChainExpression") {
|
|
41
|
+
outer = parent;
|
|
42
|
+
parent = parent.parent;
|
|
43
|
+
}
|
|
44
|
+
else if (parent.type === "MemberExpression" && parent.object === outer) {
|
|
45
|
+
outer = parent;
|
|
46
|
+
parent = parent.parent;
|
|
47
|
+
}
|
|
48
|
+
else if (parent.type === "CallExpression" && parent.callee === outer) {
|
|
49
|
+
outer = parent;
|
|
50
|
+
parent = parent.parent;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return parent !== undefined && parent.type === "AwaitExpression";
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* `expect(await ...)` の代わりに `await expect(...).resolves` / `.rejects` を使います。
|
|
60
|
+
*
|
|
61
|
+
* `expect()` の引数で `await` すると、拒否された Promise を `.rejects` で検証できません。
|
|
62
|
+
* 成功の検証には `await expect(...).resolves` を、失敗の検証には `await expect(...).rejects` を使ってください。
|
|
63
|
+
* 自動修正では `.resolves` を付けて書き換えるため、拒否の検証が必要な場合は手で `.rejects` に直してください。
|
|
64
|
+
*/
|
|
65
|
+
const noAwaitInExpect = defineRule({
|
|
66
|
+
meta: {
|
|
67
|
+
docs: {
|
|
68
|
+
description: "Require `await expect(...).resolves` or `.rejects` instead of `expect(await ...)`.",
|
|
69
|
+
},
|
|
70
|
+
type: "problem",
|
|
71
|
+
fixable: "code",
|
|
72
|
+
messages: {
|
|
73
|
+
noAwaitInExpect: "expect() の中で await しないでください。await expect(...).resolves / .rejects を使ってください。",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
create(context) {
|
|
77
|
+
const sourceCode = context.sourceCode;
|
|
78
|
+
return {
|
|
79
|
+
CallExpression(node) {
|
|
80
|
+
if (node.callee.type !== "Identifier" || node.callee.name !== "expect") {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const first = node.arguments[0];
|
|
84
|
+
if (first === undefined || first.type === "SpreadElement") {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const awaited = unwrapParenthesized(first);
|
|
88
|
+
if (awaited.type !== "AwaitExpression") {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
// 入れ子の await はいちばん内側まで剥がして 1 回で修正します。
|
|
92
|
+
let inner = unwrapParenthesized(awaited.argument);
|
|
93
|
+
while (inner.type === "AwaitExpression") {
|
|
94
|
+
inner = unwrapParenthesized(inner.argument);
|
|
95
|
+
}
|
|
96
|
+
const resolvesStyle = usesResolvesStyle(node);
|
|
97
|
+
const prefix = resolvesStyle || isAlreadyAwaited(node) ? "" : "await ";
|
|
98
|
+
const text = sourceCode.text;
|
|
99
|
+
const replacement = prefix +
|
|
100
|
+
text.slice(node.range[0], awaited.range[0]) +
|
|
101
|
+
text.slice(inner.range[0], inner.range[1]) +
|
|
102
|
+
text.slice(awaited.range[1], node.range[1]) +
|
|
103
|
+
(resolvesStyle ? "" : ".resolves");
|
|
104
|
+
context.report({
|
|
105
|
+
fix(fixer) {
|
|
106
|
+
return fixer.replaceTextRange([node.range[0], node.range[1]], replacement);
|
|
107
|
+
},
|
|
108
|
+
node,
|
|
109
|
+
messageId: "noAwaitInExpect",
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
export default noAwaitInExpect;
|
|
@@ -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":"
|
|
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 "./
|
|
2
|
+
import { getSortPlan } from "./_object-sort-utils.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
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
|
|
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
|
-
|
|
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 "./
|
|
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 "./
|
|
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 { compareNames } from "./
|
|
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) {
|
|
@@ -13,7 +13,7 @@ function isExemptLineComment(raw) {
|
|
|
13
13
|
return DECORATIVE_LINE.test(raw.slice(2));
|
|
14
14
|
}
|
|
15
15
|
function isExemptBlockComment(raw) {
|
|
16
|
-
return raw.startsWith("/*!");
|
|
16
|
+
return raw.startsWith("/*!") || raw.startsWith("/*#");
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* コメントの開始記号の直後と終了記号の直前に空白を要求します。
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { default as jsdocTagLines } from "./rules/jsdoc-tag-lines.js";
|
|
|
6
6
|
export { default as jsdocTagOrder } from "./rules/jsdoc-tag-order.js";
|
|
7
7
|
export { default as memberOrdering } from "./rules/member-ordering.js";
|
|
8
8
|
export { default as mergeImports } from "./rules/merge-imports.js";
|
|
9
|
+
export { default as noAwaitInExpect } from "./rules/no-await-in-expect.js";
|
|
9
10
|
export { default as objectPropertiesNewline } from "./rules/object-properties-newline.js";
|
|
10
11
|
export { default as overloadSignaturesAdjacent } from "./rules/overload-signatures-adjacent.js";
|
|
11
12
|
export { default as sortImportExportSpecifiers } from "./rules/sort-import-export-specifiers.js";
|
package/src/plugin.ts
CHANGED
|
@@ -8,6 +8,7 @@ import jsdocTagLines from "./rules/jsdoc-tag-lines.js";
|
|
|
8
8
|
import jsdocTagOrder from "./rules/jsdoc-tag-order.js";
|
|
9
9
|
import memberOrdering from "./rules/member-ordering.js";
|
|
10
10
|
import mergeImports from "./rules/merge-imports.js";
|
|
11
|
+
import noAwaitInExpect from "./rules/no-await-in-expect.js";
|
|
11
12
|
import objectPropertiesNewline from "./rules/object-properties-newline.js";
|
|
12
13
|
import overloadSignaturesAdjacent from "./rules/overload-signatures-adjacent.js";
|
|
13
14
|
import sortImportExportSpecifiers from "./rules/sort-import-export-specifiers.js";
|
|
@@ -29,6 +30,7 @@ export default definePlugin({
|
|
|
29
30
|
"member-ordering": memberOrdering,
|
|
30
31
|
"jsdoc-param-order": jsdocParamOrder,
|
|
31
32
|
"sort-type-members": sortTypeMembers,
|
|
33
|
+
"no-await-in-expect": noAwaitInExpect,
|
|
32
34
|
"sort-object-properties": sortObjectProperties,
|
|
33
35
|
"comment-japanese-spacing": commentJapaneseSpacing,
|
|
34
36
|
"object-properties-newline": objectPropertiesNewline,
|
|
@@ -8,7 +8,8 @@ interface CommentLine {
|
|
|
8
8
|
start: number;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// ラベル行とは別に、閉じ括弧付きのコロン終わりも文末とします。
|
|
12
|
+
const SENTENCE_END = /[。..!?!?::)…]$/u;
|
|
12
13
|
const TRAILING_CLOSERS = /[」』】)》)〕〉]}"'”’]+$/u;
|
|
13
14
|
const DIRECTIVE_PREFIXES = [
|
|
14
15
|
"#!",
|
|
@@ -22,6 +23,7 @@ const DIRECTIVE_PREFIXES = [
|
|
|
22
23
|
"@link",
|
|
23
24
|
"TODO",
|
|
24
25
|
"FIXME",
|
|
26
|
+
"#__PURE__",
|
|
25
27
|
"NOTE",
|
|
26
28
|
"HACK",
|
|
27
29
|
"XXX",
|
package/src/rules/blank-line.ts
CHANGED
|
@@ -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 "./
|
|
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 "./
|
|
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 "./
|
|
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 "./
|
|
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 "./
|
|
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 "./
|
|
4
|
-
import { getJSDocLines, hasExampleOrFence } from "./
|
|
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;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { defineRule } from "vite-plus/lint/plugins";
|
|
2
|
+
import type { ESTree } from "vite-plus/lint/plugins";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 括弧で包まれた式を剥がして中身を返します。
|
|
6
|
+
*/
|
|
7
|
+
function unwrapParenthesized(node: ESTree.Expression): ESTree.Expression {
|
|
8
|
+
let current = node;
|
|
9
|
+
|
|
10
|
+
while (current.type === "ParenthesizedExpression") {
|
|
11
|
+
current = current.expression;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return current;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* `expect(...)` から `.resolves` / `.rejects` に続くチェーンかどうかを返します。
|
|
19
|
+
*/
|
|
20
|
+
function usesResolvesStyle(node: ESTree.CallExpression): boolean {
|
|
21
|
+
let current: ESTree.Node = node;
|
|
22
|
+
let parent: ESTree.Node | undefined = node.parent;
|
|
23
|
+
|
|
24
|
+
while (
|
|
25
|
+
parent !== undefined &&
|
|
26
|
+
parent.type === "MemberExpression" &&
|
|
27
|
+
!parent.computed &&
|
|
28
|
+
parent.object === current &&
|
|
29
|
+
parent.property.type === "Identifier"
|
|
30
|
+
) {
|
|
31
|
+
if (parent.property.name === "resolves" || parent.property.name === "rejects") {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
current = parent;
|
|
36
|
+
parent = parent.parent;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* `expect(...)` を含む式全体がすでに `await` されているかどうかを返します。
|
|
44
|
+
*
|
|
45
|
+
* `await expect(await ...).toBe(1)` のように、チェーンの外側で待たれている場合は `await` を追加しません。
|
|
46
|
+
*/
|
|
47
|
+
function isAlreadyAwaited(node: ESTree.CallExpression): boolean {
|
|
48
|
+
let outer: ESTree.Node = node;
|
|
49
|
+
let parent: ESTree.Node | undefined = node.parent;
|
|
50
|
+
|
|
51
|
+
while (parent !== undefined) {
|
|
52
|
+
if (parent.type === "ParenthesizedExpression" || parent.type === "ChainExpression") {
|
|
53
|
+
outer = parent;
|
|
54
|
+
parent = parent.parent;
|
|
55
|
+
} else if (parent.type === "MemberExpression" && parent.object === outer) {
|
|
56
|
+
outer = parent;
|
|
57
|
+
parent = parent.parent;
|
|
58
|
+
} else if (parent.type === "CallExpression" && parent.callee === outer) {
|
|
59
|
+
outer = parent;
|
|
60
|
+
parent = parent.parent;
|
|
61
|
+
} else {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return parent !== undefined && parent.type === "AwaitExpression";
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* `expect(await ...)` の代わりに `await expect(...).resolves` / `.rejects` を使います。
|
|
71
|
+
*
|
|
72
|
+
* `expect()` の引数で `await` すると、拒否された Promise を `.rejects` で検証できません。
|
|
73
|
+
* 成功の検証には `await expect(...).resolves` を、失敗の検証には `await expect(...).rejects` を使ってください。
|
|
74
|
+
* 自動修正では `.resolves` を付けて書き換えるため、拒否の検証が必要な場合は手で `.rejects` に直してください。
|
|
75
|
+
*/
|
|
76
|
+
const noAwaitInExpect = defineRule({
|
|
77
|
+
meta: {
|
|
78
|
+
docs: {
|
|
79
|
+
description:
|
|
80
|
+
"Require `await expect(...).resolves` or `.rejects` instead of `expect(await ...)`.",
|
|
81
|
+
},
|
|
82
|
+
type: "problem",
|
|
83
|
+
fixable: "code",
|
|
84
|
+
messages: {
|
|
85
|
+
noAwaitInExpect:
|
|
86
|
+
"expect() の中で await しないでください。await expect(...).resolves / .rejects を使ってください。",
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
create(context) {
|
|
90
|
+
const sourceCode = context.sourceCode;
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
CallExpression(node): void {
|
|
94
|
+
if (node.callee.type !== "Identifier" || node.callee.name !== "expect") {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const first = node.arguments[0];
|
|
99
|
+
|
|
100
|
+
if (first === undefined || first.type === "SpreadElement") {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const awaited = unwrapParenthesized(first);
|
|
105
|
+
|
|
106
|
+
if (awaited.type !== "AwaitExpression") {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// 入れ子の await はいちばん内側まで剥がして 1 回で修正します。
|
|
111
|
+
let inner = unwrapParenthesized(awaited.argument);
|
|
112
|
+
|
|
113
|
+
while (inner.type === "AwaitExpression") {
|
|
114
|
+
inner = unwrapParenthesized(inner.argument);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const resolvesStyle = usesResolvesStyle(node);
|
|
118
|
+
const prefix = resolvesStyle || isAlreadyAwaited(node) ? "" : "await ";
|
|
119
|
+
|
|
120
|
+
const text = sourceCode.text;
|
|
121
|
+
const replacement =
|
|
122
|
+
prefix +
|
|
123
|
+
text.slice(node.range[0], awaited.range[0]) +
|
|
124
|
+
text.slice(inner.range[0], inner.range[1]) +
|
|
125
|
+
text.slice(awaited.range[1], node.range[1]) +
|
|
126
|
+
(resolvesStyle ? "" : ".resolves");
|
|
127
|
+
context.report({
|
|
128
|
+
fix(fixer) {
|
|
129
|
+
return fixer.replaceTextRange([node.range[0], node.range[1]], replacement);
|
|
130
|
+
},
|
|
131
|
+
node,
|
|
132
|
+
messageId: "noAwaitInExpect",
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
export default noAwaitInExpect;
|
|
@@ -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 "./
|
|
4
|
+
import { getSortPlan } from "./_object-sort-utils.js";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
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
|
|
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
|
-
|
|
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 "./
|
|
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 "./
|
|
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 "./
|
|
4
|
+
import { compareNames } from "./_object-sort-utils.js";
|
|
5
5
|
|
|
6
6
|
interface AttributeUnit {
|
|
7
7
|
name: string;
|
|
@@ -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 "./
|
|
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,CAAC,IAAI,GAAG,IAAI,CAcnE;AAED;;;;;GAKG;AACH,iBAAS,kBAAkB,CACzB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,aAAa,EAAE,MAAM,CAAC,IAAI,EAC1B,UAAU,EAAE,UAAU,GACrB,MAAM,CAAC,IAAI,GAAG,OAAO,CAWvB;AAED,iBAAS,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,GAAG,OAAO,CAE/E;AAED;;;;GAIG;AACH,iBAAS,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,IAAI,OAAO,CAInE;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,IAAI,OAAO,CAEtE;AAED,iBAAS,eAAe,CACtB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,MAAM,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,GAC5B,GAAG,GAAG,IAAI,CAYZ;AAED;;GAEG;AACH,iBAAS,qBAAqB,CAC5B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,MAAM,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,GAC5B,GAAG,GAAG,IAAI,CAmBZ;AAED,OAAO,EACL,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,GACtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
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;AA4BD,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 +0,0 @@
|
|
|
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 +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,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"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|