Skip to content

Commit

Permalink
Merge branch 'master'
Browse files Browse the repository at this point in the history
Conflicts:
	packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.test.ts
  • Loading branch information
armano2 committed Feb 19, 2021
2 parents 2bae582 + 885780d commit 897bedb
Show file tree
Hide file tree
Showing 27 changed files with 344 additions and 176 deletions.
212 changes: 127 additions & 85 deletions .all-contributorsrc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .husky/.gitignore
@@ -1 +1 @@
_
_
11 changes: 11 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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.15.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.15.0...v4.15.1) (2021-02-15)


### Bug Fixes

* **eslint-plugin:** [explicit-module-boundary-types] check allowNames on function declarations and property methods ([#3051](https://github.com/typescript-eslint/typescript-eslint/issues/3051)) ([0ade469](https://github.com/typescript-eslint/typescript-eslint/commit/0ade469dc1cf17d79c36a9c985630d60491ed847))





# [4.15.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.2...v4.15.0) (2021-02-08)


Expand Down
102 changes: 55 additions & 47 deletions CONTRIBUTORS.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lerna.json
@@ -1,5 +1,5 @@
{
"version": "4.15.0",
"version": "4.15.1",
"npmClient": "yarn",
"useWorkspaces": true,
"stream": true
Expand Down
8 changes: 8 additions & 0 deletions packages/eslint-plugin-internal/CHANGELOG.md
Expand Up @@ -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.15.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.15.0...v4.15.1) (2021-02-15)

**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal





# [4.15.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.2...v4.15.0) (2021-02-08)

**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin-internal/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/eslint-plugin-internal",
"version": "4.15.0",
"version": "4.15.1",
"private": true,
"main": "dist/index.js",
"scripts": {
Expand All @@ -14,7 +14,7 @@
},
"dependencies": {
"@types/prettier": "*",
"@typescript-eslint/experimental-utils": "4.15.0",
"@typescript-eslint/experimental-utils": "4.15.1",
"prettier": "*"
}
}
8 changes: 8 additions & 0 deletions packages/eslint-plugin-tslint/CHANGELOG.md
Expand Up @@ -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.15.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.15.0...v4.15.1) (2021-02-15)

**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint





# [4.15.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.2...v4.15.0) (2021-02-08)

**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-plugin-tslint/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/eslint-plugin-tslint",
"version": "4.15.0",
"version": "4.15.1",
"main": "dist/index.js",
"typings": "src/index.ts",
"description": "TSLint wrapper plugin for ESLint",
Expand Down Expand Up @@ -38,7 +38,7 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/experimental-utils": "4.15.0",
"@typescript-eslint/experimental-utils": "4.15.1",
"lodash": "^4.17.15"
},
"peerDependencies": {
Expand All @@ -48,6 +48,6 @@
},
"devDependencies": {
"@types/lodash": "*",
"@typescript-eslint/parser": "4.15.0"
"@typescript-eslint/parser": "4.15.1"
}
}
11 changes: 11 additions & 0 deletions packages/eslint-plugin/CHANGELOG.md
Expand Up @@ -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.15.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.15.0...v4.15.1) (2021-02-15)


### Bug Fixes

* **eslint-plugin:** [explicit-module-boundary-types] check allowNames on function declarations and property methods ([#3051](https://github.com/typescript-eslint/typescript-eslint/issues/3051)) ([0ade469](https://github.com/typescript-eslint/typescript-eslint/commit/0ade469dc1cf17d79c36a9c985630d60491ed847))





# [4.15.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.2...v4.15.0) (2021-02-08)


Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-plugin/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/eslint-plugin",
"version": "4.15.0",
"version": "4.15.1",
"description": "TypeScript plugin for ESLint",
"keywords": [
"eslint",
Expand Down Expand Up @@ -42,8 +42,8 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/experimental-utils": "4.15.0",
"@typescript-eslint/scope-manager": "4.15.0",
"@typescript-eslint/experimental-utils": "4.15.1",
"@typescript-eslint/scope-manager": "4.15.1",
"debug": "^4.1.1",
"functional-red-black-tree": "^1.0.1",
"lodash": "^4.17.15",
Expand Down
33 changes: 24 additions & 9 deletions packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts
Expand Up @@ -100,17 +100,22 @@ class Foo {
'const x: Set<string> = new Set();',
'const x: Set<string> = new Set<string>();',
'const [x] = [1];',
'const [x, y] = [1, 2] as number[];',
'const [x, ...y] = [1, 2, 3, 4, 5];',
'const [x, ...y] = [1];',
'const [{ ...x }] = [{ x: 1 }] as [{ x: any }];',
'function foo(x = 1) {}',
'function foo([x] = [1]) {}',
'function foo([x, ...y] = [1, 2, 3, 4, 5]) {}',
'function foo([x, ...y] = [1]) {}',
// this is not checked, because there's no annotation to compare it with
'const x = new Set<any>();',
'const x = { y: 1 };',
'const x = { y = 1 };',
'const x = { y(); };',
'const x: { y: number } = { y: 1 };',
'const x = [...[1, 2, 3]];',
'const [{ [`x${1}`]: x }] = [{ [`x`]: 1 }] as [{ [`x`]: any }];',
{
code: `
type Props = { a: string };
Expand All @@ -119,15 +124,23 @@ declare function Foo(props: Props): never;
`,
filename: 'react.tsx',
},
`
const x: unknown = y as any;
`,
`
const x: unknown[] = y as any[];
`,
`
const x: Set<unknown> = y as Set<any>;
`,
{
code: `
declare function Foo(props: { a: string }): never;
<Foo a="foo" />;
`,
filename: 'react.tsx',
},
{
code: `
declare function Foo(props: { a: string }): never;
<Foo a={} />;
`,
filename: 'react.tsx',
},
'const x: unknown = y as any;',
'const x: unknown[] = y as any[];',
'const x: Set<unknown> = y as Set<any>;',
],
invalid: [
...batchedSingleLineTests({
Expand Down Expand Up @@ -238,6 +251,8 @@ const x: Set<Set<Set<string>>> = new Set<Set<Set<any>>>();
['[[[[x]]]] = [[[[1 as any]]]]', 5, 6],
['[[[[x]]]] = [1 as any]', 2, 9, true],
['[{x}] = [{x: 1}] as [{x: any}]', 3, 4],
['[{["x"]: x}] = [{["x"]: 1}] as [{["x"]: any}]', 10, 11],
['[{[`x`]: x}] = [{[`x`]: 1}] as [{[`x`]: any}]', 10, 11],
]),
{
// TS treats the assignment pattern weirdly in this case
Expand Down
8 changes: 8 additions & 0 deletions packages/experimental-utils/CHANGELOG.md
Expand Up @@ -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.15.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.15.0...v4.15.1) (2021-02-15)

**Note:** Version bump only for package @typescript-eslint/experimental-utils





# [4.15.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.2...v4.15.0) (2021-02-08)

**Note:** Version bump only for package @typescript-eslint/experimental-utils
Expand Down
8 changes: 4 additions & 4 deletions packages/experimental-utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/experimental-utils",
"version": "4.15.0",
"version": "4.15.1",
"description": "(Experimental) Utilities for working with TypeScript + ESLint together",
"keywords": [
"eslint",
Expand Down Expand Up @@ -40,9 +40,9 @@
},
"dependencies": {
"@types/json-schema": "^7.0.3",
"@typescript-eslint/scope-manager": "4.15.0",
"@typescript-eslint/types": "4.15.0",
"@typescript-eslint/typescript-estree": "4.15.0",
"@typescript-eslint/scope-manager": "4.15.1",
"@typescript-eslint/types": "4.15.1",
"@typescript-eslint/typescript-estree": "4.15.1",
"eslint-scope": "^5.0.0",
"eslint-utils": "^2.0.0"
},
Expand Down
8 changes: 8 additions & 0 deletions packages/parser/CHANGELOG.md
Expand Up @@ -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.15.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.15.0...v4.15.1) (2021-02-15)

**Note:** Version bump only for package @typescript-eslint/parser





# [4.15.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.2...v4.15.0) (2021-02-08)

**Note:** Version bump only for package @typescript-eslint/parser
Expand Down
10 changes: 5 additions & 5 deletions packages/parser/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/parser",
"version": "4.15.0",
"version": "4.15.1",
"description": "An ESLint custom parser which leverages TypeScript ESTree",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -44,14 +44,14 @@
"eslint": "^5.0.0 || ^6.0.0 || ^7.0.0"
},
"dependencies": {
"@typescript-eslint/scope-manager": "4.15.0",
"@typescript-eslint/types": "4.15.0",
"@typescript-eslint/typescript-estree": "4.15.0",
"@typescript-eslint/scope-manager": "4.15.1",
"@typescript-eslint/types": "4.15.1",
"@typescript-eslint/typescript-estree": "4.15.1",
"debug": "^4.1.1"
},
"devDependencies": {
"@types/glob": "*",
"@typescript-eslint/experimental-utils": "4.15.0",
"@typescript-eslint/experimental-utils": "4.15.1",
"glob": "*",
"typescript": "*"
},
Expand Down
8 changes: 8 additions & 0 deletions packages/scope-manager/CHANGELOG.md
Expand Up @@ -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.15.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.15.0...v4.15.1) (2021-02-15)

**Note:** Version bump only for package @typescript-eslint/scope-manager





# [4.15.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.2...v4.15.0) (2021-02-08)


Expand Down
8 changes: 4 additions & 4 deletions packages/scope-manager/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/scope-manager",
"version": "4.15.0",
"version": "4.15.1",
"description": "TypeScript scope analyser for ESLint",
"keywords": [
"eslint",
Expand Down Expand Up @@ -39,12 +39,12 @@
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@typescript-eslint/types": "4.15.0",
"@typescript-eslint/visitor-keys": "4.15.0"
"@typescript-eslint/types": "4.15.1",
"@typescript-eslint/visitor-keys": "4.15.1"
},
"devDependencies": {
"@types/glob": "*",
"@typescript-eslint/typescript-estree": "4.15.0",
"@typescript-eslint/typescript-estree": "4.15.1",
"glob": "*",
"jest-specific-snapshot": "*",
"make-dir": "*",
Expand Down
8 changes: 8 additions & 0 deletions packages/shared-fixtures/CHANGELOG.md
Expand Up @@ -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.15.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.15.0...v4.15.1) (2021-02-15)

**Note:** Version bump only for package @typescript-eslint/shared-fixtures





# [4.15.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.2...v4.15.0) (2021-02-08)


Expand Down
2 changes: 1 addition & 1 deletion packages/shared-fixtures/package.json
@@ -1,5 +1,5 @@
{
"name": "@typescript-eslint/shared-fixtures",
"version": "4.15.0",
"version": "4.15.1",
"private": true
}
8 changes: 8 additions & 0 deletions packages/types/CHANGELOG.md
Expand Up @@ -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.15.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.15.0...v4.15.1) (2021-02-15)

**Note:** Version bump only for package @typescript-eslint/types





# [4.15.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.2...v4.15.0) (2021-02-08)

**Note:** Version bump only for package @typescript-eslint/types
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/types",
"version": "4.15.0",
"version": "4.15.1",
"description": "Types for the TypeScript-ESTree AST spec",
"keywords": [
"eslint",
Expand Down
8 changes: 8 additions & 0 deletions packages/typescript-estree/CHANGELOG.md
Expand Up @@ -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.15.1](https://github.com/typescript-eslint/typescript-eslint/compare/v4.15.0...v4.15.1) (2021-02-15)

**Note:** Version bump only for package @typescript-eslint/typescript-estree





# [4.15.0](https://github.com/typescript-eslint/typescript-eslint/compare/v4.14.2...v4.15.0) (2021-02-08)


Expand Down

0 comments on commit 897bedb

Please sign in to comment.