Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feat/issue5245-nega…
Browse files Browse the repository at this point in the history
…ted-or-optional-chaining
  • Loading branch information
omril1 committed Aug 19, 2022
2 parents 6b1244c + c950051 commit 1f35a88
Show file tree
Hide file tree
Showing 298 changed files with 3,368 additions and 3,957 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Expand Up @@ -15,6 +15,7 @@ module.exports = {
},
extends: [
'eslint:recommended',
'plugin:eslint-plugin/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
Expand Down Expand Up @@ -194,7 +195,7 @@ module.exports = {
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'eslint-plugin/no-identical-tests': 'error',
'eslint-plugin/consistent-output': 'off', // Might eventually be removed from `eslint-plugin/recommended`: https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/issues/284
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-alias-methods': 'error',
Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml
@@ -1,9 +1,9 @@
name: "🐛 Report a Bug With a Rule"
description: "Report a bug you encountered with a lint rule"
title: "Bug: [rule name here] <short description of the issue>"
name: '🐛 Report a Bug With a Rule'
description: 'Report a bug you encountered with a lint rule'
title: 'Bug: [rule name here] <short description of the issue>'
labels:
- bug
- "package: eslint-plugin"
- 'package: eslint-plugin'
- triage
body:
- type: checkboxes
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml
@@ -1,9 +1,9 @@
name: "✨ Propose a New Rule Option or Additional Checks"
description: "Propose a new lint rule option or propose that a lint rule checks more cases"
title: "Enhancement: [rule-name] <a short description of my proposal>"
name: '✨ Propose a New Rule Option or Additional Checks'
description: 'Propose a new lint rule option or propose that a lint rule checks more cases'
title: 'Enhancement: [rule-name] <a short description of my proposal>'
labels:
- "enhancement: plugin rule option"
- "package: eslint-plugin"
- 'enhancement: plugin rule option'
- 'package: eslint-plugin'
- triage
body:
- type: checkboxes
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml
@@ -1,9 +1,9 @@
name: "✨ Propose a New Rule"
description: "Propose a new lint rule"
title: "Rule proposal: <a short description of my proposal>"
name: '✨ Propose a New Rule'
description: 'Propose a new lint rule'
title: 'Rule proposal: <a short description of my proposal>'
labels:
- "enhancement: new plugin rule"
- "package: eslint-plugin"
- 'enhancement: new plugin rule'
- 'package: eslint-plugin'
- triage
body:
- type: checkboxes
Expand Down
@@ -1,9 +1,9 @@
name: "✨ Propose a New Base Rule Extension"
description: "Propose a new base lint rule extension"
title: "Base rule extension: [rule-name] <a short description of my proposal>"
name: '✨ Propose a New Base Rule Extension'
description: 'Propose a new base lint rule extension'
title: 'Base rule extension: [rule-name] <a short description of my proposal>'
labels:
- "enhancement: new base rule extension"
- "package: eslint-plugin"
- 'enhancement: new base rule extension'
- 'package: eslint-plugin'
- triage
body:
- type: markdown
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/05-documentation-request.yml
@@ -1,6 +1,6 @@
name: "📝 Documentation Request"
description: "Request a change in documentation"
title: "Docs: <a short description of my proposal>"
name: '📝 Documentation Request'
description: 'Request a change in documentation'
title: 'Docs: <a short description of my proposal>'
labels:
- documentation
- triage
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/06-bug-report-other.yaml
@@ -1,6 +1,6 @@
name: "🐛 Report a Bug With Another Package"
description: "Report a bug you encountered with another one of our packages (parser, util, scope-manager, etc)"
title: "Bug: <short description of the issue>"
name: '🐛 Report a Bug With Another Package'
description: 'Report a bug you encountered with another one of our packages (parser, util, scope-manager, etc)'
title: 'Bug: <short description of the issue>'
labels:
- bug
- triage
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/07-enhancement-other.yaml
@@ -1,6 +1,6 @@
name: "✨ Propose an Enhancement With Another Package"
description: "Report an enhancement to another one of our packages (parser, util, scope-manager, etc)"
title: "Enhancement: <a short description of my proposal>"
name: '✨ Propose an Enhancement With Another Package'
description: 'Report an enhancement to another one of our packages (parser, util, scope-manager, etc)'
title: 'Enhancement: <a short description of my proposal>'
labels:
- enhancement
- triage
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/08-bug-report-complex.yaml
@@ -1,6 +1,6 @@
name: "🐛 Report a Complex Bug With a Reproduction Repository"
name: '🐛 Report a Complex Bug With a Reproduction Repository'
description: Report a complex bug you encountered by providing an isolated reproduction repository
title: "Bug: <short description of the issue>"
title: 'Bug: <short description of the issue>'
labels:
- bug
- triage
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/09-config-change.yaml
@@ -1,9 +1,9 @@
name: "♻ Propose a Change to Preset Configurations"
description: "Propose an addition, removal, or general change to a preset config"
title: "Configs: <a short description of my proposal>"
name: '♻ Propose a Change to Preset Configurations'
description: 'Propose an addition, removal, or general change to a preset config'
title: 'Configs: <a short description of my proposal>'
labels:
- "package: eslint-plugin"
- "preset config change"
- 'package: eslint-plugin'
- 'preset config change'
- triage
body:
- type: checkboxes
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/10-repo-maintenance.yaml
@@ -1,8 +1,8 @@
name: "🏗 Suggest an Improvement with Repository Maintenance"
name: '🏗 Suggest an Improvement with Repository Maintenance'
description: Report a bug or request a feature related to developing the typescript-eslint monorepo
title: "Repo: <short description of the issue>"
title: 'Repo: <short description of the issue>'
labels:
- "repo maintenance"
- 'repo maintenance'
- triage
body:
- type: markdown
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/prepare-build/action.yml
@@ -1,15 +1,15 @@
name: "Prepare: Build"
description: "Prepares the repo for a job by running the build"
name: 'Prepare: Build'
description: 'Prepares the repo for a job by running the build'
# inputs: - no inputs
# outputs: - no outputs

runs:
using: "composite"
using: 'composite'
steps:
- uses: actions/cache@v3
id: build-cache
with:
path: "**/dist/**"
path: '**/dist/**'
key: ${{ runner.os }}-build-${{ github.ref }}
restore-keys: |
${{ runner.os }}-build-
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/prepare-install/action.yml
@@ -1,17 +1,17 @@
name: "Prepare: Checkout and Install"
description: "Prepares the repo for a job by checking out and installing dependencies"
name: 'Prepare: Checkout and Install'
description: 'Prepares the repo for a job by checking out and installing dependencies'
inputs:
node-version:
description: "The node version to setup"
description: 'The node version to setup'
required: true
registry-url:
description: "Define registry-url"
description: 'Define registry-url'
required: false

# outputs: - no outputs

runs:
using: "composite"
using: 'composite'
steps:
- name: echo github.ref
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Expand Up @@ -6,9 +6,9 @@ Otherwise we may not be able to review your PR.

## PR Checklist

- [ ] Addresses an existing open issue: fixes #000
- [ ] That issue was marked as [accepting prs](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22)
- [ ] Steps in [CONTRIBUTING.md](https://github.com/typescript-eslint/typescript-eslint/blob/main/CONTRIBUTING.md) were taken
- [ ] Addresses an existing open issue: fixes #000
- [ ] That issue was marked as [accepting prs](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22)
- [ ] Steps in [CONTRIBUTING.md](https://github.com/typescript-eslint/typescript-eslint/blob/main/CONTRIBUTING.md) were taken

## Overview

Expand Down
51 changes: 20 additions & 31 deletions .github/workflows/ci.yml
Expand Up @@ -55,11 +55,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
lint-task: [
"check-spelling",
"check-format",
"lint-markdown",
]
lint-task: ['check-spelling', 'check-format', 'lint-markdown']
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -78,10 +74,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
lint-task: [
"lint",
"typecheck",
]
lint-task: ['lint', 'typecheck']
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -122,18 +115,19 @@ jobs:
matrix:
# just run on the oldest and latest supported versions and assume the intermediate versions are good
node-version: [12, 18]
package: [
"ast-spec",
"eslint-plugin",
"eslint-plugin-internal",
"eslint-plugin-tslint",
"parser",
"scope-manager",
"type-utils",
"typescript-estree",
"utils",
"visitor-keys",
]
package:
[
'ast-spec',
'eslint-plugin',
'eslint-plugin-internal',
'eslint-plugin-tslint',
'parser',
'scope-manager',
'type-utils',
'typescript-estree',
'utils',
'visitor-keys',
]
env:
# Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app
NX_CLOUD_ENV_NAME: 'Node ${{ matrix.node-version }} -'
Expand Down Expand Up @@ -194,7 +188,9 @@ jobs:
- name: Install Cypress
run: yarn cypress install

- name: Cypress run
- env:
DEBUG: '@cypress/github-action'
name: Cypress run
uses: cypress-io/github-action@v2
with:
project: ./packages/website
Expand Down Expand Up @@ -228,17 +224,10 @@ jobs:
flags: unittest
name: codecov


publish_canary_version:
name: Publish the latest code as a canary version
runs-on: ubuntu-latest
needs:
[
integration_tests,
lint_with_build,
lint_without_build,
unit_tests,
]
needs: [integration_tests, lint_with_build, lint_without_build, unit_tests]
if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main'
steps:
- name: Checkout
Expand All @@ -247,7 +236,7 @@ jobs:
uses: ./.github/actions/prepare-install
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
registry-url: "https://registry.npmjs.org"
registry-url: 'https://registry.npmjs.org'
- name: Build
uses: ./.github/actions/prepare-build

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/lock.yml
@@ -1,8 +1,8 @@
name: "Lock threads"
name: 'Lock threads'

on:
schedule:
- cron: "0 0 * * *"
- cron: '0 0 * * *'

jobs:
lock:
Expand All @@ -11,9 +11,9 @@ jobs:
- uses: dessant/lock-threads@v3
with:
github-token: ${{ github.token }}
issue-inactive-days: "30"
issue-lock-reason: "resolved"
issue-comment: ""
pr-inactive-days: "30"
pr-lock-reason: "resolved"
pr-comment: ""
issue-inactive-days: '30'
issue-lock-reason: 'resolved'
issue-comment: ''
pr-inactive-days: '30'
pr-lock-reason: 'resolved'
pr-comment: ''
8 changes: 0 additions & 8 deletions .prettierignore
Expand Up @@ -8,18 +8,10 @@
**/.nyc_output
**/.vs
packages/eslint-plugin-tslint/tests/test-tslint-rules-directory/alwaysFailRule.js
.github
packages/eslint-plugin/src/configs/*.json
.all-contributorsrc
CONTRIBUTORS.md
packages/ast-spec/src/*/*/fixtures/_error_/*/fixture.ts

# Syntax not yet supported
packages/scope-manager/tests/fixtures/type-declaration/type-query-with-parameters.ts
packages/scope-manager/tests/fixtures/type-declaration/infer-type-constraint.ts
packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments1.ts
packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments2.ts

# Ignore CHANGELOG.md files to avoid issues with automated release job
CHANGELOG.md

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

## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15)


### Bug Fixes

* missing placeholders in violation messages for `no-unnecessary-type-constraint` and `no-unsafe-argument` (and enable `eslint-plugin/recommended` rules internally) ([#5453](https://github.com/typescript-eslint/typescript-eslint/issues/5453)) ([d023910](https://github.com/typescript-eslint/typescript-eslint/commit/d0239104f4dbffd2b5ecdb19e520c7d4b71962e0))





# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08)


### Bug Fixes

* **eslint-plugin:** [no-extra-parens] handle await with type assertion ([#5428](https://github.com/typescript-eslint/typescript-eslint/issues/5428)) ([e03826f](https://github.com/typescript-eslint/typescript-eslint/commit/e03826f08ce8bfdd6d6702025d975cfb7d867097))
* **website:** add explicit frontmatter description to rule docs ([#5429](https://github.com/typescript-eslint/typescript-eslint/issues/5429)) ([63cba5f](https://github.com/typescript-eslint/typescript-eslint/commit/63cba5f4c1884e102927b3b14b18a00e96ac63a1))


### Features

* **eslint-plugin:** [member-ordering] support static blocks ([#5417](https://github.com/typescript-eslint/typescript-eslint/issues/5417)) ([5983e5a](https://github.com/typescript-eslint/typescript-eslint/commit/5983e5ab3bfb94fec782bea54a37457fe31db545))
* **eslint-plugin:** [prefer-as-const] adds support for class properties ([#5413](https://github.com/typescript-eslint/typescript-eslint/issues/5413)) ([d2394f8](https://github.com/typescript-eslint/typescript-eslint/commit/d2394f810960fda07b9c8affd47b769d16f4b8cb))





# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01)


Expand Down

0 comments on commit 1f35a88

Please sign in to comment.