Skip to content

Commit 77ea77b

Browse files
committed
Bump Komaci version. Update unit tests. Remove no-undefined-wire-config-property.
1 parent e4120b9 commit 77ea77b

File tree

38 files changed

+54
-65
lines changed

38 files changed

+54
-65
lines changed

lib/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const noUnsupportedMemberVariableInMemberExpression = require('./rules/no-unsupp
2929
const noMultipleTemplateFiles = require('./rules/no-multiple-template-files');
3030
const noCompositionOnUnanalyzableGetterProperty = require('./rules/no-composition-on-unanalyzable-getter-property');
3131
const noCompositionOnUnanalyzablePropertyFromUnresolvableWire = require('./rules/no-composition-on-unanalyzable-property-from-unresolvable-wire');
32-
const noUndefinedWireConfigProperty = require('./rules/no-undefined-wire-config-property');
3332
const noCompositionOnUnanalyzablePropertyNonPublic = require('./rules/no-composition-on-unanalyzable-property-non-public');
3433
const noCompositionOnUnanalyzablePropertyMissing = require('./rules/no-composition-on-unanalyzable-property-missing');
3534
const noAssignmentExpressionForExternalComponents = require('./rules/no-assignment-expression-for-external-components');
@@ -105,7 +104,6 @@ module.exports = {
105104
noMemberExpressionReferenceToUnsupportedGlobal,
106105

107106
// TODO: These rules do not have tests because Komaci itself did not have tests for them.
108-
'no-undefined-wire-config-property': noUndefinedWireConfigProperty,
109107
'no-tagged-template-expression-contains-unsupported-namespace':
110108
noTaggedTemplateExpressionContainsUnsupportedNamespace,
111109
'no-render-function-contains-more-than-return-statement':

lib/rules/no-undefined-wire-config-property.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

lib/util/helper.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ function getKomaciReport(ruleFilename, fileName, sourceFile) {
9191
);
9292

9393
eslintReports = eslintReports.filter((diagnostic) => {
94+
if (!diagnosticMessage) {
95+
return false;
96+
}
97+
9498
return diagnostic.code.value === diagnosticMessage[1].code;
9599
});
96100

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@salesforce/eslint-plugin-lwc-graph-analyzer",
3-
"version": "0.5.0",
3+
"version": "0.6.0",
44
"description": "ESLint plugin to analyze data graph in a LWC component",
55
"contributors": [
66
{
@@ -58,7 +58,7 @@
5858
"chai": "^4.3.7"
5959
},
6060
"dependencies": {
61-
"@komaci/static-analyzer": "^242.3.2",
61+
"@komaci/static-analyzer": "^242.3.7",
6262
"@lwc/metadata": "2.22.0-0",
6363
"@lwc/sfdc-compiler-utils": "2.22.0-0",
6464
"@lwc/errors": "2.22.0",

test/lib/rules/artifacts-combined-files/invalidGetterFunction/no-unsupported-member-variable-in-member-expression.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('Bundle linting', function () {
1515
const messages = lintBundle(__filename, 'test.js');
1616
assert.equal(messages.length, 2);
1717
const expected =
18-
"Member expression contains reference to unsupported member variable 'blah'";
18+
"This member expression references an unsupported member variable 'blah'.";
1919
assert.equal(messages[0].message, expected);
2020
assert.equal(messages[1].message, expected);
2121
});

test/lib/rules/artifacts-combined-files/multipleTemplateFiles/no-composition-on-unanalyzable-property-non-public.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Bundle linting', function () {
1616
assert.equal(messages.length, 1);
1717
assert.equal(
1818
messages[0].message,
19-
"This child component references an unanalyzable property 'title' that is not a public property"
19+
"This child component references an unanalyzable property 'title' that’s not a public property."
2020
);
2121
});
2222
});

test/lib/rules/artifacts-combined-files/multipleTemplateFiles/no-multiple-template-files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Bundle linting', function () {
1616
assert.equal(messages.length, 1);
1717
assert.equal(
1818
messages[0].message,
19-
'This analyzer does not support LWCs which render multiple template files'
19+
'This analyzer doesn’t support components that render more than one template file.'
2020
);
2121
});
2222
});

test/lib/rules/artifacts-combined-files/unresolvedImageBinding/no-composition-on-unanalyzable-property-non-public.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Bundle linting', function () {
1616
assert.equal(messages.length, 1);
1717
assert.equal(
1818
messages[0].message,
19-
"This image's src attribute is bound to an unanalyzable property 'propUnresolvable' that is not a public property"
19+
"This image's src attribute is bound to an unanalyzable property 'propUnresolvable' that’s not a public property."
2020
);
2121
});
2222
});

test/lib/rules/artifacts-combined-files/unresolvedImageBindingEmptyClass/no-composition-on-unanalyzable-property-missing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Bundle linting', function () {
1616
assert.equal(messages.length, 1);
1717
assert.equal(
1818
messages[0].message,
19-
"This image's src attribute is bound to a property 'testSrc' which does not exist in the corresponding script file"
19+
"This image's src attribute is bound to a property 'testSrc' that doesn’t exist in the corresponding JavaScript file."
2020
);
2121
});
2222
});

test/lib/rules/artifacts-combined-files/unresolvedIterator/no-composition-on-unanalyzable-property-from-unresolvable-wire.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Bundle linting', function () {
1616
assert.equal(messages.length, 1);
1717
assert.equal(
1818
messages[0].message,
19-
"This iterator iterates upon an unanalyzable property 'contacts' that is wired by a unresolvable wire"
19+
"This iterator iterates upon an unanalyzable property 'contacts' that is wired by an unresolvable wire."
2020
);
2121
});
2222
});

0 commit comments

Comments
 (0)