diff --git a/CHANGELOG.md b/CHANGELOG.md index f0ffb627e841..78ffe9a5eb29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.1...v4.10.0) (2020-12-14) + + +### Bug Fixes + +* **eslint-plugin:** [naming-convention] fix wrong member of `method` and `property` meta selectors ([#2856](https://github.com/typescript-eslint/typescript-eslint/issues/2856)) ([9a6c362](https://github.com/typescript-eslint/typescript-eslint/commit/9a6c3628a2f3a7748b7a4b9b0c55400c8d7dfeae)) + + +### Features + +* **eslint-plugin:** add rule `non-nullable-type-assertion-style` ([#2624](https://github.com/typescript-eslint/typescript-eslint/issues/2624)) ([7eee44f](https://github.com/typescript-eslint/typescript-eslint/commit/7eee44fff3041a9725d34bf2fcbfc6fd40a60c61)) + + + + + ## [4.9.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.0...v4.9.1) (2020-12-07) diff --git a/lerna.json b/lerna.json index bdc6a34dfa39..2aeb0572f967 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.9.1", + "version": "4.10.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index b1ac9cb61b05..6232e8d8f653 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.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.1...v4.10.0) (2020-12-14) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [4.9.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.0...v4.9.1) (2020-12-07) **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 c42e4595094b..bf2dc43669d2 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.9.1", + "version": "4.10.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/experimental-utils": "4.9.1", + "@typescript-eslint/experimental-utils": "4.10.0", "prettier": "*" } } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 54cd275dc179..b7087af3d53e 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.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.1...v4.10.0) (2020-12-14) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [4.9.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.0...v4.9.1) (2020-12-07) **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 eba34e5ad815..6538788abb0a 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.9.1", + "version": "4.10.0", "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.9.1", + "@typescript-eslint/experimental-utils": "4.10.0", "lodash": "^4.17.15" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "4.9.1" + "@typescript-eslint/parser": "4.10.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 49925f7c6a69..c2ccb95df94f 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.1...v4.10.0) (2020-12-14) + + +### Bug Fixes + +* **eslint-plugin:** [naming-convention] fix wrong member of `method` and `property` meta selectors ([#2856](https://github.com/typescript-eslint/typescript-eslint/issues/2856)) ([9a6c362](https://github.com/typescript-eslint/typescript-eslint/commit/9a6c3628a2f3a7748b7a4b9b0c55400c8d7dfeae)) + + +### Features + +* **eslint-plugin:** add rule `non-nullable-type-assertion-style` ([#2624](https://github.com/typescript-eslint/typescript-eslint/issues/2624)) ([7eee44f](https://github.com/typescript-eslint/typescript-eslint/commit/7eee44fff3041a9725d34bf2fcbfc6fd40a60c61)) + + + + + ## [4.9.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.0...v4.9.1) (2020-12-07) diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 4cf27e64a83c..52776b44c729 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -148,6 +148,7 @@ Pro Tip: For larger codebases you may want to consider splitting our linting int | [`@typescript-eslint/no-unsafe-member-access`](./docs/rules/no-unsafe-member-access.md) | Disallows member access on any typed variables | :heavy_check_mark: | | :thought_balloon: | | [`@typescript-eslint/no-unsafe-return`](./docs/rules/no-unsafe-return.md) | Disallows returning any from a function | :heavy_check_mark: | | :thought_balloon: | | [`@typescript-eslint/no-var-requires`](./docs/rules/no-var-requires.md) | Disallows the use of require statements except in import statements | :heavy_check_mark: | | | +| [`@typescript-eslint/non-nullable-type-assertion-style`](./docs/rules/non-nullable-type-assertion-style.md) | Prefers a non-null assertion over explicit type cast when possible | | :wrench: | :thought_balloon: | | [`@typescript-eslint/prefer-as-const`](./docs/rules/prefer-as-const.md) | Prefer usage of `as const` over literal type | :heavy_check_mark: | :wrench: | | | [`@typescript-eslint/prefer-enum-initializers`](./docs/rules/prefer-enum-initializers.md) | Prefer initializing each enums member value | | | | | [`@typescript-eslint/prefer-for-of`](./docs/rules/prefer-for-of.md) | Prefer a ‘for-of’ loop over a standard ‘for’ loop if the index is only used to access the array being iterated | | | | diff --git a/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md b/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md new file mode 100644 index 000000000000..473f83b0a9bf --- /dev/null +++ b/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md @@ -0,0 +1,27 @@ +# Prefers a non-null assertion over explicit type cast when possible (`non-nullable-type-assertion-style`) + +This rule detects when an `as` cast is doing the same job as a `!` would, and suggests fixing the code to be an `!`. + +## Rule Details + +Examples of **incorrect** code for this rule: + +```ts +const maybe = Math.random() > 0.5 ? '' : undefined; + +const definitely = maybe as string; +const alsoDefinitely = maybe; +``` + +Examples of **correct** code for this rule: + +```ts +const maybe = Math.random() > 0.5 ? '' : undefined; + +const definitely = maybe!; +const alsoDefinitely = maybe!; +``` + +## When Not To Use It + +If you don't mind having unnecessarily verbose type casts, you can avoid this rule. diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 23bf08fbd14a..3b4b93641717 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "4.9.1", + "version": "4.10.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -42,8 +42,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/experimental-utils": "4.9.1", - "@typescript-eslint/scope-manager": "4.9.1", + "@typescript-eslint/experimental-utils": "4.10.0", + "@typescript-eslint/scope-manager": "4.10.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index 07234c9950f5..df0b704146ce 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -112,6 +112,7 @@ export = { 'no-useless-constructor': 'off', '@typescript-eslint/no-useless-constructor': 'error', '@typescript-eslint/no-var-requires': 'error', + '@typescript-eslint/non-nullable-type-assertion-style': 'error', '@typescript-eslint/prefer-as-const': 'error', '@typescript-eslint/prefer-enum-initializers': 'error', '@typescript-eslint/prefer-for-of': 'error', diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index de982a91d87c..66f820a0dcb4 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -78,6 +78,7 @@ import noUnusedVarsExperimental from './no-unused-vars-experimental'; import noUseBeforeDefine from './no-use-before-define'; import noUselessConstructor from './no-useless-constructor'; import noVarRequires from './no-var-requires'; +import nonNullableTypeAssertionStyle from './non-nullable-type-assertion-style'; import preferAsConst from './prefer-as-const'; import preferEnumInitializers from './prefer-enum-initializers'; import preferForOf from './prefer-for-of'; @@ -192,6 +193,7 @@ export default { 'no-use-before-define': noUseBeforeDefine, 'no-useless-constructor': noUselessConstructor, 'no-var-requires': noVarRequires, + 'non-nullable-type-assertion-style': nonNullableTypeAssertionStyle, 'prefer-as-const': preferAsConst, 'prefer-enum-initializers': preferEnumInitializers, 'prefer-for-of': preferForOf, diff --git a/packages/eslint-plugin/src/rules/naming-convention-utils/enums.ts b/packages/eslint-plugin/src/rules/naming-convention-utils/enums.ts index 4dff9611dcfd..c9460305847a 100644 --- a/packages/eslint-plugin/src/rules/naming-convention-utils/enums.ts +++ b/packages/eslint-plugin/src/rules/naming-convention-utils/enums.ts @@ -71,11 +71,11 @@ enum MetaSelectors { method = 0 | Selectors.classMethod | Selectors.objectLiteralMethod | - Selectors.typeProperty, + Selectors.typeMethod, property = 0 | Selectors.classProperty | Selectors.objectLiteralProperty | - Selectors.typeMethod, + Selectors.typeProperty, } type MetaSelectorsString = keyof typeof MetaSelectors; type IndividualAndMetaSelectorsString = SelectorsString | MetaSelectorsString; diff --git a/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts b/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts new file mode 100644 index 000000000000..9bb099ef88cc --- /dev/null +++ b/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts @@ -0,0 +1,101 @@ +import { TSESTree } from '@typescript-eslint/experimental-utils'; +import * as tsutils from 'tsutils'; +import * as ts from 'typescript'; + +import * as util from '../util'; + +export default util.createRule({ + name: 'non-nullable-type-assertion-style', + meta: { + docs: { + category: 'Best Practices', + description: + 'Prefers a non-null assertion over explicit type cast when possible', + recommended: false, + requiresTypeChecking: true, + suggestion: true, + }, + fixable: 'code', + messages: { + preferNonNullAssertion: + 'Use a ! assertion to more succintly remove null and undefined from the type.', + }, + schema: [], + type: 'suggestion', + }, + defaultOptions: [], + + create(context) { + const parserServices = util.getParserServices(context); + const checker = parserServices.program.getTypeChecker(); + const sourceCode = context.getSourceCode(); + + const getTypesIfNotLoose = (node: TSESTree.Node): ts.Type[] | undefined => { + const type = checker.getTypeAtLocation( + parserServices.esTreeNodeToTSNodeMap.get(node), + ); + + if ( + tsutils.isTypeFlagSet(type, ts.TypeFlags.Any | ts.TypeFlags.Unknown) + ) { + return undefined; + } + + return tsutils.unionTypeParts(type); + }; + + const sameTypeWithoutNullish = ( + assertedTypes: ts.Type[], + originalTypes: ts.Type[], + ): boolean => { + const nonNullishOriginalTypes = originalTypes.filter( + type => + type.flags !== ts.TypeFlags.Null && + type.flags !== ts.TypeFlags.Undefined, + ); + + for (const assertedType of assertedTypes) { + if (!nonNullishOriginalTypes.includes(assertedType)) { + return false; + } + } + + for (const originalType of nonNullishOriginalTypes) { + if (!assertedTypes.includes(originalType)) { + return false; + } + } + + return true; + }; + + return { + 'TSAsExpression, TSTypeAssertion'( + node: TSESTree.TSTypeAssertion | TSESTree.TSAsExpression, + ): void { + const originalTypes = getTypesIfNotLoose(node.expression); + if (!originalTypes) { + return; + } + + const assertedTypes = getTypesIfNotLoose(node.typeAnnotation); + if (!assertedTypes) { + return; + } + + if (sameTypeWithoutNullish(assertedTypes, originalTypes)) { + context.report({ + fix(fixer) { + return fixer.replaceText( + node, + `${sourceCode.getText(node.expression)}!`, + ); + }, + messageId: 'preferNonNullAssertion', + node, + }); + } + }, + }; + }, +}); diff --git a/packages/eslint-plugin/tests/rules/non-nullable-type-assertion-style.test.ts b/packages/eslint-plugin/tests/rules/non-nullable-type-assertion-style.test.ts new file mode 100644 index 000000000000..45ca1774d301 --- /dev/null +++ b/packages/eslint-plugin/tests/rules/non-nullable-type-assertion-style.test.ts @@ -0,0 +1,193 @@ +import path from 'path'; +import rule from '../../src/rules/non-nullable-type-assertion-style'; +import { RuleTester } from '../RuleTester'; + +const rootDir = path.resolve(__dirname, '../fixtures/'); +const ruleTester = new RuleTester({ + parserOptions: { + sourceType: 'module', + tsconfigRootDir: rootDir, + project: './tsconfig.json', + }, + parser: '@typescript-eslint/parser', +}); + +ruleTester.run('non-nullable-type-assertion-style', rule, { + valid: [ + ` +declare const original: number | string; +const cast = original as string; + `, + ` +declare const original: number | undefined; +const cast = original as string | number | undefined; + `, + ` +declare const original: number | any; +const cast = original as string | number | undefined; + `, + ` +declare const original: number | undefined; +const cast = original as any; + `, + ` +declare const original: number | null | undefined; +const cast = original as number | null; + `, + ` +type Type = { value: string }; +declare const original: Type | number; +const cast = original as Type; + `, + ` +type T = string; +declare const x: T | number; + +const y = x as NonNullable; + `, + ` +type T = string | null; +declare const x: T | number; + +const y = x as NonNullable; + `, + ], + + invalid: [ + { + code: ` +declare const maybe: string | undefined; +const bar = maybe as string; + `, + errors: [ + { + column: 13, + line: 3, + messageId: 'preferNonNullAssertion', + }, + ], + output: ` +declare const maybe: string | undefined; +const bar = maybe!; + `, + }, + { + code: ` +declare const maybe: string | null; +const bar = maybe as string; + `, + errors: [ + { + column: 13, + line: 3, + messageId: 'preferNonNullAssertion', + }, + ], + output: ` +declare const maybe: string | null; +const bar = maybe!; + `, + }, + { + code: ` +declare const maybe: string | null | undefined; +const bar = maybe as string; + `, + errors: [ + { + column: 13, + line: 3, + messageId: 'preferNonNullAssertion', + }, + ], + output: ` +declare const maybe: string | null | undefined; +const bar = maybe!; + `, + }, + { + code: ` +type Type = { value: string }; +declare const maybe: Type | undefined; +const bar = maybe as Type; + `, + errors: [ + { + column: 13, + line: 4, + messageId: 'preferNonNullAssertion', + }, + ], + output: ` +type Type = { value: string }; +declare const maybe: Type | undefined; +const bar = maybe!; + `, + }, + { + code: ` +interface Interface { + value: string; +} +declare const maybe: Interface | undefined; +const bar = maybe as Interface; + `, + errors: [ + { + column: 13, + line: 6, + messageId: 'preferNonNullAssertion', + }, + ], + output: ` +interface Interface { + value: string; +} +declare const maybe: Interface | undefined; +const bar = maybe!; + `, + }, + { + code: ` +type T = string | null; +declare const x: T; + +const y = x as NonNullable; + `, + errors: [ + { + column: 11, + line: 5, + messageId: 'preferNonNullAssertion', + }, + ], + output: ` +type T = string | null; +declare const x: T; + +const y = x!; + `, + }, + { + code: ` +type T = string | null | undefined; +declare const x: T; + +const y = x as NonNullable; + `, + errors: [ + { + column: 11, + line: 5, + messageId: 'preferNonNullAssertion', + }, + ], + output: ` +type T = string | null | undefined; +declare const x: T; + +const y = x!; + `, + }, + ], +}); diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 2e9e8c7fdc6c..54a833f07957 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.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.1...v4.10.0) (2020-12-14) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + ## [4.9.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.0...v4.9.1) (2020-12-07) **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 14d3ad2fafb1..43bdd2891c83 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "4.9.1", + "version": "4.10.0", "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.9.1", - "@typescript-eslint/types": "4.9.1", - "@typescript-eslint/typescript-estree": "4.9.1", + "@typescript-eslint/scope-manager": "4.10.0", + "@typescript-eslint/types": "4.10.0", + "@typescript-eslint/typescript-estree": "4.10.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 6b314d99c304..c5b0afb4b022 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.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.1...v4.10.0) (2020-12-14) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + ## [4.9.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.0...v4.9.1) (2020-12-07) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 01301246c8de..220077cd7f4b 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "4.9.1", + "version": "4.10.0", "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.9.1", - "@typescript-eslint/types": "4.9.1", - "@typescript-eslint/typescript-estree": "4.9.1", + "@typescript-eslint/scope-manager": "4.10.0", + "@typescript-eslint/types": "4.10.0", + "@typescript-eslint/typescript-estree": "4.10.0", "debug": "^4.1.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/experimental-utils": "4.9.1", - "@typescript-eslint/shared-fixtures": "4.9.1", + "@typescript-eslint/experimental-utils": "4.10.0", + "@typescript-eslint/shared-fixtures": "4.10.0", "glob": "*", "typescript": "*" }, diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 9882c2fdfb53..3a4633b947bc 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/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.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.1...v4.10.0) (2020-12-14) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + ## [4.9.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.0...v4.9.1) (2020-12-07) **Note:** Version bump only for package @typescript-eslint/scope-manager diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index aa8d7486f208..ca9e2794af8d 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "4.9.1", + "version": "4.10.0", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "4.9.1", - "@typescript-eslint/visitor-keys": "4.9.1" + "@typescript-eslint/types": "4.10.0", + "@typescript-eslint/visitor-keys": "4.10.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "4.9.1", + "@typescript-eslint/typescript-estree": "4.10.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index fbc020f983cf..6f6217070e96 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.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.1...v4.10.0) (2020-12-14) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [4.9.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.0...v4.9.1) (2020-12-07) **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 9ba57e06fe22..552520ec9675 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "4.9.1", + "version": "4.10.0", "private": true, "scripts": { "build": "tsc -b tsconfig.build.json", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 259be1621a7e..2bcd287824f9 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.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.1...v4.10.0) (2020-12-14) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + ## [4.9.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.0...v4.9.1) (2020-12-07) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index a87c0ecfaff0..8018a3f69485 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "4.9.1", + "version": "4.10.0", "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 85c246e45a82..342d997dfcf3 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.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.1...v4.10.0) (2020-12-14) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + ## [4.9.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.0...v4.9.1) (2020-12-07) **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 00a952f6fe1f..09b2f8ec919c 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "4.9.1", + "version": "4.10.0", "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.9.1", - "@typescript-eslint/visitor-keys": "4.9.1", + "@typescript-eslint/types": "4.10.0", + "@typescript-eslint/visitor-keys": "4.10.0", "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.9.1", + "@typescript-eslint/shared-fixtures": "4.10.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 03766e18cf80..71bd890c88ba 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.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.1...v4.10.0) (2020-12-14) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + ## [4.9.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.9.0...v4.9.1) (2020-12-07) **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 5a5ee2a62e07..e5ca77efedfc 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "4.9.1", + "version": "4.10.0", "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.9.1", + "@typescript-eslint/types": "4.10.0", "eslint-visitor-keys": "^2.0.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 08855a0634f6..b5a092b67774 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4820,9 +4820,9 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + version "1.3.7" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" + integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== init-package-json@^1.10.3: version "1.10.3"