Skip to content

Commit 0983951

Browse files
authored
Merge pull request #16 from sfdctaka/bumpKomaciVersion242.3.7
Bump Komaci version. Update unit tests. Remove no-undefined-wire-config-property.
2 parents e4120b9 + 8c61e74 commit 0983951

File tree

39 files changed

+57
-71
lines changed

39 files changed

+57
-71
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Comment line immediately above ownership line is reserved for related other information. Please be careful while editing.
22
#ECCN:Open Source
3-
* @khawkins @dbreese @pvandyk @sfdctaka @maliroteh-sf
3+
* @khawkins @dbreese @AndrewHuffman @sfdctaka @maliroteh-sf

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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ function getKomaciReport(ruleFilename, fileName, sourceFile) {
9090
}
9191
);
9292

93+
if (!diagnosticMessage) {
94+
// No matching diagnostic message was found. Return an empty array to indicate that
95+
// there is no lint warning/error to report back to the caller.
96+
return [];
97+
}
98+
9399
eslintReports = eslintReports.filter((diagnostic) => {
94100
return diagnostic.code.value === diagnosticMessage[1].code;
95101
});

package.json

Lines changed: 2 additions & 6 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
{
@@ -19,10 +19,6 @@
1919
"name": "Takashi Arai",
2020
"url": "https://github.com/sfdctaka"
2121
},
22-
{
23-
"name": "Peter Van Dyk",
24-
"url": "https://github.com/pvandyk"
25-
},
2622
{
2723
"name": "Dustin Breese",
2824
"url": "https://github.com/dbreese"
@@ -58,7 +54,7 @@
5854
"chai": "^4.3.7"
5955
},
6056
"dependencies": {
61-
"@komaci/static-analyzer": "^242.3.2",
57+
"@komaci/static-analyzer": "^242.3.7",
6258
"@lwc/metadata": "2.22.0-0",
6359
"@lwc/sfdc-compiler-utils": "2.22.0-0",
6460
"@lwc/errors": "2.22.0",

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ describe('Bundle linting', function () {
1414
it('should return correct errors', function () {
1515
const messages = lintBundle(__filename, 'test.js');
1616
assert.equal(messages.length, 2);
17-
const expected =
18-
"Member expression contains reference to unsupported member variable 'blah'";
17+
const expected = "This member expression references an unsupported member variable 'blah'.";
1918
assert.equal(messages[0].message, expected);
2019
assert.equal(messages[1].message, expected);
2120
});

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
});

0 commit comments

Comments
 (0)