@sister.software/oxlint-config 10.0.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +169 -0
- package/out/acronym-case-plugin.d.ts +80 -0
- package/out/acronym-case-plugin.d.ts.map +1 -0
- package/out/acronym-case-plugin.js +272 -0
- package/out/acronym-case-plugin.js.map +1 -0
- package/out/browser-globals.d.ts +15 -0
- package/out/browser-globals.d.ts.map +1 -0
- package/out/browser-globals.js +76 -0
- package/out/browser-globals.js.map +1 -0
- package/out/console-padding-plugin.d.ts +16 -0
- package/out/console-padding-plugin.d.ts.map +1 -0
- package/out/console-padding-plugin.js +68 -0
- package/out/console-padding-plugin.js.map +1 -0
- package/out/constant-doc-plugin.d.ts +9 -3
- package/out/constant-doc-plugin.d.ts.map +1 -1
- package/out/constant-doc-plugin.js +6 -2
- package/out/constant-doc-plugin.js.map +1 -1
- package/out/headers-plugin.d.ts +6 -2
- package/out/headers-plugin.d.ts.map +1 -1
- package/out/headers-plugin.js +3 -1
- package/out/headers-plugin.js.map +1 -1
- package/out/index.d.ts +123 -27
- package/out/index.d.ts.map +1 -1
- package/out/index.js +63 -5
- package/out/index.js.map +1 -1
- package/out/jsdoc-plugin.d.ts +16 -0
- package/out/jsdoc-plugin.d.ts.map +1 -0
- package/out/jsdoc-plugin.js +68 -0
- package/out/jsdoc-plugin.js.map +1 -0
- package/out/length-truthiness-plugin.d.ts.map +1 -1
- package/out/length-truthiness-plugin.js +15 -5
- package/out/length-truthiness-plugin.js.map +1 -1
- package/out/multiline-statement-plugin.d.ts +18 -0
- package/out/multiline-statement-plugin.d.ts.map +1 -0
- package/out/multiline-statement-plugin.js +93 -0
- package/out/multiline-statement-plugin.js.map +1 -0
- package/out/padding-plugin.d.ts +4 -3
- package/out/padding-plugin.d.ts.map +1 -1
- package/out/padding-plugin.js +44 -27
- package/out/padding-plugin.js.map +1 -1
- package/out/padding-utils.d.ts +34 -0
- package/out/padding-utils.d.ts.map +1 -0
- package/out/padding-utils.js +50 -0
- package/out/padding-utils.js.map +1 -0
- package/out/plugin-types.d.ts +75 -13
- package/out/plugin-types.d.ts.map +1 -1
- package/out/plugin.d.ts.map +1 -1
- package/out/plugin.js +13 -0
- package/out/plugin.js.map +1 -1
- package/out/process-globals-plugin.d.ts.map +1 -1
- package/out/process-globals-plugin.js +6 -2
- package/out/process-globals-plugin.js.map +1 -1
- package/out/restrictions.d.ts +9 -3
- package/out/restrictions.d.ts.map +1 -1
- package/out/restrictions.js +4 -70
- package/out/restrictions.js.map +1 -1
- package/out/section-marker-plugin.d.ts +25 -0
- package/out/section-marker-plugin.d.ts.map +1 -0
- package/out/section-marker-plugin.js +234 -0
- package/out/section-marker-plugin.js.map +1 -0
- package/out/threshold-plugin.d.ts +9 -3
- package/out/threshold-plugin.d.ts.map +1 -1
- package/out/threshold-plugin.js +9 -3
- package/out/threshold-plugin.js.map +1 -1
- package/package.json +3 -3
- package/src/acronym-case-plugin.ts +370 -0
- package/src/browser-globals.ts +77 -0
- package/src/console-padding-plugin.ts +76 -0
- package/src/constant-doc-plugin.ts +15 -5
- package/src/headers-plugin.ts +6 -2
- package/src/index.ts +183 -29
- package/src/jsdoc-plugin.ts +75 -0
- package/src/length-truthiness-plugin.ts +15 -5
- package/src/multiline-statement-plugin.ts +104 -0
- package/src/padding-plugin.ts +44 -29
- package/src/padding-utils.ts +70 -0
- package/src/plugin-types.ts +75 -13
- package/src/plugin.ts +18 -0
- package/src/process-globals-plugin.ts +6 -2
- package/src/restrictions.ts +16 -77
- package/src/section-marker-plugin.ts +306 -0
- package/src/threshold-plugin.ts +18 -6
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
* @file The `sister-software/console-padding` rule: a `console.*` call gets a blank line on each
|
|
6
|
+
* side, so the lines that produce output stand apart from the lines that compute it. Scanning a
|
|
7
|
+
* long procedural script for "what does this print" then works visually.
|
|
8
|
+
*
|
|
9
|
+
* A RUN of console calls is one group — no blank lines inside it, one before the first and one
|
|
10
|
+
* after the last, because consecutive calls are one block of output. Neither edge is required
|
|
11
|
+
* where the block boundary already provides the separation: nothing is needed before a call that
|
|
12
|
+
* opens a block, or after one that closes it.
|
|
13
|
+
*/
|
|
14
|
+
import type { Rule } from "./plugin-types.js";
|
|
15
|
+
export declare const consolePaddingRule: Rule;
|
|
16
|
+
//# sourceMappingURL=console-padding-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-padding-plugin.d.ts","sourceRoot":"","sources":["../src/console-padding-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAsBtD,eAAO,MAAM,kBAAkB,EAAE,IAsChC,CAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
* @file The `sister-software/console-padding` rule: a `console.*` call gets a blank line on each
|
|
6
|
+
* side, so the lines that produce output stand apart from the lines that compute it. Scanning a
|
|
7
|
+
* long procedural script for "what does this print" then works visually.
|
|
8
|
+
*
|
|
9
|
+
* A RUN of console calls is one group — no blank lines inside it, one before the first and one
|
|
10
|
+
* after the last, because consecutive calls are one block of output. Neither edge is required
|
|
11
|
+
* where the block boundary already provides the separation: nothing is needed before a call that
|
|
12
|
+
* opens a block, or after one that closes it.
|
|
13
|
+
*/
|
|
14
|
+
import { createPaddingHelpers } from "./padding-utils.js";
|
|
15
|
+
/**
|
|
16
|
+
* The object whose method calls this rule treats as output.
|
|
17
|
+
*/
|
|
18
|
+
const CONSOLE_OBJECT = "console";
|
|
19
|
+
/**
|
|
20
|
+
* Is this statement a bare `console.<method>(…)` call?
|
|
21
|
+
*/
|
|
22
|
+
function isConsoleStatement(node) {
|
|
23
|
+
if (node?.type !== "ExpressionStatement")
|
|
24
|
+
return false;
|
|
25
|
+
const call = node.expression;
|
|
26
|
+
if (call?.type !== "CallExpression")
|
|
27
|
+
return false;
|
|
28
|
+
const callee = call.callee;
|
|
29
|
+
return (callee?.type === "MemberExpression" && callee.object?.type === "Identifier" && callee.object.name === CONSOLE_OBJECT);
|
|
30
|
+
}
|
|
31
|
+
export const consolePaddingRule = {
|
|
32
|
+
meta: {
|
|
33
|
+
name: "console-padding",
|
|
34
|
+
type: "layout",
|
|
35
|
+
fixable: "whitespace",
|
|
36
|
+
schema: [{ type: "object", additionalProperties: true }],
|
|
37
|
+
},
|
|
38
|
+
create(context) {
|
|
39
|
+
const sourceCode = context.sourceCode ?? context.getSourceCode();
|
|
40
|
+
const text = sourceCode.getText();
|
|
41
|
+
const { requirePadding } = createPaddingHelpers(context);
|
|
42
|
+
return {
|
|
43
|
+
ExpressionStatement(node) {
|
|
44
|
+
if (!isConsoleStatement(node))
|
|
45
|
+
return;
|
|
46
|
+
const parent = node.parent;
|
|
47
|
+
// Only statements in a statement list have neighbours to pad against.
|
|
48
|
+
if (!parent || !Array.isArray(parent.body))
|
|
49
|
+
return;
|
|
50
|
+
const body = parent.body;
|
|
51
|
+
const index = body.indexOf(node);
|
|
52
|
+
if (index === -1)
|
|
53
|
+
return;
|
|
54
|
+
const previous = body[index - 1];
|
|
55
|
+
const next = body[index + 1];
|
|
56
|
+
// Nothing before a call that opens the block, and nothing between calls in one run.
|
|
57
|
+
if (previous && !isConsoleStatement(previous)) {
|
|
58
|
+
requirePadding(previous, node, node, "Expected a blank line before this console call.");
|
|
59
|
+
}
|
|
60
|
+
// Nothing after a call that closes the block — the brace already separates it.
|
|
61
|
+
if (next && !isConsoleStatement(next)) {
|
|
62
|
+
requirePadding(node, next, node, "Expected a blank line after this console call.");
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=console-padding-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-padding-plugin.js","sourceRoot":"","sources":["../src/console-padding-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAGzD;;GAEG;AACH,MAAM,cAAc,GAAG,SAAS,CAAA;AAEhC;;GAEG;AACH,SAAS,kBAAkB,CAAC,IAAyB;IACpD,IAAI,IAAI,EAAE,IAAI,KAAK,qBAAqB;QAAE,OAAO,KAAK,CAAA;IACtD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAA;IAE5B,IAAI,IAAI,EAAE,IAAI,KAAK,gBAAgB;QAAE,OAAO,KAAK,CAAA;IACjD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;IAE1B,OAAO,CACN,MAAM,EAAE,IAAI,KAAK,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,KAAK,YAAY,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,cAAc,CACpH,CAAA;AACF,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAS;IACvC,IAAI,EAAE;QACL,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;KACxD;IACD,MAAM,CAAC,OAAO;QACb,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,aAAc,EAAE,CAAA;QACjE,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,EAAE,CAAA;QACjC,MAAM,EAAE,cAAc,EAAE,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;QAExD,OAAO;YACN,mBAAmB,CAAC,IAAa;gBAChC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC;oBAAE,OAAM;gBACrC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;gBAE1B,sEAAsE;gBACtE,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;oBAAE,OAAM;gBAClD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAA;gBACxB,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;gBAEhC,IAAI,KAAK,KAAK,CAAC,CAAC;oBAAE,OAAM;gBACxB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;gBAChC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;gBAE5B,oFAAoF;gBACpF,IAAI,QAAQ,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;oBAC/C,cAAc,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,iDAAiD,CAAC,CAAA;gBACxF,CAAC;gBAED,+EAA+E;gBAC/E,IAAI,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC;oBACvC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,gDAAgD,CAAC,CAAA;gBACnF,CAAC;YACF,CAAC;SACD,CAAA;IACF,CAAC;CACD,CAAA"}
|
|
@@ -9,11 +9,17 @@
|
|
|
9
9
|
* this rule without extracting a constant per row.
|
|
10
10
|
*/
|
|
11
11
|
import type { Rule } from "./plugin-types.js";
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Which module-level constants the rule applies to.
|
|
14
|
+
*/
|
|
13
15
|
export type ConstantDocScope = "exported" | "screaming" | "exported-or-screaming";
|
|
14
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Options accepted by {@link requireConstantDocRule}.
|
|
18
|
+
*/
|
|
15
19
|
export interface ConstantDocOptions {
|
|
16
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Defaults to `"exported-or-screaming"`.
|
|
22
|
+
*/
|
|
17
23
|
scope?: ConstantDocScope;
|
|
18
24
|
/**
|
|
19
25
|
* Export names a framework requires and gives meaning to, which a JSDoc block cannot improve on — Pastel's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constant-doc-plugin.d.ts","sourceRoot":"","sources":["../src/constant-doc-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"constant-doc-plugin.d.ts","sourceRoot":"","sources":["../src/constant-doc-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAY7C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,WAAW,GAAG,uBAAuB,CAAA;AAEjF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB;AAED,eAAO,MAAM,sBAAsB,EAAE,IA8EpC,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -8,9 +8,13 @@
|
|
|
8
8
|
* documented table also answers for every number inside it, which is why data-heavy files satisfy
|
|
9
9
|
* this rule without extracting a constant per row.
|
|
10
10
|
*/
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Names in SCREAMING_SNAKE_CASE, the convention for a tuning knob.
|
|
13
|
+
*/
|
|
12
14
|
const SCREAMING_CASE = /^[A-Z][A-Z0-9_]*$/;
|
|
13
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Initializers that make the binding a function rather than a constant value.
|
|
17
|
+
*/
|
|
14
18
|
const FUNCTION_INITIALIZERS = new Set(["ArrowFunctionExpression", "FunctionExpression"]);
|
|
15
19
|
export const requireConstantDocRule = {
|
|
16
20
|
meta: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constant-doc-plugin.js","sourceRoot":"","sources":["../src/constant-doc-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH
|
|
1
|
+
{"version":3,"file":"constant-doc-plugin.js","sourceRoot":"","sources":["../src/constant-doc-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;GAEG;AACH,MAAM,cAAc,GAAG,mBAAmB,CAAA;AAE1C;;GAEG;AACH,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,yBAAyB,EAAE,oBAAoB,CAAC,CAAC,CAAA;AAsBxF,MAAM,CAAC,MAAM,sBAAsB,GAAS;IAC3C,IAAI,EAAE;QACL,IAAI,EAAE,sBAAsB;QAC5B,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;KACxD;IACD,MAAM,CAAC,OAAO;QACb,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAuB,CAAA;QAChE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,uBAAuB,CAAA;QACtD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;QAChD,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,aAAc,EAAE,CAAA;QACjE,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,EAAE,CAAA;QACjC,MAAM,QAAQ,GAAG,UAAU,CAAC,cAAc,EAAE,CAAA;QAE5C;;;;;;WAMG;QACH,SAAS,cAAc,CAAC,KA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AAM,UAAU,IAAI,IAAI,CAAC,YAAY,IAAI,EAAE,EAAE,CAAC;oBAClD,MAAM,EAAE,GAAG,UAAU,CAAC,EAAE,CAAA;oBAExB,IAAI,EAAE,EAAE,IAAI,KAAK,YAAY,IAAI,CAAC,EAAE,CAAC,IAAI;wBAAE,SAAQ;oBAEnD,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;wBAAE,SAAQ;oBAEtC,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAA;oBAEnC,IAAI,WAAW,IAAI,qBAAqB,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC;wBAAE,SAAQ;oBAExE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;wBAAE,SAAQ;oBAE9D,OAAO,CAAC,MAAM,CAAC;wBACd,IAAI,EAAE,UAAU;wBAChB,OAAO,EACN,KAAK,EAAE,CAAC,IAAI,SAAS,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,kBAAkB,4BAA4B;4BAC3F,iEAAiE;qBAClE,CAAC,CAAA;gBACH,CAAC;YACF,CAAC;SACD,CAAA;IACF,CAAC;CACD,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
package/out/headers-plugin.d.ts
CHANGED
|
@@ -7,14 +7,18 @@
|
|
|
7
7
|
* while preserving any other JSDoc tags already present in the leading comment block.
|
|
8
8
|
*/
|
|
9
9
|
import type { Plugin, Rule } from "./plugin-types.js";
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Options accepted by the header rule.
|
|
12
|
+
*/
|
|
11
13
|
export interface HeaderRuleOptions {
|
|
12
14
|
copyrightHolder?: string;
|
|
13
15
|
spdxLicenseIdentifier?: string;
|
|
14
16
|
author?: string;
|
|
15
17
|
}
|
|
16
18
|
export declare const headerRule: Rule;
|
|
17
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The Sister Software oxlint header plugin. Registers the `sister-software/require-file-header` rule.
|
|
21
|
+
*/
|
|
18
22
|
declare const headerPlugin: Plugin;
|
|
19
23
|
export default headerPlugin;
|
|
20
24
|
//# sourceMappingURL=headers-plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headers-plugin.d.ts","sourceRoot":"","sources":["../src/headers-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAW,MAAM,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAE9D
|
|
1
|
+
{"version":3,"file":"headers-plugin.d.ts","sourceRoot":"","sources":["../src/headers-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAW,MAAM,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAE9D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAA;CACf;AAeD,eAAO,MAAM,UAAU,EAAE,IAiExB,CAAA;AAED;;GAEG;AACH,QAAA,MAAM,YAAY,EAAE,MAGnB,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/out/headers-plugin.js
CHANGED
|
@@ -76,7 +76,9 @@ export const headerRule = {
|
|
|
76
76
|
};
|
|
77
77
|
},
|
|
78
78
|
};
|
|
79
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* The Sister Software oxlint header plugin. Registers the `sister-software/require-file-header` rule.
|
|
81
|
+
*/
|
|
80
82
|
const headerPlugin = {
|
|
81
83
|
meta: { name: "sister-software" },
|
|
82
84
|
rules: { "require-file-header": headerRule },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headers-plugin.js","sourceRoot":"","sources":["../src/headers-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
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kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;oBAC3E,MAAM,KAAK,GAAG,UAAU,CAAC,SAAS,CAAC,CAAA;oBAEnC,OAAO,CAAC,MAAM,CAAC;wBACd,IAAI;wBACJ,OAAO,EAAE,qCAAqC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;wBAClE,GAAG,CAAC,KAAK;4BACR,OAAO,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;wBACpD,CAAC;qBACD,CAAC,CAAA;gBACH,CAAC;qBAAM,CAAC;oBACP,MAAM,KAAK,GAAG,UAAU,CAAC,EAAE,CAAC,CAAA;oBAC5B,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAA;oBAE/B,OAAO,CAAC,MAAM,CAAC;wBACd,IAAI;wBACJ,OAAO,EAAE,oDAAoD;wBAC7D,GAAG,CAAC,KAAK;4BACR,OAAO,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,CAAA;wBACzE,CAAC;qBACD,CAAC,CAAA;gBACH,CAAC;YACF,CAAC;SACD,CAAA;IACF,CAAC;CACD,CAAA;AAED;;GAEG;AACH,MAAM,YAAY,GAAW;IAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE;IACjC,KAAK,EAAE,EAAE,qBAAqB,EAAE,UAAU,EAAE;CAC5C,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/out/index.d.ts
CHANGED
|
@@ -5,25 +5,45 @@
|
|
|
5
5
|
* @file oxlint configuration factory for Sister Software projects.
|
|
6
6
|
*/
|
|
7
7
|
export * from "./restrictions.js";
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* An oxlint configuration object, as consumed by `oxlint.config.ts` / `.oxlintrc.json`.
|
|
10
|
+
*/
|
|
9
11
|
export type OxlintConfig = Record<string, unknown>;
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Numeric ceilings for the legibility-guardrail rules. Each is a hard ceiling, not a target.
|
|
14
|
+
*/
|
|
11
15
|
export interface OxlintConfigLimits {
|
|
12
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Maximum block nesting depth.
|
|
18
|
+
*/
|
|
13
19
|
maxDepth: number;
|
|
14
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Maximum parameters on a single function.
|
|
22
|
+
*/
|
|
15
23
|
maxParams: number;
|
|
16
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Maximum statements in a single function body.
|
|
26
|
+
*/
|
|
17
27
|
maxStatements: number;
|
|
18
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Maximum lines in a single function body, blank lines and comments excluded.
|
|
30
|
+
*/
|
|
19
31
|
maxLinesPerFunction: number;
|
|
20
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Maximum lines in a single file, blank lines and comments excluded.
|
|
34
|
+
*/
|
|
21
35
|
maxLines: number;
|
|
22
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Maximum nested callback depth.
|
|
38
|
+
*/
|
|
23
39
|
maxNestedCallbacks: number;
|
|
24
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Maximum nested call-expression depth, e.g. `a(b(c(d())))`.
|
|
42
|
+
*/
|
|
25
43
|
maxNestedCalls: number;
|
|
26
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Maximum cyclomatic complexity of a single function.
|
|
46
|
+
*/
|
|
27
47
|
complexity: number;
|
|
28
48
|
}
|
|
29
49
|
/**
|
|
@@ -45,7 +65,9 @@ export interface OxlintConfigLimits {
|
|
|
45
65
|
* toward the knee makes them do more of that job.
|
|
46
66
|
*/
|
|
47
67
|
export declare const DefaultLimits: OxlintConfigLimits;
|
|
48
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Globs treated as test files, where the size and named-constant rules are switched off.
|
|
70
|
+
*/
|
|
49
71
|
export declare const DefaultTestFilePatterns: string[];
|
|
50
72
|
/**
|
|
51
73
|
* Globs whose contents are emitted by a generator, not written by hand. The size ceilings are meaningless there — the
|
|
@@ -53,23 +75,55 @@ export declare const DefaultTestFilePatterns: string[];
|
|
|
53
75
|
* applies, because generated code ships.
|
|
54
76
|
*/
|
|
55
77
|
export declare const DefaultGeneratedFilePatterns: string[];
|
|
56
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* Globs for files JavaScript checks at runtime rather than TypeScript checking ahead of it. A JSDoc block there often
|
|
80
|
+
* IS the type annotation, and a one-line `@type` cast is the idiomatic form — so the multi-line requirement, which
|
|
81
|
+
* exists to make prose read as documentation, does not apply.
|
|
82
|
+
*/
|
|
83
|
+
export declare const DefaultUntypedFilePatterns: string[];
|
|
84
|
+
/**
|
|
85
|
+
* Options for {@link createOxlintConfig}.
|
|
86
|
+
*/
|
|
57
87
|
export interface OxlintConfigOptions {
|
|
58
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* The package namespace whose runtime boundaries are enforced, e.g. `@sister.software`.
|
|
90
|
+
*/
|
|
59
91
|
packageNamespace?: string;
|
|
60
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* The copyright holder stamped into file headers.
|
|
94
|
+
*/
|
|
61
95
|
copyrightHolder?: string;
|
|
62
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* The SPDX license identifier stamped into file headers.
|
|
98
|
+
*/
|
|
63
99
|
spdxLicenseIdentifier?: string;
|
|
64
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* The author stamped into file headers.
|
|
102
|
+
*/
|
|
65
103
|
author?: string;
|
|
66
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Enable oxlint's React plugin (off by default).
|
|
106
|
+
*/
|
|
67
107
|
react?: boolean;
|
|
68
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* Enforce file headers via the bundled JS plugin (on by default).
|
|
110
|
+
*/
|
|
69
111
|
headers?: boolean;
|
|
70
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* Require a blank line before `return`/block-like statements (on by default).
|
|
114
|
+
*/
|
|
71
115
|
padding?: boolean;
|
|
72
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* Blank line on each side of a `console.*` call, with runs of them grouped (on by default).
|
|
118
|
+
*/
|
|
119
|
+
consolePadding?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Blank line on each side of a statement that spans lines (on by default).
|
|
122
|
+
*/
|
|
123
|
+
multilineStatementPadding?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Require braces around single-statement work bodies (bare `return` exempt; on by default).
|
|
126
|
+
*/
|
|
73
127
|
braces?: boolean;
|
|
74
128
|
/**
|
|
75
129
|
* Forbid direct `process.env` / `process.argv` access (off by default). Turn on once the project funnels those reads
|
|
@@ -91,20 +145,62 @@ export interface OxlintConfigOptions {
|
|
|
91
145
|
constantDocs?: boolean | {
|
|
92
146
|
scope?: "exported" | "screaming" | "exported-or-screaming";
|
|
93
147
|
};
|
|
94
|
-
/**
|
|
148
|
+
/**
|
|
149
|
+
* Flag an acronym title-cased inside an identifier — `parseJson` where the house form is `parseJSON` (off by
|
|
150
|
+
* default). `acronyms` replaces the shipped list, `extraAcronyms` layers a project's own vocabulary on top of it,
|
|
151
|
+
* `ignoreNames` exempts identifiers whose casing is not ours to choose, and `scope` widens the rule past exported
|
|
152
|
+
* declarations.
|
|
153
|
+
*/
|
|
154
|
+
acronymCasing?: boolean | {
|
|
155
|
+
acronyms?: string[];
|
|
156
|
+
extraAcronyms?: string[];
|
|
157
|
+
ignoreNames?: string[];
|
|
158
|
+
scope?: "exported" | "all";
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Rewrite explicit length comparisons to truthiness in boolean positions (on by default).
|
|
162
|
+
*/
|
|
95
163
|
lengthTruthiness?: boolean;
|
|
96
|
-
/**
|
|
164
|
+
/**
|
|
165
|
+
* Require JSDoc blocks to span multiple lines (on by default). Off for untyped files.
|
|
166
|
+
*/
|
|
167
|
+
multilineJSDoc?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Enforce the section-marker ladder — `----` banners become `// MARK:`, long labels are flagged, and a file with many
|
|
170
|
+
* markers is nudged toward regions and then toward being several files (on by default).
|
|
171
|
+
*/
|
|
172
|
+
sectionMarkers?: boolean | {
|
|
173
|
+
maxBodyLength?: number;
|
|
174
|
+
maxRegions?: number;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Override individual legibility ceilings. Unspecified keys keep their calibrated default.
|
|
178
|
+
*/
|
|
97
179
|
limits?: Partial<OxlintConfigLimits>;
|
|
98
|
-
/**
|
|
180
|
+
/**
|
|
181
|
+
* Replace the globs treated as test files.
|
|
182
|
+
*/
|
|
99
183
|
testFilePatterns?: string[];
|
|
100
|
-
/**
|
|
184
|
+
/**
|
|
185
|
+
* Replace the globs treated as generated files, where only the size ceilings are switched off.
|
|
186
|
+
*/
|
|
101
187
|
generatedFilePatterns?: string[];
|
|
102
|
-
/**
|
|
188
|
+
/**
|
|
189
|
+
* Replace the globs treated as untyped, where the multi-line JSDoc requirement switches off.
|
|
190
|
+
*/
|
|
191
|
+
untypedFilePatterns?: string[];
|
|
192
|
+
/**
|
|
193
|
+
* Override the default ignore patterns.
|
|
194
|
+
*/
|
|
103
195
|
ignorePatterns?: string[];
|
|
104
|
-
/**
|
|
196
|
+
/**
|
|
197
|
+
* Extra config deep-merged last; an escape hatch for per-repo tweaks.
|
|
198
|
+
*/
|
|
105
199
|
overrides?: OxlintConfig;
|
|
106
200
|
}
|
|
107
|
-
/**
|
|
201
|
+
/**
|
|
202
|
+
* Default ignore patterns for generated/build output and vendored tooling.
|
|
203
|
+
*/
|
|
108
204
|
export declare const DefaultIgnorePatterns: string[];
|
|
109
205
|
/**
|
|
110
206
|
* Builds the complete oxlint configuration for a Sister Software package.
|
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,cAAc,mBAAmB,CAAA;AAEjC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,cAAc,mBAAmB,CAAA;AAEjC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAElD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAA;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;CAClB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa,EAAE,kBAS3B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,UAWnC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,UAA0E,CAAA;AAEnH;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,UAAkD,CAAA;AAEzF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,O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AE,MAAM,EAAE,CAAA;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,CAAA;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,UAUjC,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,mBAAwB,GAAG,YAAY,CAsYlF;AAED,eAAe,kBAAkB,CAAA"}
|
package/out/index.js
CHANGED
|
@@ -34,7 +34,9 @@ export const DefaultLimits = {
|
|
|
34
34
|
maxNestedCalls: 4,
|
|
35
35
|
complexity: 85,
|
|
36
36
|
};
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Globs treated as test files, where the size and named-constant rules are switched off.
|
|
39
|
+
*/
|
|
38
40
|
export const DefaultTestFilePatterns = [
|
|
39
41
|
"**/*.test.ts",
|
|
40
42
|
"**/*.test.tsx",
|
|
@@ -53,7 +55,15 @@ export const DefaultTestFilePatterns = [
|
|
|
53
55
|
* applies, because generated code ships.
|
|
54
56
|
*/
|
|
55
57
|
export const DefaultGeneratedFilePatterns = ["**/*.gen.ts", "**/*.gen.tsx", "**/*.generated.ts", "**/generated/**"];
|
|
56
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Globs for files JavaScript checks at runtime rather than TypeScript checking ahead of it. A JSDoc block there often
|
|
60
|
+
* IS the type annotation, and a one-line `@type` cast is the idiomatic form — so the multi-line requirement, which
|
|
61
|
+
* exists to make prose read as documentation, does not apply.
|
|
62
|
+
*/
|
|
63
|
+
export const DefaultUntypedFilePatterns = ["**/*.js", "**/*.mjs", "**/*.cjs", "**/*.jsx"];
|
|
64
|
+
/**
|
|
65
|
+
* Default ignore patterns for generated/build output and vendored tooling.
|
|
66
|
+
*/
|
|
57
67
|
export const DefaultIgnorePatterns = [
|
|
58
68
|
"**/out",
|
|
59
69
|
"**/dist",
|
|
@@ -80,7 +90,7 @@ export const DefaultIgnorePatterns = [
|
|
|
80
90
|
* @returns A complete oxlint config object (no `extends` required).
|
|
81
91
|
*/
|
|
82
92
|
export function createOxlintConfig(options = {}) {
|
|
83
|
-
const { packageNamespace = "@sister.software", copyrightHolder = "Sister Software", spdxLicenseIdentifier = "UNLICENSED", author = "Teffen Ellis, et al.", react = false, headers = true, padding = true, braces = true, restrictProcessGlobals = false, unnamedThresholds = false, constantDocs = false, lengthTruthiness = true, limits: limitOverrides = {}, testFilePatterns = DefaultTestFilePatterns, generatedFilePatterns = DefaultGeneratedFilePatterns, ignorePatterns = DefaultIgnorePatterns, overrides = {}, } = options;
|
|
93
|
+
const { packageNamespace = "@sister.software", copyrightHolder = "Sister Software", spdxLicenseIdentifier = "UNLICENSED", author = "Teffen Ellis, et al.", react = false, headers = true, padding = true, consolePadding = true, multilineStatementPadding = true, braces = true, restrictProcessGlobals = false, unnamedThresholds = false, constantDocs = false, acronymCasing = false, lengthTruthiness = true, multilineJSDoc = true, sectionMarkers = true, limits: limitOverrides = {}, testFilePatterns = DefaultTestFilePatterns, generatedFilePatterns = DefaultGeneratedFilePatterns, untypedFilePatterns = DefaultUntypedFilePatterns, ignorePatterns = DefaultIgnorePatterns, overrides = {}, } = options;
|
|
84
94
|
const limits = { ...DefaultLimits, ...limitOverrides };
|
|
85
95
|
const plugins = ["typescript", "unicorn", "oxc", "import", "promise", "vitest", ...(react ? ["react"] : [])];
|
|
86
96
|
const rules = {
|
|
@@ -320,9 +330,39 @@ export function createOxlintConfig(options = {}) {
|
|
|
320
330
|
// Error severity: an undocumented public constant or tuning knob is a legibility defect.
|
|
321
331
|
rules["sister-software/require-constant-doc"] = ["error", typeof constantDocs === "object" ? constantDocs : {}];
|
|
322
332
|
}
|
|
333
|
+
if (acronymCasing) {
|
|
334
|
+
// Error severity: on exported surface a title-cased acronym costs a consumer a breaking rename
|
|
335
|
+
// later, and the convention it drifts from is one a reviewer cannot enforce by reading.
|
|
336
|
+
rules["sister-software/no-title-case-acronym"] = ["error", typeof acronymCasing === "object" ? acronymCasing : {}];
|
|
337
|
+
}
|
|
323
338
|
if (lengthTruthiness) {
|
|
324
339
|
rules["sister-software/prefer-length-truthiness"] = "error";
|
|
325
340
|
}
|
|
341
|
+
if (consolePadding) {
|
|
342
|
+
rules["sister-software/console-padding"] = "warn";
|
|
343
|
+
}
|
|
344
|
+
if (multilineStatementPadding) {
|
|
345
|
+
rules["sister-software/multiline-statement-padding"] = "warn";
|
|
346
|
+
}
|
|
347
|
+
if (multilineJSDoc) {
|
|
348
|
+
rules["sister-software/multiline-jsdoc"] = "error";
|
|
349
|
+
}
|
|
350
|
+
if (sectionMarkers) {
|
|
351
|
+
const markerOptions = typeof sectionMarkers === "object" ? sectionMarkers : {};
|
|
352
|
+
// The two mechanical rungs are errors: a banner has exactly one correct rewrite, and a label
|
|
353
|
+
// length is measurable. The two judgment rungs warn — where a section ends, and whether it
|
|
354
|
+
// should become its own file, are not decisions a linter gets to make.
|
|
355
|
+
rules["sister-software/prefer-mark-comment"] = "error";
|
|
356
|
+
rules["sister-software/concise-section-marker"] = [
|
|
357
|
+
"error",
|
|
358
|
+
markerOptions.maxBodyLength === undefined ? {} : { maxBodyLength: markerOptions.maxBodyLength },
|
|
359
|
+
];
|
|
360
|
+
rules["sister-software/prefer-region-over-marks"] = "warn";
|
|
361
|
+
rules["sister-software/max-regions"] = [
|
|
362
|
+
"warn",
|
|
363
|
+
markerOptions.maxRegions === undefined ? {} : { max: markerOptions.maxRegions },
|
|
364
|
+
];
|
|
365
|
+
}
|
|
326
366
|
// Rules switched off inside test files. Table-driven test bodies are legitimately long, and
|
|
327
367
|
// expected values are legitimately unnamed numbers. oxlint validates override entries against the
|
|
328
368
|
// registered rule set, so an entry may only name a rule this config actually turned on.
|
|
@@ -343,7 +383,15 @@ export function createOxlintConfig(options = {}) {
|
|
|
343
383
|
if (constantDocs) {
|
|
344
384
|
testFileRules["sister-software/require-constant-doc"] = "off";
|
|
345
385
|
}
|
|
346
|
-
|
|
386
|
+
if (sectionMarkers) {
|
|
387
|
+
// A test file's sections track the suite's shape, which the code under test dictates — a big
|
|
388
|
+
// table of cases legitimately wants many markers, and splitting it would scatter the suite.
|
|
389
|
+
testFileRules["sister-software/prefer-region-over-marks"] = "off";
|
|
390
|
+
testFileRules["sister-software/max-regions"] = "off";
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Generated files: size ceilings only. Everything else still applies — generated code ships.
|
|
394
|
+
*/
|
|
347
395
|
const generatedFileRules = {
|
|
348
396
|
"max-lines": "off",
|
|
349
397
|
"max-lines-per-function": "off",
|
|
@@ -352,7 +400,16 @@ export function createOxlintConfig(options = {}) {
|
|
|
352
400
|
};
|
|
353
401
|
return {
|
|
354
402
|
plugins,
|
|
355
|
-
...(headers ||
|
|
403
|
+
...(headers ||
|
|
404
|
+
padding ||
|
|
405
|
+
braces ||
|
|
406
|
+
restrictProcessGlobals ||
|
|
407
|
+
unnamedThresholds ||
|
|
408
|
+
constantDocs ||
|
|
409
|
+
acronymCasing ||
|
|
410
|
+
lengthTruthiness ||
|
|
411
|
+
multilineJSDoc ||
|
|
412
|
+
sectionMarkers
|
|
356
413
|
? { jsPlugins: ["@sister.software/oxlint-config/plugin"] }
|
|
357
414
|
: {}),
|
|
358
415
|
categories: { correctness: "error" },
|
|
@@ -362,6 +419,7 @@ export function createOxlintConfig(options = {}) {
|
|
|
362
419
|
...createRuntimeOverrides(packageNamespace),
|
|
363
420
|
{ files: testFilePatterns, rules: testFileRules },
|
|
364
421
|
{ files: generatedFilePatterns, rules: generatedFileRules },
|
|
422
|
+
...(multilineJSDoc ? [{ files: untypedFilePatterns, rules: { "sister-software/multiline-jsdoc": "off" } }] : []),
|
|
365
423
|
],
|
|
366
424
|
...overrides,
|
|
367
425
|
};
|
package/out/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OA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AAE;YAC3D,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,EAAE,iCAAiC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAChH;QACD,GAAG,SAAS;KACZ,CAAA;AACF,CAAC;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
* @file The `sister-software/multiline-jsdoc` rule: a JSDoc block always spans multiple lines, even
|
|
6
|
+
* when its content would fit on one. A one-line block reads as an aside; the multi-line form reads
|
|
7
|
+
* as documentation, and it leaves somewhere to put the second sentence when one is needed.
|
|
8
|
+
*
|
|
9
|
+
* Two shapes are left alone. A JSDoc that shares its line with code is a type cast or an inline
|
|
10
|
+
* annotation, and expanding those changes what the line means. A JSDoc on a union or intersection
|
|
11
|
+
* member labels one alternative in what reads as a list — three lines per entry turns a list you
|
|
12
|
+
* can scan into a page you have to read.
|
|
13
|
+
*/
|
|
14
|
+
import type { Rule } from "./plugin-types.js";
|
|
15
|
+
export declare const multilineJSDocRule: Rule;
|
|
16
|
+
//# sourceMappingURL=jsdoc-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsdoc-plugin.d.ts","sourceRoot":"","sources":["../src/jsdoc-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAa7C,eAAO,MAAM,kBAAkB,EAAE,IA+ChC,CAAA"}
|