Skip to content

Commit 7c47be7

Browse files
authored
fix(44738): fix eslint rules (#44739)
1 parent 9ebe11c commit 7c47be7

File tree

4 files changed

+120
-81
lines changed

4 files changed

+120
-81
lines changed

package-lock.json

+114-75
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
"@types/source-map-support": "latest",
5454
"@types/through2": "latest",
5555
"@types/xml2js": "^0.4.0",
56-
"@typescript-eslint/eslint-plugin": "^4.19.0",
57-
"@typescript-eslint/experimental-utils": "^4.19.0",
58-
"@typescript-eslint/parser": "^4.19.0",
56+
"@typescript-eslint/eslint-plugin": "^4.28.0",
57+
"@typescript-eslint/experimental-utils": "^4.28.0",
58+
"@typescript-eslint/parser": "^4.28.0",
5959
"async": "latest",
6060
"azure-devops-node-api": "^10.1.0",
6161
"browser-resolve": "^1.11.2",

scripts/eslint/rules/boolean-trivia.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export = createRule({
2323
const sourceCodeText = sourceCode.getText();
2424

2525
const isSetOrAssert = (name: string): boolean => name.startsWith("set") || name.startsWith("assert");
26-
const isTrivia = (node: TSESTree.Expression): boolean => {
26+
const isTrivia = (node: TSESTree.CallExpressionArgument): boolean => {
2727
if (node.type === AST_NODE_TYPES.Identifier) {
2828
return node.name === "undefined";
2929
}
@@ -69,7 +69,7 @@ export = createRule({
6969
return false;
7070
};
7171

72-
const checkArg = (node: TSESTree.Expression): void => {
72+
const checkArg = (node: TSESTree.CallExpressionArgument): void => {
7373
if (!isTrivia(node)) {
7474
return;
7575
}

scripts/eslint/rules/no-double-space.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export = createRule({
3030
};
3131

3232
const isRegexLiteral = (node: TSESTree.Node | null): boolean => {
33-
return !!(node && node.type === AST_NODE_TYPES.Literal && node.regex);
33+
return !!(node && node.type === AST_NODE_TYPES.Literal && Object.prototype.hasOwnProperty.call(node, "regex"));
3434
};
3535

3636
const checkDoubleSpace = (node: TSESTree.Node) => {

0 commit comments

Comments
 (0)