Skip to content

Commit

Permalink
fix: update @typescript-eslint/experimental-utils to v5 (#941)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Oct 11, 2021
1 parent b2ed605 commit afad49a
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
]
},
"dependencies": {
"@typescript-eslint/experimental-utils": "^4.0.1"
"@typescript-eslint/experimental-utils": "^5.0.0"
},
"devDependencies": {
"@babel/cli": "^7.4.4",
Expand Down
7 changes: 3 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ type RuleModule = TSESLint.RuleModule<string, unknown[]> & {
meta: Required<Pick<TSESLint.RuleMetaData<string>, 'docs'>>;
};

// can be removed once we've on v5 of `@typescript-eslint/experimental-utils`
// v5 of `@typescript-eslint/experimental-utils` removed this
declare module '@typescript-eslint/experimental-utils/dist/ts-eslint/Rule' {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export interface RuleMetaData<TMessageIds extends string> {
hasSuggestions?: boolean;
export interface RuleMetaDataDocs {
category: 'Best Practices' | 'Possible Errors';
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/rules/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ const isTestCaseName = (node: TSESTree.LeftHandSideExpression) =>
TestCaseName.hasOwnProperty(node.name);

const isTestCaseProperty = (
node: TSESTree.Expression,
node: TSESTree.Expression | TSESTree.PrivateIdentifier,
): node is AccessorNode<TestCaseProperty> =>
isSupportedAccessor(node) &&
TestCaseProperty.hasOwnProperty(getAccessorValue(node));
Expand Down Expand Up @@ -737,7 +737,7 @@ const isDescribeAlias = (node: TSESTree.LeftHandSideExpression) =>
DescribeAlias.hasOwnProperty(node.name);

const isDescribeProperty = (
node: TSESTree.Expression,
node: TSESTree.Expression | TSESTree.PrivateIdentifier,
): node is AccessorNode<DescribeProperty> =>
isSupportedAccessor(node) &&
DescribeProperty.hasOwnProperty(getAccessorValue(node));
Expand Down
72 changes: 70 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2544,7 +2544,7 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/experimental-utils@npm:4.33.0, @typescript-eslint/experimental-utils@npm:^4.0.1, @typescript-eslint/experimental-utils@npm:^4.11.1":
"@typescript-eslint/experimental-utils@npm:4.33.0, @typescript-eslint/experimental-utils@npm:^4.11.1":
version: 4.33.0
resolution: "@typescript-eslint/experimental-utils@npm:4.33.0"
dependencies:
Expand All @@ -2560,6 +2560,22 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/experimental-utils@npm:^5.0.0":
version: 5.0.0
resolution: "@typescript-eslint/experimental-utils@npm:5.0.0"
dependencies:
"@types/json-schema": ^7.0.7
"@typescript-eslint/scope-manager": 5.0.0
"@typescript-eslint/types": 5.0.0
"@typescript-eslint/typescript-estree": 5.0.0
eslint-scope: ^5.1.1
eslint-utils: ^3.0.0
peerDependencies:
eslint: "*"
checksum: 0c545cf353b225460d37d9ff99b798db9ed83a5446457f54a79309938e5068799fd9a565c1f964d734e45a91b4bdd52db77ae5063e2d669ef5f7603f14fbb43c
languageName: node
linkType: hard

"@typescript-eslint/parser@npm:^4.0.1":
version: 4.33.0
resolution: "@typescript-eslint/parser@npm:4.33.0"
Expand Down Expand Up @@ -2587,13 +2603,30 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/scope-manager@npm:5.0.0":
version: 5.0.0
resolution: "@typescript-eslint/scope-manager@npm:5.0.0"
dependencies:
"@typescript-eslint/types": 5.0.0
"@typescript-eslint/visitor-keys": 5.0.0
checksum: 920fc3553830c738d2d709676d95e50f7b0fe945afad0457527753e94e3ac115b6c88f1974eecc9bcb6d9580373250fa36765484fee45b4513bd4f63eceaa6a3
languageName: node
linkType: hard

"@typescript-eslint/types@npm:4.33.0":
version: 4.33.0
resolution: "@typescript-eslint/types@npm:4.33.0"
checksum: 3baae1ca35872421b4eb60f5d3f3f32dc1d513f2ae0a67dee28c7d159fd7a43ed0d11a8a5a0f0c2d38507ffa036fc7c511cb0f18a5e8ac524b3ebde77390ec53
languageName: node
linkType: hard

"@typescript-eslint/types@npm:5.0.0":
version: 5.0.0
resolution: "@typescript-eslint/types@npm:5.0.0"
checksum: 424966c124cd02b8d8bebe3ae4fb264e23708018e6e63787a070ced1bb24c43c4e3b49adb895eaf9a8200bed5c97aa7a57a1605925b6fb56a091703648e29b40
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:4.33.0":
version: 4.33.0
resolution: "@typescript-eslint/typescript-estree@npm:4.33.0"
Expand All @@ -2612,6 +2645,24 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/typescript-estree@npm:5.0.0":
version: 5.0.0
resolution: "@typescript-eslint/typescript-estree@npm:5.0.0"
dependencies:
"@typescript-eslint/types": 5.0.0
"@typescript-eslint/visitor-keys": 5.0.0
debug: ^4.3.1
globby: ^11.0.3
is-glob: ^4.0.1
semver: ^7.3.5
tsutils: ^3.21.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 950e72b75706fa75dd795f3bbd29222a9da5c611f0acc023bf82f3254476fbdb3bfe0a07aa75105f2c2bfe566191f9125351cdf003be4a1fe6a5ee8bd1cd2dc7
languageName: node
linkType: hard

"@typescript-eslint/visitor-keys@npm:4.33.0":
version: 4.33.0
resolution: "@typescript-eslint/visitor-keys@npm:4.33.0"
Expand All @@ -2622,6 +2673,16 @@ __metadata:
languageName: node
linkType: hard

"@typescript-eslint/visitor-keys@npm:5.0.0":
version: 5.0.0
resolution: "@typescript-eslint/visitor-keys@npm:5.0.0"
dependencies:
"@typescript-eslint/types": 5.0.0
eslint-visitor-keys: ^3.0.0
checksum: 6a5a3cdd64d9b131c72aa52f44904b5bb0fbb28ca624342afdfafa9dd0038f2de9a02ed661595ddb2c8133ab0854b320fb0d1c9d9823c7c064663d506f8c1d4a
languageName: node
linkType: hard

"JSONStream@npm:^1.0.4":
version: 1.3.5
resolution: "JSONStream@npm:1.3.5"
Expand Down Expand Up @@ -4409,7 +4470,7 @@ __metadata:
"@types/node": ^14.0.0
"@types/prettier": ^2.0.0
"@typescript-eslint/eslint-plugin": ^4.0.1
"@typescript-eslint/experimental-utils": ^4.0.1
"@typescript-eslint/experimental-utils": ^5.0.0
"@typescript-eslint/parser": ^4.0.1
babel-jest: ^27.0.0
babel-plugin-replace-ts-export-assignment: ^0.0.2
Expand Down Expand Up @@ -4519,6 +4580,13 @@ __metadata:
languageName: node
linkType: hard

"eslint-visitor-keys@npm:^3.0.0":
version: 3.0.0
resolution: "eslint-visitor-keys@npm:3.0.0"
checksum: 352607f367a2e0e2f9f234e40d6d9b34c39399345b8a9f204e1343749ddfae505d8343909cba6c4abc2ca03add4cdc0530af5e98f870ad7183fc2a89458669e5
languageName: node
linkType: hard

"eslint@npm:^6.0.0 || ^7.0.0":
version: 7.32.0
resolution: "eslint@npm:7.32.0"
Expand Down

0 comments on commit afad49a

Please sign in to comment.