Skip to content

Commit 4f7ceb5

Browse files
committed
Merge branch 'main' into sandy081/extensionResourceHandler
2 parents 362a2ca + 1c2f442 commit 4f7ceb5

File tree

94 files changed

+1565
-806
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1565
-806
lines changed

.vscode/settings.json

-6
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,6 @@
8484
"editor.formatOnSave": true
8585
},
8686
"typescript.tsc.autoDetect": "off",
87-
"editor.inlayHints.enabled": true,
88-
"typescript.inlayHints.enumMemberValues.enabled": true,
89-
"typescript.inlayHints.functionLikeReturnTypes.enabled": true,
90-
"typescript.inlayHints.parameterTypes.enabled": true,
91-
"typescript.inlayHints.propertyDeclarationTypes.enabled": true,
92-
"typescript.inlayHints.variableTypes.enabled": true,
9387
"testing.autoRun.mode": "rerun",
9488
"conventionalCommits.scopes": [
9589
"tree",

build/lib/eslint/code-no-unused-expressions.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,16 @@ module.exports = {
108108
if (allowTaggedTemplates && node.type === 'TaggedTemplateExpression') {
109109
return true;
110110
}
111-
return /^(?:Assignment|OptionalCall|Call|New|Update|Yield|Await)Expression$/u.test(node.type) ||
111+
if (node.type === 'ExpressionStatement') {
112+
return isValidExpression(node.expression);
113+
}
114+
return /^(?:Assignment|OptionalCall|Call|New|Update|Yield|Await|Chain)Expression$/u.test(node.type) ||
112115
(node.type === 'UnaryExpression' && ['delete', 'void'].indexOf(node.operator) >= 0);
113116
}
114117
return {
115118
ExpressionStatement(node) {
116119
if (!isValidExpression(node.expression) && !isDirective(node, context.getAncestors())) {
117-
context.report({ node: node, message: 'Expected an assignment or function call and instead saw an expression.' });
120+
context.report({ node: node, message: `Expected an assignment or function call and instead saw an expression. ${node.expression}` });
118121
}
119122
}
120123
};

build/lib/eslint/code-no-unused-expressions.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,18 @@ module.exports = {
133133
return true;
134134
}
135135

136-
return /^(?:Assignment|OptionalCall|Call|New|Update|Yield|Await)Expression$/u.test(node.type) ||
136+
if (node.type === 'ExpressionStatement') {
137+
return isValidExpression(node.expression);
138+
}
139+
140+
return /^(?:Assignment|OptionalCall|Call|New|Update|Yield|Await|Chain)Expression$/u.test(node.type) ||
137141
(node.type === 'UnaryExpression' && ['delete', 'void'].indexOf(node.operator) >= 0);
138142
}
139143

140144
return {
141145
ExpressionStatement(node: TSESTree.ExpressionStatement) {
142146
if (!isValidExpression(node.expression) && !isDirective(node, <TSESTree.Node[]>context.getAncestors())) {
143-
context.report({ node: <ESTree.Node>node, message: 'Expected an assignment or function call and instead saw an expression.' });
147+
context.report({ node: <ESTree.Node>node, message: `Expected an assignment or function call and instead saw an expression. ${node.expression}` });
144148
}
145149
}
146150
};

build/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@types/webpack": "^4.41.25",
4343
"@types/xml2js": "0.0.33",
4444
"@typescript-eslint/experimental-utils": "~2.13.0",
45-
"@typescript-eslint/parser": "^3.3.0",
45+
"@typescript-eslint/parser": "^5.10.0",
4646
"@vscode/iconv-lite-umd": "0.7.0",
4747
"applicationinsights": "1.4.2",
4848
"byline": "^5.0.0",

0 commit comments

Comments
 (0)