Skip to content

Commit

Permalink
Merge branch 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Dec 18, 2022
2 parents 4328f83 + 9e35ef9 commit 788464e
Show file tree
Hide file tree
Showing 720 changed files with 37,207 additions and 24,310 deletions.
8 changes: 6 additions & 2 deletions .cspell.json
Expand Up @@ -47,10 +47,12 @@
"autofix",
"autofixers",
"autofixes",
"automations",
"backticks",
"bigint",
"bivariant",
"blockless",
"blurple",
"camelcase",
"Cena",
"codebases",
Expand Down Expand Up @@ -101,12 +103,15 @@
"ruleset",
"rulesets",
"serializers",
"Sourcegraph",
"superset",
"thenables",
"transpiled",
"transpiles",
"transpiling",
"triaging",
"tsconfigs",
"tseslint",
"tsutils",
"tsvfs",
"typedef",
Expand All @@ -115,8 +120,7 @@
"unoptimized",
"unprefixed",
"upsert",
"Zacher",
"tseslint"
"Zacher"
],
"overrides": [
{
Expand Down
17 changes: 16 additions & 1 deletion .eslintrc.js
Expand Up @@ -257,8 +257,23 @@ module.exports = {
'./packages/eslint-plugin/src/rules/**/*.ts',
],
rules: {
'eslint-plugin/require-meta-docs-description': [
'error',
{ pattern: '^(Enforce|Require|Disallow) .+[^. ]$' },
],

// specifically for rules - default exports makes the tooling easier
'import/no-default-export': 'off',

'no-restricted-syntax': [
'error',
{
selector:
'ExportDefaultDeclaration Property[key.name="create"] MemberExpression[object.name="context"][property.name="options"]',
message:
"Retrieve options from create's second parameter so that defaultOptions are applied.",
},
],
},
},
// plugin rule tests
Expand Down Expand Up @@ -308,7 +323,7 @@ module.exports = {
rules: {
// disallow ALL unused vars
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/sort-type-union-intersection-members': 'error',
'@typescript-eslint/sort-type-constituents': 'error',
},
},
{
Expand Down
24 changes: 24 additions & 0 deletions .github/DISCUSSION_TEMPLATE/rfcs.yml
@@ -0,0 +1,24 @@
body:
- attributes:
label: RFC
value: |
Suggested changes...
id: rfc
type: textarea
- attributes:
label: Additional Info
value: |
Any additional info...
id: additional
type: textarea
- attributes:
label: Before you submit your RFC, please confirm the following. If any of these required steps are not taken, we may not be able to review your RFC. Help us to help you!
options:
- label: I have [searched for related discussions](https://github.com/typescript-eslint/typescript-eslint/discussions) and [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues) and found none that match my proposal.
required: true
- label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed.
required: true
id: required-checks
type: checkboxes
labels: ['rfc']
title: Your Title Here
18 changes: 2 additions & 16 deletions .github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml
Expand Up @@ -16,9 +16,9 @@ body:
required: true
- label: I have updated to the latest version of the packages.
required: true
- label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3Abug+label%3A%22package%3A+eslint-plugin%22) and found none that matched my issue.
- label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3A%22package%3A+eslint-plugin%22) and found none that matched my issue.
required: true
- label: I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.
- label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed.
required: true
- type: input
id: playground-link
Expand Down Expand Up @@ -98,17 +98,3 @@ body:
description: |
Any additional info you'd like to provide.
If ESLint threw an exception, please run your lint again with the `--debug` flag, and dump the output below. e.g. `eslint path/to/broken/file.ts --debug`
- type: textarea
id: versions
attributes:
label: Versions
value: |
| package | version |
| -------------------------------------- | ------- |
| `@typescript-eslint/eslint-plugin` | `X.Y.Z` |
| `@typescript-eslint/parser` | `X.Y.Z` |
| `TypeScript` | `X.Y.Z` |
| `ESLint` | `X.Y.Z` |
| `node` | `X.Y.Z` |
validations:
required: true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml
Expand Up @@ -16,7 +16,7 @@ body:
required: true
- label: I have searched the [current rule list](https://typescript-eslint.io/rules/#supported-rules) and found no rules that match my proposal.
required: true
- label: I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.
- label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed.
required: true
- type: checkboxes
id: rule-fits-the-brief
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml
Expand Up @@ -16,7 +16,7 @@ body:
required: true
- label: I have searched the [current rule list](https://typescript-eslint.io/rules/#supported-rules) and found no rules that match my proposal.
required: true
- label: I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.
- label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed.
required: true
- type: checkboxes
id: rule-fits-the-brief
Expand Down
Expand Up @@ -23,7 +23,7 @@ body:
required: true
- label: I have searched the [current extension rule list](https://typescript-eslint.io/rules/#extension-rules) and found no rules that match my proposal.
required: true
- label: I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.
- label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed.
required: true
- type: checkboxes
id: rule-fits-the-brief
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/05-documentation-request.yml
Expand Up @@ -12,7 +12,7 @@ body:
options:
- label: I have looked for existing [open or closed documentation requests](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3Adocumentation) that match my proposal.
required: true
- label: I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.
- label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed.
required: true
- type: markdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/06-bug-report-other.yaml
Expand Up @@ -17,7 +17,7 @@ body:
required: true
- label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3Abug) and found none that matched my issue.
required: true
- label: I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.
- label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed.
required: true
- type: markdown
id: complexity-note
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/07-enhancement-other.yaml
Expand Up @@ -15,7 +15,7 @@ body:
required: true
- label: I have searched the [current rule list](https://typescript-eslint.io/rules/#supported-rules) and found no rules that match my proposal.
required: true
- label: I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.
- label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed.
required: true
- type: dropdown
id: package
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/08-bug-report-complex.yaml
Expand Up @@ -22,7 +22,7 @@ body:
required: true
- label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3Abug) and found none that matched my issue.
required: true
- label: I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.
- label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed.
required: true
- type: textarea
id: description
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/09-config-change.yaml
Expand Up @@ -14,7 +14,7 @@ body:
options:
- label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3A%22preset+config+change%22+) and found none that match my proposal.
required: true
- label: I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.
- label: I have [read the FAQ](https://typescript-eslint.io/linting/troubleshooting) and my problem is not listed.
required: true
- type: textarea
id: description
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Expand Up @@ -2,7 +2,7 @@ blank_issues_enabled: false
contact_links:
- name: FAQ
about: Please check out our FAQ before filing new issues
url: https://typescript-eslint.io/docs/linting/troubleshooting
url: https://typescript-eslint.io/linting/troubleshooting
- name: Getting Started Guide
about: If you're looking for help setting up check out our getting started guide
url: https://typescript-eslint.io/docs/
url: https://typescript-eslint.io
12 changes: 12 additions & 0 deletions .github/SECURITY.md
@@ -0,0 +1,12 @@
# Security Policy

The typescript-eslint team and community take all security vulnerabilities seriously.
If you have a vulnerability or other security issues to disclose:

- Thank you very much, please do!
- Please send them to us by emailing `typescripteslint@gmail.com`

We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.

> We also adhere to the [Tidelift security process](https://support.tidelift.com/hc/en-us/articles/4406287910036-Security-process).
> See https://tidelift.com/security.
53 changes: 53 additions & 0 deletions .github/SPONSORSHIPS.md
@@ -0,0 +1,53 @@
# Sponsorship

typescript-eslint is an entirely volunteer-run project.
We are not associated with any company or organization; our development is funded solely from community donations.

## Why Sponsor typescript-eslint?

Our tooling is used by the vast majority of TypeScript applications today, including nearly 10,000 dependent projects and 20 million weekly downloads on npm.
Our packages enable both ESLint and Prettier to run on TypeScript code.
We additionally provide a comprehensive suite of TypeScript-focused ESLint rules that, by enabling access to TypeScript's type checking APIs, can detect classifications of application bugs more advanced than ESLint alone can.
Sponsoring typescript-eslint helps keep our development process running reliably, which in turn directly allows us to:

- Support new versions of TypeScript sooner after their release
- Continue improving our documentation and first-run experiences
- Fix bugs and add new features to existing rules
- Write more advanced rules to solve more areas of application correctness

### Sponsorship Benefits

In addition to benefitting the TypeScript ecosystem, sponsoring us on Open Collective helps promote your company and development brand.
Our top sponsors may have their link, logo, and/or name featured on the homepage of [typescript-eslint.io](https://typescript-eslint.io).

At present, sponsors must have given at least $100 to be featured on the homepage.
Placement tiers are based on total donations:

- Platinum sponsors: Top 6 donators
- Gold supporters: The next 10 donators
- Silver supporters: The next 18 donators

You can always view all financial contributors on [opencollective.com/typescript-eslint](https://opencollective.com/typescript-eslint).

> Got an idea for how to make sponsorship work for you?
> Let us know at `typescripteslint@gmail.com`!
## Sponsorship Limitations

### Project Direction

typescript-eslint is always appreciative of organizations sponsoring the project.
However, we do not factor sponsorship amounts into issue prioritization or pull request reviews.
If you have a need to push forward an area of work in typescript-eslint more urgently than a general donation can provide, consider donating engineering time as well.

### Website Placement

We are inclusive by default and allow all organizations that newly meet a monetary threshold to be added.
However, at our discretion, we may remove organizations we feel we cannot promote in good conscience.
Organizations would most commonly be removed if their core charter and/or repeated organization-wide intentional activities:

- Deny fundamental human rights
- Repeatedly spread large-scale harmful misinformation online
- Finance and/or promote other organizations that match these issues

If you disagree with a choice made by the maintenance team, or would like a refund for your sponsorship, please let us know by emailing `typescripteslint@gmail.com`.
23 changes: 18 additions & 5 deletions .github/actions/prepare-install/action.yml
@@ -1,12 +1,24 @@
name: 'Prepare: Checkout and Install'
description: 'Prepares the repo for a job by checking out and installing dependencies'
# IMPORTANT NOTE TO MAINTAINERS
#
# Changes to this composite action should be carefully considered and reviewed because it is referenced
# and executed by multiple workflows in our private-automations repository.
#
# Ensure that a member of @typescript-eslint/core-team tests changes there before merging.

name: 'Prepare: Install'
description: 'Prepares the repo by installing dependencies'
inputs:
node-version:
description: 'The node version to setup'
required: true
registry-url:
description: 'Define registry-url'
required: false
# NOTE: This is required for our use-case of sharing this action across multiple repos
working-directory:
description: 'Override the working directory to run the installation in'
required: false
default: '.'

# outputs: - no outputs

Expand All @@ -15,6 +27,7 @@ runs:
steps:
- name: echo github.ref
shell: bash
working-directory: ${{ inputs.working-directory }}
run: echo ${{ github.ref }}

- name: Use Node.js ${{ inputs.node-version }}
Expand All @@ -26,21 +39,21 @@ runs:
- name: Get yarn cache directory path
shell: bash
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV

- uses: actions/cache@v3
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
~/.cache/Cypress
${{ env.yarn_cache_dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# if the cache was hit - this will run in <1s
- name: Install dependencies
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
yarn --ignore-engines --frozen-lockfile --ignore-scripts
yarn check-clean-workspace-after-install
Expand Down
19 changes: 0 additions & 19 deletions .github/dependabot.yml

This file was deleted.

0 comments on commit 788464e

Please sign in to comment.