diff --git a/.github/ISSUE_TEMPLATE/typescript-eslint-scope-manager.md b/.github/ISSUE_TEMPLATE/typescript-eslint-scope-manager.md new file mode 100644 index 000000000000..1a2426ffe381 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/typescript-eslint-scope-manager.md @@ -0,0 +1,71 @@ +--- +name: '@typescript-eslint/scope-manager' +about: Report an issue with the '@typescript-eslint/scope-manager' package +title: '' +labels: 'package: scope-manager, triage' +assignees: '' +--- + + + + + +- [ ] I have tried restarting my IDE and the issue persists. +- [ ] I have updated to the latest version of the packages. +- [ ] I have [read the FAQ](https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md) and my problem is not listed. + +**Repro** + + + +```TS +// your repro code case +``` + +**Expected Result** + + + +**Actual Result** + + + +**Additional Info** + + + +**Versions** + +| package | version | +| --------------------------------------- | ------- | +| `@typescript-eslint/scope-manager` | `X.Y.Z` | +| `TypeScript` | `X.Y.Z` | +| `node` | `X.Y.Z` | diff --git a/CHANGELOG.md b/CHANGELOG.md index dc524c19a626..aeaacaa68bea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.14.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.1...v4.14.2) (2021-02-01) + + +### Bug Fixes + +* **eslint-plugin:** [consistent-type-imports] incorrect handling of computed property type signatures ([#2990](https://github.com/typescript-eslint/typescript-eslint/issues/2990)) ([58f2655](https://github.com/typescript-eslint/typescript-eslint/commit/58f26555f62b5f59f13260306638d3148cde6079)), closes [#2989](https://github.com/typescript-eslint/typescript-eslint/issues/2989) +* **scope-manager:** correctly reference generic parameters when decorator metadata is enabled ([#2975](https://github.com/typescript-eslint/typescript-eslint/issues/2975)) ([7695ef3](https://github.com/typescript-eslint/typescript-eslint/commit/7695ef318f1cc8688acaabf4f2730769622f083f)), closes [#2972](https://github.com/typescript-eslint/typescript-eslint/issues/2972) + + + + + ## [4.14.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.0...v4.14.1) (2021-01-25) diff --git a/lerna.json b/lerna.json index 3f5e1d45a5ed..4d4a0aa5567b 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.14.1", + "version": "4.14.2", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index e6e762ad9882..30c8dc06a582 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.14.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.1...v4.14.2) (2021-02-01) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.14.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.0...v4.14.1) (2021-01-25) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 50e8d1e0a5ca..aca917cc2c67 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "4.14.1", + "version": "4.14.2", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.14.1", + "@typescript-eslint/experimental-utils": "4.14.2", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 7d8ec1cc4b81..d65916de13ea 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.14.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.1...v4.14.2) (2021-02-01) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.14.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.0...v4.14.1) (2021-01-25) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 78186682b2d6..e59f2595707e 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-tslint", - "version": "4.14.1", + "version": "4.14.2", "main": "dist/index.js", "typings": "src/index.ts", "description": "TSLint wrapper plugin for ESLint", @@ -38,7 +38,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.14.1", + "@typescript-eslint/experimental-utils": "4.14.2", "lodash": "^4.17.15" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.14.1" + "@typescript-eslint/parser": "4.14.2" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index f912ece52ed1..7e95aca68df8 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.14.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.1...v4.14.2) (2021-02-01) + + +### Bug Fixes + +* **eslint-plugin:** [consistent-type-imports] incorrect handling of computed property type signatures ([#2990](https://github.com/typescript-eslint/typescript-eslint/issues/2990)) ([58f2655](https://github.com/typescript-eslint/typescript-eslint/commit/58f26555f62b5f59f13260306638d3148cde6079)), closes [#2989](https://github.com/typescript-eslint/typescript-eslint/issues/2989) +* **scope-manager:** correctly reference generic parameters when decorator metadata is enabled ([#2975](https://github.com/typescript-eslint/typescript-eslint/issues/2975)) ([7695ef3](https://github.com/typescript-eslint/typescript-eslint/commit/7695ef318f1cc8688acaabf4f2730769622f083f)), closes [#2972](https://github.com/typescript-eslint/typescript-eslint/issues/2972) + + + + + ## [4.14.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.0...v4.14.1) (2021-01-25) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index b7c24420b0be..b8e9295347c0 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.14.1", + "version": "4.14.2", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -42,8 +42,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.14.1", - "@typescript-eslint/scope-manager": "4.14.1", + "@typescript-eslint/experimental-utils": "4.14.2", + "@typescript-eslint/scope-manager": "4.14.2", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", diff --git a/packages/eslint-plugin/src/rules/consistent-type-imports.ts b/packages/eslint-plugin/src/rules/consistent-type-imports.ts index 5d14576a2e5b..6a3067270a45 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-imports.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-imports.ts @@ -164,20 +164,49 @@ export default util.createRule({ } } if (ref.isValueReference) { - // `type T = typeof foo` will create a value reference because "foo" must be a value type - // however this value reference is safe to use with type-only imports - let parent = ref.identifier.parent; + let parent: TSESTree.Node | undefined = + ref.identifier.parent; + let child: TSESTree.Node = ref.identifier; while (parent) { - if (parent.type === AST_NODE_TYPES.TSTypeQuery) { - return true; + switch (parent.type) { + // CASE 1: + // `type T = typeof foo` will create a value reference because "foo" must be a value type + // however this value reference is safe to use with type-only imports + case AST_NODE_TYPES.TSTypeQuery: + return true; + + case AST_NODE_TYPES.TSQualifiedName: + // TSTypeQuery must have a TSESTree.EntityName as its child, so we can filter here and break early + if (parent.left !== child) { + return false; + } + child = parent; + parent = parent.parent; + continue; + // END CASE 1 + + ////////////// + + // CASE 2: + // `type T = { [foo]: string }` will create a value reference because "foo" must be a value type + // however this value reference is safe to use with type-only imports. + // Also this is represented as a non-type AST - hence it uses MemberExpression + case AST_NODE_TYPES.TSPropertySignature: + return parent.key === child; + + case AST_NODE_TYPES.MemberExpression: + if (parent.object !== child) { + return false; + } + child = parent; + parent = parent.parent; + continue; + // END CASE 2 + + default: + return false; } - // TSTypeQuery must have a TSESTree.EntityName as its child, so we can filter here and break early - if (parent.type !== AST_NODE_TYPES.TSQualifiedName) { - break; - } - parent = parent.parent; } - return false; } return ref.isTypeReference; @@ -229,25 +258,46 @@ export default util.createRule({ ? report.valueSpecifiers : report.typeSpecifiers ).map(specifier => `"${specifier.local.name}"`); + + const message = ((): { + messageId: MessageIds; + data: Record; + } => { + if (importNames.length === 1) { + const typeImports = importNames[0]; + if (isTypeImport) { + return { + messageId: 'aImportInDecoMeta', + data: { typeImports }, + }; + } else { + return { + messageId: 'aImportIsOnlyTypes', + data: { typeImports }, + }; + } + } else { + const typeImports = [ + importNames.slice(0, -1).join(', '), + importNames.slice(-1)[0], + ].join(' and '); + if (isTypeImport) { + return { + messageId: 'someImportsInDecoMeta', + data: { typeImports }, + }; + } else { + return { + messageId: 'someImportsAreOnlyTypes', + data: { typeImports }, + }; + } + } + })(); + context.report({ node: report.node, - messageId: - importNames.length === 1 - ? isTypeImport - ? 'aImportInDecoMeta' - : 'aImportIsOnlyTypes' - : isTypeImport - ? 'someImportsInDecoMeta' - : 'someImportsAreOnlyTypes', - data: { - typeImports: - importNames.length === 1 - ? importNames[0] - : [ - importNames.slice(0, -1).join(', '), - importNames.slice(-1)[0], - ].join(' and '), - }, + ...message, *fix(fixer) { if (isTypeImport) { yield* fixToValueImportInDecoMeta( diff --git a/packages/eslint-plugin/tests/rules/consistent-type-imports.test.ts b/packages/eslint-plugin/tests/rules/consistent-type-imports.test.ts index 83d803cf3809..07005180ce07 100644 --- a/packages/eslint-plugin/tests/rules/consistent-type-imports.test.ts +++ b/packages/eslint-plugin/tests/rules/consistent-type-imports.test.ts @@ -341,6 +341,14 @@ ruleTester.run('consistent-type-imports', rule, { `, parserOptions: withMetaParserOptions, }, + // https://github.com/typescript-eslint/typescript-eslint/issues/2989 + ` +import type * as constants from './constants'; + +export type Y = { + [constants.X]: ReadonlyArray; +}; + `, ], invalid: [ { diff --git a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts index ea2eb03d7336..eaf59a485710 100644 --- a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts @@ -1,6 +1,6 @@ import rule from '../../../src/rules/no-unused-vars'; import { collectUnusedVariables } from '../../../src/util'; -import { noFormat, RuleTester } from '../../RuleTester'; +import { getFixturesRootDir, noFormat, RuleTester } from '../../RuleTester'; const ruleTester = new RuleTester({ parserOptions: { @@ -11,6 +11,11 @@ const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', }); +const withMetaParserOptions = { + tsconfigRootDir: getFixturesRootDir(), + project: './tsconfig-withmeta.json', +}; + // this is used to ensure that the caching the utility does does not impact the results done by no-unused-vars ruleTester.defineRule('collect-unused-vars', context => { collectUnusedVariables(context); @@ -978,6 +983,19 @@ declare module 'next-auth' { } } `, + // https://github.com/typescript-eslint/typescript-eslint/issues/2972 + { + code: ` +import { TestGeneric, Test } from 'fake-module'; + +declare function deco(..._param: any): any; +export class TestClass { + @deco + public test(): TestGeneric {} +} + `, + parserOptions: withMetaParserOptions, + }, ], invalid: [ diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 7edefd803b6f..4db79a8d9815 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.14.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.1...v4.14.2) (2021-02-01) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + ## [4.14.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.0...v4.14.1) (2021-01-25) **Note:** Version bump only for package @typescript-eslint/experimental-utils diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 4deebb4a1cf7..4fdcd8140c66 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.14.1", + "version": "4.14.2", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.14.1", - "@typescript-eslint/types": "4.14.1", - "@typescript-eslint/typescript-estree": "4.14.1", + "@typescript-eslint/scope-manager": "4.14.2", + "@typescript-eslint/types": "4.14.2", + "@typescript-eslint/typescript-estree": "4.14.2", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 1caf34f29a81..8a261c2199c0 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.14.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.1...v4.14.2) (2021-02-01) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + ## [4.14.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.0...v4.14.1) (2021-01-25) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 8c0b0563f4d4..b1b0564a0570 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.14.1", + "version": "4.14.2", "description": "An ESLint custom parser which leverages TypeScript ESTree", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -44,15 +44,15 @@ "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "4.14.1", - "@typescript-eslint/types": "4.14.1", - "@typescript-eslint/typescript-estree": "4.14.1", + "@typescript-eslint/scope-manager": "4.14.2", + "@typescript-eslint/types": "4.14.2", + "@typescript-eslint/typescript-estree": "4.14.2", "debug": "^4.1.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.14.1", - "@typescript-eslint/shared-fixtures": "4.14.1", + "@typescript-eslint/experimental-utils": "4.14.2", + "@typescript-eslint/shared-fixtures": "4.14.2", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 094e7ccffbd9..68db07cf6dba 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.14.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.1...v4.14.2) (2021-02-01) + + +### Bug Fixes + +* **scope-manager:** correctly reference generic parameters when decorator metadata is enabled ([#2975](https://github.com/typescript-eslint/typescript-eslint/issues/2975)) ([7695ef3](https://github.com/typescript-eslint/typescript-eslint/commit/7695ef318f1cc8688acaabf4f2730769622f083f)), closes [#2972](https://github.com/typescript-eslint/typescript-eslint/issues/2972) + + + + + ## [4.14.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.0...v4.14.1) (2021-01-25) diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index fe781ffe1ba2..8d4fea3499f1 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.14.1", + "version": "4.14.2", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.14.1", - "@typescript-eslint/visitor-keys": "4.14.1" + "@typescript-eslint/types": "4.14.2", + "@typescript-eslint/visitor-keys": "4.14.2" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.14.1", + "@typescript-eslint/typescript-estree": "4.14.2", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/scope-manager/src/referencer/ClassVisitor.ts b/packages/scope-manager/src/referencer/ClassVisitor.ts index 9f9315fa4118..fff575831910 100644 --- a/packages/scope-manager/src/referencer/ClassVisitor.ts +++ b/packages/scope-manager/src/referencer/ClassVisitor.ts @@ -295,9 +295,14 @@ class ClassVisitor extends Visitor { } if (withDecorators) { - return this.#referencer - .currentScope() - .referenceDualValueType(identifier); + this.#referencer.currentScope().referenceDualValueType(identifier); + + if (node.typeAnnotation.typeParameters) { + this.visitType(node.typeAnnotation.typeParameters); + } + + // everything is handled now + return; } } this.visitType(node); diff --git a/packages/scope-manager/tests/fixtures/class/emit-metadata/method-return-generic.ts b/packages/scope-manager/tests/fixtures/class/emit-metadata/method-return-generic.ts new file mode 100644 index 000000000000..ea8c1a53790d --- /dev/null +++ b/packages/scope-manager/tests/fixtures/class/emit-metadata/method-return-generic.ts @@ -0,0 +1,9 @@ +//// @emitDecoratorMetadata = true + +import { TestGeneric, Test } from 'fake-module'; + +declare function deco(..._param: any): any; +export class TestClass { + @deco + public test(): TestGeneric {} +} diff --git a/packages/scope-manager/tests/fixtures/class/emit-metadata/method-return-generic.ts.shot b/packages/scope-manager/tests/fixtures/class/emit-metadata/method-return-generic.ts.shot new file mode 100644 index 000000000000..64e13471b5ee --- /dev/null +++ b/packages/scope-manager/tests/fixtures/class/emit-metadata/method-return-generic.ts.shot @@ -0,0 +1,191 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`class emit-metadata method-return-generic 1`] = ` +ScopeManager { + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2 { + defs: Array [ + ImportBindingDefinition$1 { + name: Identifier<"TestGeneric">, + node: ImportSpecifier$1, + }, + ], + name: "TestGeneric", + references: Array [ + Reference$1 { + identifier: Identifier<"TestGeneric">, + isRead: true, + isTypeReference: true, + isValueReference: true, + isWrite: false, + resolved: Variable$2, + }, + ], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$3 { + defs: Array [ + ImportBindingDefinition$2 { + name: Identifier<"Test">, + node: ImportSpecifier$2, + }, + ], + name: "Test", + references: Array [ + Reference$2 { + identifier: Identifier<"Test">, + isRead: true, + isTypeReference: true, + isValueReference: false, + isWrite: false, + resolved: Variable$3, + }, + ], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$4 { + defs: Array [ + FunctionNameDefinition$3 { + name: Identifier<"deco">, + node: TSDeclareFunction$3, + }, + ], + name: "deco", + references: Array [ + Reference$3 { + identifier: Identifier<"deco">, + isRead: true, + isTypeReference: false, + isValueReference: true, + isWrite: false, + resolved: Variable$4, + }, + ], + isValueVariable: true, + isTypeVariable: false, + }, + Variable$5 { + defs: Array [], + name: "arguments", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$6 { + defs: Array [ + ParameterDefinition$4 { + name: Identifier<"_param">, + node: TSDeclareFunction$3, + }, + ], + name: "_param", + references: Array [], + isValueVariable: true, + isTypeVariable: false, + }, + Variable$7 { + defs: Array [ + ClassNameDefinition$5 { + name: Identifier<"TestClass">, + node: ClassDeclaration$4, + }, + ], + name: "TestClass", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$8 { + defs: Array [ + ClassNameDefinition$6 { + name: Identifier<"TestClass">, + node: ClassDeclaration$4, + }, + ], + name: "TestClass", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$9 { + defs: Array [], + name: "arguments", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + ], + scopes: Array [ + GlobalScope$1 { + block: Program$5, + isStrict: false, + references: Array [], + set: Map { + "const" => ImplicitGlobalConstTypeVariable, + "TestGeneric" => Variable$2, + "Test" => Variable$3, + "deco" => Variable$4, + "TestClass" => Variable$7, + }, + type: "global", + upper: null, + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2, + Variable$3, + Variable$4, + Variable$7, + ], + }, + FunctionScope$2 { + block: TSDeclareFunction$3, + isStrict: false, + references: Array [], + set: Map { + "arguments" => Variable$5, + "_param" => Variable$6, + }, + type: "function", + upper: GlobalScope$1, + variables: Array [ + Variable$5, + Variable$6, + ], + }, + ClassScope$3 { + block: ClassDeclaration$4, + isStrict: true, + references: Array [ + Reference$3, + ], + set: Map { + "TestClass" => Variable$8, + }, + type: "class", + upper: GlobalScope$1, + variables: Array [ + Variable$8, + ], + }, + FunctionScope$4 { + block: FunctionExpression$6, + isStrict: true, + references: Array [ + Reference$1, + Reference$2, + ], + set: Map { + "arguments" => Variable$9, + }, + type: "function", + upper: ClassScope$3, + variables: Array [ + Variable$9, + ], + }, + ], +} +`; diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index bea110c691e4..b2231d8f8cf8 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.14.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.1...v4.14.2) (2021-02-01) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.14.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.0...v4.14.1) (2021-01-25) **Note:** Version bump only for package @typescript-eslint/shared-fixtures diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index 88a00e4666e5..2123d7bff91d 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.14.1", + "version": "4.14.2", "private": true, "scripts": { "build": "tsc -b tsconfig.build.json", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 596a61c728a4..76afecfdf12a 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.14.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.1...v4.14.2) (2021-02-01) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + ## [4.14.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.0...v4.14.1) (2021-01-25) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 22073eb599e0..f7e7681bf86c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.14.1", + "version": "4.14.2", "description": "Types for the TypeScript-ESTree AST spec", "keywords": [ "eslint", diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 30ddcd5f5290..25770ec5eca5 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.14.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.1...v4.14.2) (2021-02-01) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + ## [4.14.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.0...v4.14.1) (2021-01-25) **Note:** Version bump only for package @typescript-eslint/typescript-estree diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 38d27a9035ba..63b5fdcff5c5 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.14.1", + "version": "4.14.2", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -41,8 +41,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.14.1", - "@typescript-eslint/visitor-keys": "4.14.1", + "@typescript-eslint/types": "4.14.2", + "@typescript-eslint/visitor-keys": "4.14.2", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -61,7 +61,7 @@ "@types/lodash": "*", "@types/semver": "^7.1.0", "@types/tmp": "^0.2.0", - "@typescript-eslint/shared-fixtures": "4.14.1", + "@typescript-eslint/shared-fixtures": "4.14.2", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 9d3ac16198a1..48fe2956257e 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [4.14.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.1...v4.14.2) (2021-02-01) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.14.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.0...v4.14.1) (2021-01-25) **Note:** Version bump only for package @typescript-eslint/visitor-keys diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index a628b1157db3..5df2758313e9 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.14.1", + "version": "4.14.2", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "keywords": [ "eslint", @@ -38,7 +38,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.14.1", + "@typescript-eslint/types": "4.14.2", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy