Skip to content

Commit

Permalink
Merge branch 'main' into feat/allow-typed-func-expression-with-higher…
Browse files Browse the repository at this point in the history
…-order-func
  • Loading branch information
lonyele committed Dec 20, 2021
2 parents 10922cd + bade083 commit a7365e0
Show file tree
Hide file tree
Showing 139 changed files with 4,187 additions and 2,062 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Expand Up @@ -15,7 +15,7 @@ The more relevant information you can include, the faster we can find the issue

- [ ] 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/main/docs/linting/TROUBLESHOOTING.md) and my problem is not listed.
- [ ] I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.

**Repro**

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Expand Up @@ -3,8 +3,8 @@ contact_links:
-
name: FAQ
about: Please check out our FAQ before filing new issues
url: https://github.com/typescript-eslint/typescript-eslint/blob/main/docs/linting/TROUBLESHOOTING.md
url: https://typescript-eslint.io/docs/linting/troubleshooting
-
name: Getting Started Guide
about: If you're looking for help setting up check out our getting started guide
url: https://github.com/typescript-eslint/typescript-eslint/tree/main/docs/getting-started
url: https://typescript-eslint.io/docs/
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation-request.md
Expand Up @@ -14,7 +14,7 @@ The more relevant information you can include, the faster we can find the issue
-->

- [ ] I have looked on [typescript-eslint.io](https://typescript-eslint.io).
- [ ] I have [read the FAQ](https://github.com/typescript-eslint/typescript-eslint/blob/main/docs/linting/TROUBLESHOOTING.md) and my problem is not listed.
- [ ] I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.

## Suggested Changes

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/eslint-plugin-tslint.md
Expand Up @@ -23,7 +23,7 @@ If you have a problem with a specific lint rule, please back out and select the

- [ ] 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/main/docs/linting/TROUBLESHOOTING.md) and my problem is not listed.
- [ ] I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.

**Repro**

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/eslint-plugin-typescript.md
Expand Up @@ -28,7 +28,7 @@ Are you opening an issue because the rule you're trying to use is not found?

- [ ] 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/main/docs/linting/TROUBLESHOOTING.md) and my problem is not listed.
- [ ] I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.

**Repro**

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/typescript-eslint-parser.md
Expand Up @@ -24,7 +24,7 @@ If you have a problem with a specific lint rule, please back out and select the

- [ ] 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/main/docs/linting/TROUBLESHOOTING.md) and my problem is not listed.
- [ ] I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.

**Repro**

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/typescript-eslint-scope-manager.md
Expand Up @@ -24,7 +24,7 @@ If you have a problem with the parser, please back out and select the `@typescri

- [ ] 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/main/docs/linting/TROUBLESHOOTING.md) and my problem is not listed.
- [ ] I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.

**Repro**

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/typescript-eslint-utils.md
Expand Up @@ -24,7 +24,7 @@ If you have a problem with the parser, please back out and select the `@typescri

- [ ] 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/main/docs/linting/TROUBLESHOOTING.md) and my problem is not listed.
- [ ] I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.

**Repro**

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/typescript-estree.md
Expand Up @@ -23,7 +23,7 @@ If you have a problem with a specific lint rule, please back out and select the

- [ ] 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/main/docs/linting/TROUBLESHOOTING.md) and my problem is not listed.
- [ ] I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.

**Repro**

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -137,9 +137,10 @@ jobs:
CI: true

- name: Publish code coverage report
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/**/coverage/lcov.info
flags: unittest
name: codecov

Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,36 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [5.7.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.6.0...v5.7.0) (2021-12-13)


### Bug Fixes

* **typescript-estree:** type-only regression for consumers not yet on TS 4.5 ([#4272](https://github.com/typescript-eslint/typescript-eslint/issues/4272)) ([550b61e](https://github.com/typescript-eslint/typescript-eslint/commit/550b61ee1096113b234bf035dd267ba385809961))


### Features

* **eslint-plugin:** [consistent-type-exports] support TS4.5 inline export specifiers ([#4236](https://github.com/typescript-eslint/typescript-eslint/issues/4236)) ([be4d976](https://github.com/typescript-eslint/typescript-eslint/commit/be4d976215614cc032730ae596d2f6e47df67730))
* **eslint-plugin:** [consistent-type-imports] support TS4.5 inline import specifiers ([#4237](https://github.com/typescript-eslint/typescript-eslint/issues/4237)) ([f61af7c](https://github.com/typescript-eslint/typescript-eslint/commit/f61af7c53cca52f81e77b4334c7d6ad100609af6))
* **eslint-plugin:** [no-shadow] support TS4.5 inline import specifiers ([#4239](https://github.com/typescript-eslint/typescript-eslint/issues/4239)) ([96b7e8e](https://github.com/typescript-eslint/typescript-eslint/commit/96b7e8ee0f5280cab50a7205ae592e1d983a111a))





# [5.6.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.5.0...v5.6.0) (2021-12-06)


### Features

* **scope-manager:** support TS4.5 import/export specifier kind ([#4234](https://github.com/typescript-eslint/typescript-eslint/issues/4234)) ([833f822](https://github.com/typescript-eslint/typescript-eslint/commit/833f8221ce00aecb7d08c519bab9568353850f48))
* **scope-manager:** update lib types ([#4240](https://github.com/typescript-eslint/typescript-eslint/issues/4240)) ([8377e6e](https://github.com/typescript-eslint/typescript-eslint/commit/8377e6ea422ee2d52455da8955ff055e09c238d3))





# [5.5.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.4.0...v5.5.0) (2021-11-29)


Expand Down
12 changes: 8 additions & 4 deletions docs/development/CUSTOM_RULES.md
Expand Up @@ -303,12 +303,16 @@ const ruleTester = new ESLintUtils.RuleTester({
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
}
},
});

ruleTester.run('my-typed-rule', rule {
valid: [/* ... */],
invalid: [/* ... */],
ruleTester.run('my-typed-rule', rule, {
valid: [
/* ... */
],
invalid: [
/* ... */
],
});
```

Expand Down
5 changes: 3 additions & 2 deletions docs/development/architecture/ASTS.md
@@ -1,10 +1,9 @@
---
id: asts
title: ASTs
sidebar_label: ASTs
---

## Abstract Syntax Trees (AST)s
# Abstract Syntax Trees (ASTs)

Parsers such as those in ESLint and TypeScript read in the text of source code and parse it into a standard format they can reason about known as an **Abstract Syntax Tree** (AST).
ASTs are called such because although they might contain information on the location of constructs within source code, they are an abstract representation that cares more about the semantic structure.
Expand Down Expand Up @@ -43,7 +42,9 @@ ESTree is more broadly used than just for ESLint -- it is the de facto community
ESLint's built-in parser that outputs an `estree`-shaped AST is also a separate package, called **[`espree`]**.

:::note

You can play more with various ASTs such as ESTree on [astexplorer.net] and read more details on their [Wikipedia article](https://en.wikipedia.org/wiki/Abstract_syntax_tree).

:::

[astexplorer.net]: https://astexplorer.net
Expand Down
22 changes: 11 additions & 11 deletions docs/linting/MONOREPO.md
Expand Up @@ -56,21 +56,21 @@ If you've only got one, you should inspect the `include` paths. If it doesn't in
The former doesn't always work for everyone if they've got a complex build, as adding more paths (like test paths) to `include` could break the build.
In those cases we suggest creating a new config called `tsconfig.eslint.json`, that looks something like this:

```js title=".eslintrc.js"
module.exports = {
```jsonc title="tsconfig.eslint.json"
{
// extend your base config to share compilerOptions, etc
extends: './tsconfig.json',
compilerOptions: {
"extends": "./tsconfig.json",
"compilerOptions": {
// ensure that nobody can accidentally use this config for a build
noEmit: true,
"noEmit": true
},
include: [
"include": [
// whatever paths you intend to lint
'src',
'test',
'tools',
],
};
"src",
"test",
"tools"
]
}
```

Ensure you update your `.eslintrc.js` to point at this new config file.
Expand Down
8 changes: 4 additions & 4 deletions docs/linting/README.md
Expand Up @@ -39,10 +39,10 @@ This is about the smallest config file we recommend. There's a lot more you can

Explaining the important bits:

- `parser: '@typescript-eslint/parser'` tells ESLint to use the parser package you installed ([`@typescript-eslint/parser`](../../../packages/parser)).
- `parser: '@typescript-eslint/parser'` tells ESLint to use the parser package you installed ([`@typescript-eslint/parser`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser)).
- This allows ESLint to understand TypeScript syntax.
- This is required, or else ESLint will throw errors as it tries to parse TypeScript code as if it were regular JavaScript.
- `plugins: ['@typescript-eslint']` tells ESLint to load the plugin package you installed ([`@typescript-eslint/eslint-plugin`](../../../packages/eslint-plugin)).
- `plugins: ['@typescript-eslint']` tells ESLint to load the plugin package you installed ([`@typescript-eslint/eslint-plugin`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin)).
- This allows you to use the rules within your codebase.
- `extends: [ ... ]` tells ESLint that your config extends the given configurations.
- `eslint:recommended` is ESLint's inbuilt "recommended" config - it turns on a small, sensible set of rules which lint for well-known best-practices.
Expand All @@ -66,7 +66,7 @@ dist

- You can read more about configuring ESLint [in their documentation on configuration](https://eslint.org/docs/user-guide/configuring).
- You can read more about the rules provided by ESLint [in their documentation on their rules](https://eslint.org/docs/rules/).
- You can read more about the rules provided by us in [our plugin documentation](../../../packages/eslint-plugin).
- You can read more about the rules provided by us in [our plugin documentation](https://typescript-eslint.io/rules/).

## Running ESLint

Expand Down Expand Up @@ -172,7 +172,7 @@ A typical plugin might be used like:

<!-- markdownlint-disable MD044 -->

Search ["eslint-plugin" on npm](https://www.npmjs.com/search?q=eslint-config) for more.
Search ["eslint-plugin" on npm](https://www.npmjs.com/search?q=eslint-plugin) for more.

## Troubleshooting

Expand Down
8 changes: 4 additions & 4 deletions docs/linting/TROUBLESHOOTING.md
Expand Up @@ -8,7 +8,7 @@ sidebar_label: Troubleshooting & FAQs

This happens because TypeScript adds new features that ESLint doesn't know about.

The first step is to [check our list of "extension" rules here](../../../packages/eslint-plugin/README.md#extension-rules).
The first step is to [check our list of "extension" rules here](https://typescript-eslint.io/rules/#extension-rules).
An extension rule is a rule which extends the base ESLint rules to support TypeScript syntax.
If you find it in there, give it a go to see if it works for you.
You can configure it by disabling the base rule, and turning on the extension rule.
Expand All @@ -24,10 +24,10 @@ Here's an example with the `semi` rule:
```

If you don't find an existing extension rule, or the extension rule doesn't work for your case, then you can go ahead and check our issues.
[The contributing guide outlines the best way to raise an issue](../../../CONTRIBUTING.md#raising-issues).
[The contributing guide outlines the best way to raise an issue](https://github.com/typescript-eslint/typescript-eslint/blob/main/CONTRIBUTING.md#raising-issues).

> We release a new version our tooling every week.
> _Please_ ensure that you [check our the latest list of "extension" rules](../../../packages/eslint-plugin/README.md#extension-rules) **_before_** filing an issue.
> _Please_ ensure that you [check our the latest list of "extension" rules](https://typescript-eslint.io/rules/#extension-rules) **_before_** filing an issue.
## I get errors telling me "The file must be included in at least one of the projects provided"

Expand Down Expand Up @@ -60,7 +60,7 @@ If you have some pure JavaScript code that you do not want to apply certain lint

Make sure that you have installed TypeScript locally i.e. by using `npm install typescript`, not `npm install -g typescript`,
or by using `yarn add typescript`, not `yarn global add typescript`.
See https://github.com/typescript-eslint/typescript-eslint/issues/2041 for more information.
See [#2041](https://github.com/typescript-eslint/typescript-eslint/issues/2041) for more information.

## How can I ban `<specific language feature>`?

Expand Down
4 changes: 2 additions & 2 deletions docs/linting/TYPED_LINTING.md
Expand Up @@ -63,8 +63,8 @@ Depending on what you want to achieve:
- If you **do** want to lint the file with [type-aware linting](./TYPED_LINTING.md):
- Check the `include` option of each of the tsconfigs that you provide to `parserOptions.project` - you must ensure that all files match an `include` glob, or else our tooling will not be able to find it.
- If your file shouldn't be a part of one of your existing tsconfigs (for example, it is a script/tool local to the repo), then consider creating a new tsconfig (we advise calling it `tsconfig.eslint.json`) in your project root which lists this file in its `include`. For an example of this, you can check out the configuration we use in this repo:
- [`tsconfig.eslint.json`](https://github.com/typescript-eslint/typescript-eslint/tsconfig.eslint.json)
- [`.eslintrc.js`](https://github.com/typescript-eslint/typescript-eslint/.eslintrc.js)
- [`tsconfig.eslint.json`](https://github.com/typescript-eslint/typescript-eslint/blob/main/tsconfig.eslint.json)
- [`.eslintrc.js`](https://github.com/typescript-eslint/typescript-eslint/blob/main/.eslintrc.js)

## Troubleshooting

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
@@ -1,5 +1,5 @@
{
"version": "5.5.0",
"version": "5.7.0",
"npmClient": "yarn",
"useWorkspaces": true,
"stream": true
Expand Down
16 changes: 16 additions & 0 deletions packages/ast-spec/CHANGELOG.md
Expand Up @@ -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.

# [5.7.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.6.0...v5.7.0) (2021-12-13)

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





# [5.6.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.5.0...v5.6.0) (2021-12-06)

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





# [5.5.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.4.0...v5.5.0) (2021-11-29)

**Note:** Version bump only for package @typescript-eslint/ast-spec
Expand Down
2 changes: 1 addition & 1 deletion packages/ast-spec/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/ast-spec",
"version": "5.5.0",
"version": "5.7.0",
"description": "TypeScript-ESTree AST spec",
"private": true,
"keywords": [
Expand Down
16 changes: 16 additions & 0 deletions packages/eslint-plugin-internal/CHANGELOG.md
Expand Up @@ -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.

# [5.7.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.6.0...v5.7.0) (2021-12-13)

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





# [5.6.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.5.0...v5.6.0) (2021-12-06)

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





# [5.5.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.4.0...v5.5.0) (2021-11-29)

**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-plugin-internal/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/eslint-plugin-internal",
"version": "5.5.0",
"version": "5.7.0",
"private": true,
"main": "dist/index.js",
"scripts": {
Expand All @@ -14,8 +14,8 @@
},
"dependencies": {
"@types/prettier": "*",
"@typescript-eslint/experimental-utils": "5.5.0",
"@typescript-eslint/scope-manager": "5.5.0",
"@typescript-eslint/experimental-utils": "5.7.0",
"@typescript-eslint/scope-manager": "5.7.0",
"prettier": "*"
}
}
16 changes: 16 additions & 0 deletions packages/eslint-plugin-tslint/CHANGELOG.md
Expand Up @@ -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.

# [5.7.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.6.0...v5.7.0) (2021-12-13)

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





# [5.6.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.5.0...v5.6.0) (2021-12-06)

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





# [5.5.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.4.0...v5.5.0) (2021-11-29)

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

0 comments on commit a7365e0

Please sign in to comment.