@komaci/static-analyzer 244.2.4 → 244.2.6

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.
Files changed (2) hide show
  1. package/build/rules.js +51 -59
  2. package/package.json +5 -5
package/build/rules.js CHANGED
@@ -67,225 +67,217 @@ exports.diagnosticMessages = {
67
67
  NO_UNRESOLVED_PARENT_CLASS_REFERENCE: {
68
68
  code: `${MESSAGE_CODE_PREFIX}1001`,
69
69
  severity: SEVERITY.ERROR,
70
- message: 'This class refers to an unresolved parent class',
70
+ message: 'This class references a parent class that can’t be resolved.',
71
71
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
72
72
  },
73
73
  NO_MULTIPLE_TEMPLATE_FILES: {
74
74
  code: `${MESSAGE_CODE_PREFIX}1002`,
75
75
  severity: SEVERITY.WARNING,
76
- message: 'This analyzer does not support LWCs which render multiple template files',
76
+ message: 'This analyzer doesn’t support components that render more than one template file.',
77
77
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
78
78
  },
79
79
  NO_PRIVATE_WIRE_CONFIG_PROPERTY: {
80
80
  code: `${MESSAGE_CODE_PREFIX}1003`,
81
81
  severity: SEVERITY.ERROR,
82
- message: "This wire configuration uses a property '{0}' that is private",
83
- source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
84
- },
85
- NO_UNDEFINED_WIRE_CONFIG_PROPERTY: {
86
- code: `${MESSAGE_CODE_PREFIX}1004`,
87
- severity: SEVERITY.WARNING,
88
- message: "This wire configuration uses a property '{0}' which is undefined",
82
+ message: "This wire configuration uses a property '{0}' that is private.",
89
83
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
90
84
  },
91
85
  NO_WIRE_CONFIGURATION_PROPERTY_USING_OUTPUT_OF_NON_PRIMEABLE_WIRE: {
92
86
  code: `${MESSAGE_CODE_PREFIX}1006`,
93
87
  severity: SEVERITY.ERROR,
94
- message: "The wire configuration uses a property '{0}' that is the output of a non-primeable wire, making this wire non-primeable",
88
+ message: "This wire configuration uses a property '{0}' that’s the output of a wire that can’t be primed for offline use or caching.",
95
89
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
96
90
  },
97
91
  NO_WIRE_ADAPTER_OF_RESOURCE_CANNOT_BE_PRIMED: {
98
92
  code: `${MESSAGE_CODE_PREFIX}1007`,
99
93
  severity: SEVERITY.ERROR,
100
- message: "The wire adapter '{0}' of resource '{1}' cannot be primed",
94
+ message: "The wire adapter '{0}' of resource '{1}' can’t be primed.",
101
95
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
102
96
  },
103
97
  NO_MISSING_RESOURCE_CANNOT_PRIME_WIRE_ADAPTER: {
104
98
  code: `${MESSAGE_CODE_PREFIX}1008`,
105
99
  severity: SEVERITY.ERROR,
106
- message: 'The wire adapter cannot be primed because it refers to a missing resource',
100
+ message: 'This wire adapter can’t be primed because it refers to a missing resource.',
107
101
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
108
102
  },
109
103
  NO_WIRE_CONFIG_PROPERTY_USES_GETTER_FUNCTION_RETURNING_NON_LITERAL: {
110
104
  code: `${MESSAGE_CODE_PREFIX}1009`,
111
105
  severity: SEVERITY.ERROR,
112
- message: "This wire configuration uses a property from a getter function named '{0}' that returns a non-literal",
106
+ message: "This wire configuration uses a property from a getter function named '{0}' that returns a non-literal value, which isn’t supported for static analysis.",
113
107
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
114
108
  },
115
109
  NO_WIRE_CONFIG_PROPERTY_USES_GETTER_FUNCTION_RETURNING_INACCESSIBLE_IMPORT: {
116
110
  code: `${MESSAGE_CODE_PREFIX}1010`,
117
111
  severity: SEVERITY.ERROR,
118
- message: "This wire configuration uses a property from a getter function named '{0}' that returns an inaccessible import",
112
+ message: "This wire configuration uses a property from a getter function named '{0}' that returns an inaccessible import.",
119
113
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
120
114
  },
121
115
  NO_CLASS_REFERS_TO_PARENT_CLASS_FROM_UNSUPPORTED_NAMESPACE: {
122
116
  code: `${MESSAGE_CODE_PREFIX}1011`,
123
117
  severity: SEVERITY.ERROR,
124
- message: 'This class refers to a parent class from an unsupported namespace',
118
+ message: 'This class refers to a parent class from an unsupported namespace.',
125
119
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
126
120
  },
127
121
  NO_WIRE_CONFIG_PROPERTY_USES_IMPORTED_ARTIFACT_FROM_UNSUPPORTED_NAMESPACE: {
128
122
  code: `${MESSAGE_CODE_PREFIX}1012`,
129
123
  severity: SEVERITY.ERROR,
130
- message: "This wire configuration uses an imported artifact '{0}' from unsupported namespace '{1}'",
124
+ message: "This wire configuration uses an imported artifact '{0}' from an unsupported namespace '{1}'.",
131
125
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
132
126
  },
133
127
  NO_WIRE_CONFIG_REFERENCES_NON_LOCAL_PROPERTY_REACTIVE_VALUE: {
134
128
  code: `${MESSAGE_CODE_PREFIX}1013`,
135
129
  severity: SEVERITY.WARNING,
136
- message: "This wire configuration references a reactive value '{0}' that is not a local property",
130
+ message: "This wire configuration references a reactive value '{0}' that’s not a local property.",
137
131
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
138
132
  },
139
133
  NO_COMPOSITION_ON_UNANALYZABLE_PROPERTY_FROM_UNRESOLVABLE_WIRE: {
140
134
  code: `${MESSAGE_CODE_PREFIX}1014`,
141
135
  severity: SEVERITY.ERROR,
142
- message: "This {0} an unanalyzable property '{1}' that is wired by a unresolvable wire",
136
+ message: "This {0} an unanalyzable property '{1}' that is wired by an unresolvable wire.",
143
137
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
144
138
  },
145
139
  NO_COMPOSITION_ON_UNANALYZABLE_PROPERTY_NON_PUBLIC: {
146
140
  code: `${MESSAGE_CODE_PREFIX}1015`,
147
141
  severity: SEVERITY.ERROR,
148
- message: "This {0} an unanalyzable property '{1}' that is not a public property",
142
+ message: "This {0} an unanalyzable property '{1}' that’s not a public property.",
149
143
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
150
144
  },
151
145
  NO_COMPOSITION_ON_UNANALYZABLE_GETTER_PROPERTY: {
152
146
  code: `${MESSAGE_CODE_PREFIX}1016`,
153
147
  severity: SEVERITY.ERROR,
154
- message: "This {0} an unanalyzable getter property '{1}'",
148
+ message: "This {0} an unanalyzable getter property '{1}'.",
155
149
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
156
150
  },
157
151
  NO_COMPOSITION_ON_UNANALYZABLE_PROPERTY_MISSING: {
158
152
  code: `${MESSAGE_CODE_PREFIX}1017`,
159
153
  severity: SEVERITY.ERROR,
160
- message: "This {0} a property '{1}' which does not exist in the corresponding script file",
154
+ message: "This {0} a property '{1}' that doesn’t exist in the corresponding JavaScript file.",
161
155
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
162
156
  },
163
157
  NO_WIRE_CONFIG_PROPERTY_CIRCULAR_WIRE_DEPENDENCY: {
164
158
  code: `${MESSAGE_CODE_PREFIX}1018`,
165
159
  severity: SEVERITY.ERROR,
166
- message: "The wire configuration input property '{0}' of this wire is part of a chain of circular wire " +
167
- 'dependencies, and will result an infinite loop during runtime. Please refactor ' +
168
- "code to remove the circular dependency. Dependency chain: '{1}'",
160
+ message: "This input property is part of circular wire dependencies in this chain: '{1}'.",
169
161
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
170
162
  },
171
163
  NO_ASSIGNMENT_EXPRESSION_ASSIGNS_VALUE_TO_MEMBER_VARIABLE: {
172
164
  code: `${MESSAGE_CODE_PREFIX}1022`,
173
165
  severity: SEVERITY.ERROR,
174
- message: "Assignment expression cannot assign a value to member variable '{0}'",
166
+ message: "This assignment expression can’t assign a value to the member variable '{0}'.",
175
167
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
176
168
  },
177
169
  NO_ASSIGNMENT_EXPRESSION_FOR_EXTERNAL_COMPONENTS: {
178
170
  code: `${MESSAGE_CODE_PREFIX}1023`,
179
171
  severity: SEVERITY.ERROR,
180
- message: 'Assignment Expressions are not supported for external components',
172
+ message: 'The assignment expression doesn’t support this component because the component is external to the Salesforce namespace.',
181
173
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
182
174
  },
183
175
  NO_TAGGED_TEMPLATE_EXPRESSION_CONTAINS_UNSUPPORTED_NAMESPACE: {
184
176
  code: `${MESSAGE_CODE_PREFIX}1024`,
185
177
  severity: SEVERITY.ERROR,
186
- message: "Tagged Template Expression contains a reference to an unsupported namespace '{0}'",
178
+ message: "This tagged template expression references an unsupported namespace '{0}'.",
187
179
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
188
180
  },
189
181
  NO_GETTER_CONTAINS_MORE_THAN_RETURN_STATEMENT: {
190
182
  code: `${MESSAGE_CODE_PREFIX}1025`,
191
183
  severity: SEVERITY.ERROR,
192
- message: 'Supported getters can only contain a return statement',
193
- source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
194
- },
195
- NO_RENDER_FUNCTION_CONTAINS_MORE_THAN_RETURN_STATEMENT: {
196
- code: `${MESSAGE_CODE_PREFIX}1039`,
197
- severity: SEVERITY.ERROR,
198
- message: 'Supported render functions in custom components can only contain a return statement',
199
- source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
200
- },
201
- NO_RENDER_FUNCTION_RETURN_STATEMENT: {
202
- code: `${MESSAGE_CODE_PREFIX}1040`,
203
- severity: SEVERITY.ERROR,
204
- message: 'Supported render functions need to contain a return statement',
205
- source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
206
- },
207
- NO_RENDER_FUNCTION_RETURN_STATEMENT_NOT_RETURNING_IMPORTED_TEMPLATE: {
208
- code: `${MESSAGE_CODE_PREFIX}1041`,
209
- severity: SEVERITY.ERROR,
210
- message: 'Supported render functions can only return supported imported templates',
184
+ message: 'Getters can only contain a return statement.',
211
185
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
212
186
  },
213
187
  NO_EXPRESSION_CONTAINS_MODULE_LEVEL_VARIABLE_REF: {
214
188
  code: `${MESSAGE_CODE_PREFIX}1026`,
215
189
  severity: SEVERITY.ERROR,
216
- message: "Expression contains a reference to a variable at the module level: '{0}'",
190
+ message: "This getter references a variable defined at the module level: '{0}'.",
217
191
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
218
192
  },
219
193
  NO_CALL_EXPRESSION_REFERENCES_UNSUPPORTED_NAMESPACE: {
220
194
  code: `${MESSAGE_CODE_PREFIX}1027`,
221
195
  severity: SEVERITY.ERROR,
222
- message: "Call expression contains reference to an unsupported namespace '{0}'",
196
+ message: "This call expression references an unsupported namespace: '{0}'.",
223
197
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
224
198
  },
225
199
  NO_EVAL_USAGE: {
226
200
  code: `${MESSAGE_CODE_PREFIX}1028`,
227
201
  severity: SEVERITY.ERROR,
228
- message: "Call expression contains non-portable identifier '{0}'",
202
+ message: "This call expression contains a non-portable identifier: '{0}'.",
229
203
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
230
204
  },
231
205
  NO_REFERENCE_TO_CLASS_FUNCTIONS: {
232
206
  code: `${MESSAGE_CODE_PREFIX}1029`,
233
207
  severity: SEVERITY.ERROR,
234
- message: "Call expression contains reference to function defined on the class '{0}'",
208
+ message: "This call expression references a function defined in the class '{0}'. Functions defined in a class are not supported.",
235
209
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
236
210
  },
237
211
  NO_REFERENCE_TO_MODULE_FUNCTIONS: {
238
212
  code: `${MESSAGE_CODE_PREFIX}1030`,
239
213
  severity: SEVERITY.ERROR,
240
- message: "Call expression contains reference to function defined on the module '{0}'",
214
+ message: "This call expression references a function defined in the module '{0}'. Functions defined in a module are not supported.",
241
215
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
242
216
  },
243
217
  NO_FUNCTIONS_DECLARED_WITHIN_GETTER_METHOD: {
244
218
  code: `${MESSAGE_CODE_PREFIX}1031`,
245
219
  severity: SEVERITY.ERROR,
246
- message: 'Functions may not be declared within a getter method',
220
+ message: 'This function is defined within a getter or template expression. Functions defined within getters or template expressions are not supported.',
247
221
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
248
222
  },
249
223
  NO_UNSUPPORTED_MEMBER_VARIABLE_IN_MEMBER_EXPRESSION: {
250
224
  code: `${MESSAGE_CODE_PREFIX}1032`,
251
225
  severity: SEVERITY.ERROR,
252
- message: "Member expression contains reference to unsupported member variable '{0}'",
226
+ message: "This member expression references an unsupported member variable '{0}'.",
253
227
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
254
228
  },
255
229
  NO_MEMBER_EXPRESSION_REFERENCE_TO_NON_EXISTENT_MEMBER_VARIABLE: {
256
230
  code: `${MESSAGE_CODE_PREFIX}1033`,
257
231
  severity: SEVERITY.ERROR,
258
- message: "Member expression contains reference to non-existent member variable '{0}'",
232
+ message: "This member expression references a member variable that doesn’t exist: '{0}'.",
259
233
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
260
234
  },
261
235
  NO_MEMBER_EXPRESSION_REFERENCE_TO_UNSUPPORTED_NAMESPACE_REFERENCE: {
262
236
  code: `${MESSAGE_CODE_PREFIX}1034`,
263
237
  severity: SEVERITY.ERROR,
264
- message: "Member expression contains reference to unsupported namespace reference: '{0}'",
238
+ message: "This member expression references an unsupported namespace: '{0}'.",
265
239
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
266
240
  },
267
241
  NO_MEMBER_EXPRESSION_CONTAINS_NON_PORTABLE_IDENTIFIER: {
268
242
  code: `${MESSAGE_CODE_PREFIX}1035`,
269
243
  severity: SEVERITY.ERROR,
270
- message: "Member expression contains non-portable identifier '{0}'",
244
+ message: "This member expression contains a non-portable identifier: '{0}'.",
271
245
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
272
246
  },
273
247
  NO_MEMBER_EXPRESSION_REFERENCE_TO_SUPER_CLASS: {
274
248
  code: `${MESSAGE_CODE_PREFIX}1036`,
275
249
  severity: SEVERITY.ERROR,
276
- message: "Member expression contains reference to super class: '{0}'",
250
+ message: "This member expression references the superclass '{0}'.",
277
251
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
278
252
  },
279
253
  NO_MEMBER_EXPRESSION_REFERENCE_TO_UNSUPPORTED_GLOBAL: {
280
254
  code: `${MESSAGE_CODE_PREFIX}1037`,
281
255
  severity: SEVERITY.ERROR,
282
- message: "Member expression contains reference to unsupported global: '{0}'",
256
+ message: "This member expression contains a reference to the unsupported global variable '{0}'.",
283
257
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
284
258
  },
285
259
  NO_REFERENCE_TO_UNSUPPORTED_NAMESPACE_REFERENCE: {
286
260
  code: `${MESSAGE_CODE_PREFIX}1038`,
287
261
  severity: SEVERITY.ERROR,
288
- message: "Reference to import '{0}' from an unsupported namespace is not allowed",
262
+ message: "This reference to import '{0}' from an unsupported namespace isn’t allowed.",
263
+ source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
264
+ },
265
+ NO_RENDER_FUNCTION_CONTAINS_MORE_THAN_RETURN_STATEMENT: {
266
+ code: `${MESSAGE_CODE_PREFIX}1039`,
267
+ severity: SEVERITY.ERROR,
268
+ message: 'Supported render functions can only contain a return statement.',
269
+ source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
270
+ },
271
+ NO_RENDER_FUNCTION_RETURN_STATEMENT: {
272
+ code: `${MESSAGE_CODE_PREFIX}1040`,
273
+ severity: SEVERITY.ERROR,
274
+ message: 'Supported render functions must contain a return statement.',
275
+ source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
276
+ },
277
+ NO_RENDER_FUNCTION_RETURN_STATEMENT_NOT_RETURNING_IMPORTED_TEMPLATE: {
278
+ code: `${MESSAGE_CODE_PREFIX}1041`,
279
+ severity: SEVERITY.ERROR,
280
+ message: 'Supported render functions can return only supported imported templates.',
289
281
  source: SOURCE_PREFIX_OFFLINE_CODE_ANALYZER,
290
282
  },
291
283
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@komaci/static-analyzer",
3
- "version": "244.2.4",
3
+ "version": "244.2.6",
4
4
  "description": "Komaci Diagnostics API",
5
5
  "homepage": "https://komaci.dev/",
6
6
  "repository": {
@@ -29,13 +29,13 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "@babel/types": "^7.9.0",
32
- "@komaci/common-shared": "244.2.4"
32
+ "@komaci/common-shared": "244.2.6"
33
33
  },
34
34
  "devDependencies": {
35
- "@komaci/types": "244.2.4"
35
+ "@komaci/types": "244.2.6"
36
36
  },
37
37
  "peerDependencies": {
38
- "@lwc/metadata": "2.22.0-0",
39
- "@lwc/sfdc-compiler-utils": "2.22.0-0"
38
+ "@lwc/metadata": "2.40.0-0",
39
+ "@lwc/sfdc-compiler-utils": "2.40.0-0"
40
40
  }
41
41
  }