@reticlehq/eslint-plugin 2.3.0 → 2.5.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.
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
* `H2`, `Welford M2` when part of a sentence) is matched only when it stands alone as a tag.
|
|
19
19
|
*/
|
|
20
20
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
21
|
-
export declare const INTERNAL_TAG_MESSAGE = "Internal reference '{{tag}}' does not belong in source. It means nothing to a reader without the design doc \u2014 describe the behaviour instead.";
|
|
22
21
|
export declare const noInternalTags: ESLintUtils.RuleModule<"internalTag", [], unknown, ESLintUtils.RuleListener> & {
|
|
23
22
|
name: string;
|
|
24
23
|
};
|
package/dist/no-internal-tags.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { AST_NODE_TYPES, ESLintUtils } from '@typescript-eslint/utils';
|
|
21
21
|
import { DOCS_URL_ROOT } from './constants.js';
|
|
22
22
|
const createRule = ESLintUtils.RuleCreator((name) => `${DOCS_URL_ROOT}#${name}`);
|
|
23
|
-
|
|
23
|
+
const INTERNAL_TAG_MESSAGE = "Internal reference '{{tag}}' does not belong in source. It means nothing to a reader without the design doc — describe the behaviour instead.";
|
|
24
24
|
/** `(W11)`, `B37`, `W10.3`, `N5:` — a short capital-prefixed code used as a label. */
|
|
25
25
|
const TRACKING_CODE = /(?<![A-Za-z0-9])[A-Z]{1,2}\d{1,2}(?:\.\d{1,2})?(?![A-Za-z0-9])/g;
|
|
26
26
|
/**
|
package/dist/options.js
CHANGED
|
@@ -19,7 +19,7 @@ function calleeName(node) {
|
|
|
19
19
|
return callee.name;
|
|
20
20
|
}
|
|
21
21
|
if (callee.type === AST_NODE_TYPES.MemberExpression &&
|
|
22
|
-
callee.computed
|
|
22
|
+
false === callee.computed &&
|
|
23
23
|
callee.property.type === AST_NODE_TYPES.Identifier) {
|
|
24
24
|
return callee.property.name;
|
|
25
25
|
}
|
|
@@ -48,7 +48,7 @@ export const requireSignalOnMutation = createRule({
|
|
|
48
48
|
const frame = stack.pop();
|
|
49
49
|
if (frame === undefined)
|
|
50
50
|
return;
|
|
51
|
-
if (frame.mutatorNode !== null && frame.calledSignal
|
|
51
|
+
if (frame.mutatorNode !== null && false === frame.calledSignal) {
|
|
52
52
|
context.report({
|
|
53
53
|
node: frame.mutatorNode,
|
|
54
54
|
messageId: MessageId.MUTATION_WITHOUT_SIGNAL,
|
|
@@ -67,9 +67,9 @@ export const requireSignalOnMutation = createRule({
|
|
|
67
67
|
if (frame === undefined)
|
|
68
68
|
return;
|
|
69
69
|
const name = calleeName(node);
|
|
70
|
-
if (
|
|
70
|
+
if (null === name)
|
|
71
71
|
return;
|
|
72
|
-
if (mutators.has(name) && frame.mutatorNode
|
|
72
|
+
if (mutators.has(name) && null === frame.mutatorNode) {
|
|
73
73
|
frame.mutatorNode = node;
|
|
74
74
|
}
|
|
75
75
|
if (signalCallees.has(name)) {
|
package/package.json
CHANGED