Skip to content

Commit

Permalink
Merge branch 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed May 15, 2022
2 parents 3bebc55 + 8e72bf1 commit 3e8ed85
Show file tree
Hide file tree
Showing 495 changed files with 22,436 additions and 4,732 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Expand Up @@ -64,6 +64,7 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/unbound-method': 'off',
Expand Down
80 changes: 4 additions & 76 deletions .github/ISSUE_TEMPLATE.md
@@ -1,79 +1,7 @@
---
name: catch-all template
about: Provides some general structure to issues that people choose to log outside the normal flow
title: ''
labels: triage
assignees: ''
---
# You must use one of our issue templates to file an issue.

<!--
Please don't ignore this template.
# [https://github.com/typescript-eslint/typescript-eslint/issues/new/choose](https://github.com/typescript-eslint/typescript-eslint/issues/new/choose)

If you ignore it, we're just going to respond asking you to fill it out, which wastes everyone's time.
The more relevant information you can include, the faster we can find the issue and fix it without asking you for more info.
-->
# Issues filed without using a template will be closed without action, and we will ask you to use a template.

- [ ] 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://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.

**Repro**

<!--
Include a ***minimal*** reproduction case.
The more irrelevant code/config you give, the harder it is for us to investigate.
Please consider creating an isolated reproduction repo to make it easy for the volunteer maintainers debug your issue.
-->

```JSON
{
"rules": {
"@typescript-eslint/<rule>": ["<setting>"]
}
}
```

```TS
// your repro code case
```

<!--
Also include your tsconfig, if you're using type-aware linting
-->

**Expected Result**

<!--
What did you expect to happen?
Please be specific here - list the exact lines and messages you expect.
-->

**Actual Result**

<!--
What actually happened?
Please be specific here - list the exact lines and messages that caused errors
-->

**Additional Info**

<!--
Did eslint throw an exception?
Please run your lint again with the --debug flag, and dump the output below.
i.e. eslint --ext ".ts,.js" src --debug
-->

**Versions**

| package | version |
| -------------------------------------- | ------- |
| `@typescript-eslint/eslint-plugin` | `X.Y.Z` |
| `@typescript-eslint/parser` | `X.Y.Z` |
| `@typescript-eslint/typescript-estree` | `X.Y.Z` |
| `@typescript-eslint/type-utils` | `X.Y.Z` |
| `@typescript-eslint/utils` | `X.Y.Z` |
| `TypeScript` | `X.Y.Z` |
| `node` | `X.Y.Z` |
| `npm` | `X.Y.Z` |
## [https://github.com/typescript-eslint/typescript-eslint/issues/new/choose](https://github.com/typescript-eslint/typescript-eslint/issues/new/choose)
107 changes: 107 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report-plugin.yaml
@@ -0,0 +1,107 @@
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"
- triage
body:
- type: checkboxes
id: sanity-checks
attributes:
label: Before You File a Bug Report Please Confirm You Have Done The Following...
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
options:
- label: I have tried restarting my IDE and the issue persists.
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.
required: true
- label: I have [read the FAQ](https://typescript-eslint.io/docs/linting/troubleshooting) and my problem is not listed.
required: true
- type: input
id: playground-link
attributes:
label: Playground Link
description: |
Link to an isolated reproduction [in our online playground](https://typescript-eslint.io/play/).
If either of the following holds true:
- You can't reproduce the issue in the playground
- Your issue requires some complex setup - such as multiple files or a specific folder structure.
***Please do not use this template.*** Instead, select the
["Report a complex bug you encountered by providing an isolated reproduction repository" template](https://github.com/typescript-eslint/typescript-eslint/issues/new?template=7-bug-report-complex.yaml).
placeholder: https://typescript-eslint.io/play/...
validations:
required: true
- type: textarea
id: repro-code
attributes:
label: Repro Code
description: A ***minimal*** code sample which reproduces the issue
render: typescript
validations:
required: true
- type: textarea
id: eslint-config
attributes:
label: ESLint Config
description: A ***minimal*** ESLint config for reproducing the issue
render: javascript
value: |
module.exports = {
parser: "@typescript-eslint/parser",
rules: {
"@typescript-eslint/<rule-name>": ["error", ...<options>],
},
};
validations:
required: true
- type: textarea
id: typescript-config
attributes:
label: tsconfig
description: (Optional) A ***minimal*** tsconfig for reproducing the issue, if you're using type-aware linting
render: jsonc
value: |
{
"compilerOptions": {
// ...
}
}
- type: textarea
id: expected
attributes:
label: Expected Result
description: What did you expect to happen? Please be specific here - list the exact lines and messages you expect.
placeholder: I expected that the 3rd line should report the error "foo bar"...
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual Result
description: What actually happened? Please be specific here - list the exact lines and messages that caused errors.
placeholder: There was no error on the 3rd line...
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional Info
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 --ext ".ts,.js" src --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
68 changes: 68 additions & 0 deletions .github/ISSUE_TEMPLATE/2-enhancement-rule-option.yaml
@@ -0,0 +1,68 @@
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"
- triage
body:
- type: checkboxes
id: sanity-checks
attributes:
label: Before You File a Proposal Please Confirm You Have Done The Following...
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
options:
- label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3A%22enhancement%3A+plugin+rule+option%22) and found none that match my proposal.
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.
required: true
- type: checkboxes
id: rule-fits-the-brief
attributes:
label: My proposal is suitable for this project
options:
- label: I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
required: true
- type: input
id: base-rule
attributes:
label: Link to the rule's documentation
description: Please provide the link to the rule's documentation
placeholder: https://typescript-eslint.io/rules/...
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: Explain what your proposal would do and why this is useful.
placeholder: I propose that the foo rule should also check for when bars are force to be a baz.
validations:
required: true
- type: textarea
id: fail-cases
attributes:
label: Fail
description: Specify an example of code that should be detected and errored on.
render: typescript
value: |
var replace = 'me';
validations:
required: true
- type: textarea
id: pass-cases
attributes:
label: Pass
description: Specify an example of code that would be accepted in its place
render: typescript
value: |
const replace = 'me';
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional Info
description: Any additional info you'd like to provide.
70 changes: 70 additions & 0 deletions .github/ISSUE_TEMPLATE/3-enhancement-new-rule.yaml
@@ -0,0 +1,70 @@
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"
- triage
body:
- type: checkboxes
id: sanity-checks
attributes:
label: Before You File a Proposal Please Confirm You Have Done The Following...
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
options:
- label: I have [searched for related issues](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aissue+label%3A%22enhancement%3A+new+plugin+rule%22) and found none that match my proposal.
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.
required: true
- type: checkboxes
id: rule-fits-the-brief
attributes:
label: My proposal is suitable for this project
options:
- label: My proposal specifically checks TypeScript syntax, or it proposes a check that requires type information to be accurate.
required: true
- label: My proposal is not a "formatting rule"; meaning it does not just enforce how code is formatted (whitespace, brace placement, etc).
required: true
- label: I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
required: true
- type: markdown
id: suggestion-go-elsewhere
attributes:
value: |
If you answered no to one or more of the above, then your rule *likely* doesn't belong in this project, and will *likely* be rejected.
That doesn't mean your proposal isn't useful! It just means you should consider either proposing it to another project (like [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)), or publishing it in a new plugin.
- type: textarea
id: description
attributes:
label: Description
description: Explain what your proposed rule would do and why this is useful.
placeholder: My rule would check that things of type foo are not assigned to bars.
validations:
required: true
- type: textarea
id: fail-cases
attributes:
label: Fail Cases
description: Specify an example of code that should be detected and errored on.
render: typescript
value: |
var replace = 'me';
validations:
required: true
- type: textarea
id: pass-cases
attributes:
label: Pass Cases
description: Specify an example of code that would be accepted in its place
render: typescript
value: |
const replace = 'me';
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional Info
description: Any additional info you'd like to provide.

0 comments on commit 3e8ed85

Please sign in to comment.