Skip to content

Commit 04f1938

Browse files
Merge branch 'main'
2 parents b1c92d4 + af47bc9 commit 04f1938

19 files changed

+157
-112
lines changed

docs/users/Shared_Configurations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ Additionally, it enables rules that promote using the more modern constructs Typ
375375
```js title="eslint.config.js"
376376
export default tseslint.config(
377377
eslint.configs.recommended,
378-
...tseslint.configs.eslintRecommended,
378+
tseslint.configs.eslintRecommended,
379379
);
380380
```
381381

packages/eslint-plugin/docs/rules/consistent-type-imports.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,5 @@ We recommend picking a single option for this rule that works best for your proj
132132
## Related To
133133

134134
- [`no-import-type-side-effects`](./no-import-type-side-effects.mdx)
135-
- [`import/consistent-type-specifier-style`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.mdx)
135+
- [`import/consistent-type-specifier-style`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.md)
136136
- [`import/no-duplicates` with `{"prefer-inline": true}`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md#inline-type-imports)

packages/eslint-plugin/docs/rules/no-duplicate-imports.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:::danger Deprecated
22

3-
This rule has been deprecated in favour of the [`import/no-duplicates`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/no-duplicates.mdx) rule.
3+
This rule has been deprecated in favour of the [`import/no-duplicates`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/no-duplicates.md) rule.
44

55
:::
66

packages/eslint-plugin/docs/rules/no-floating-promises.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Valid ways of handling a Promise-valued statement include:
2222

2323
This rule also reports when an Array containing Promises is created and not properly handled. The main way to resolve this is by using one of the Promise concurrency methods to create a single Promise, then handling that according to the procedure above. These methods include:
2424

25-
- `Promise.all()`,
26-
- `Promise.allSettled()`,
25+
- `Promise.all()`
26+
- `Promise.allSettled()`
2727
- `Promise.any()`
2828
- `Promise.race()`
2929

packages/eslint-plugin/docs/rules/no-import-type-side-effects.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ If you're not using TypeScript 5.0's `verbatimModuleSyntax` option and your proj
7676
## Related To
7777

7878
- [`consistent-type-imports`](./consistent-type-imports.mdx)
79-
- [`import/consistent-type-specifier-style`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.mdx)
79+
- [`import/consistent-type-specifier-style`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.md)
8080
- [`import/no-duplicates` with `{"prefer-inline": true}`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md#inline-type-imports)

packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ if (someNullCondition !== false) {
114114

115115
```ts option='{ "allowComparingNullableBooleansToFalse": false }'
116116
declare const someUndefinedCondition: boolean | undefined;
117-
if (someUndefinedCondition ?? true) {
117+
if (!(someUndefinedCondition ?? true)) {
118118
}
119119

120120
declare const someNullCondition: boolean | null;
121-
if (!(someNullCondition ?? true)) {
121+
if (someNullCondition ?? true) {
122122
}
123123
```
124124

@@ -127,16 +127,16 @@ if (!(someNullCondition ?? true)) {
127127

128128
## Fixer
129129

130-
| Comparison | Fixer Output | Notes |
131-
| :-------------------------------: | ------------------------------- | ----------------------------------------------------------------------------------- |
132-
| `booleanVar === true` | `booleanVar` | |
133-
| `booleanVar !== true` | `!booleanVar` | |
134-
| `booleanVar === false` | `!booleanVar` | |
135-
| `booleanVar !== false` | `booleanVar` | |
136-
| `nullableBooleanVar === true` | `nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` |
137-
| `nullableBooleanVar !== true` | `!nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` |
138-
| `!(nullableBooleanVar === false)` | `nullableBooleanVar ?? true` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` |
139-
| `!(nullableBooleanVar !== false)` | `!(nullableBooleanVar ?? true)` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` |
130+
| Comparison | Fixer Output | Notes |
131+
| :----------------------------: | ------------------------------- | ----------------------------------------------------------------------------------- |
132+
| `booleanVar === true` | `booleanVar` | |
133+
| `booleanVar !== true` | `!booleanVar` | |
134+
| `booleanVar === false` | `!booleanVar` | |
135+
| `booleanVar !== false` | `booleanVar` | |
136+
| `nullableBooleanVar === true` | `nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` |
137+
| `nullableBooleanVar !== true` | `!nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` |
138+
| `nullableBooleanVar === false` | `!(nullableBooleanVar ?? true)` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` |
139+
| `nullableBooleanVar !== false` | `nullableBooleanVar ?? true` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` |
140140

141141
## When Not To Use It
142142

packages/eslint-plugin/docs/rules/unbound-method.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Otherwise, passing class methods around as values can remove type safety by fail
1616
This rule reports when a class method is referenced in an unbound manner.
1717

1818
:::note Tip
19-
If you're working with `jest`, you can use [`eslint-plugin-jest`'s version of this rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.mdx) to lint your test files, which knows when it's ok to pass an unbound method to `expect` calls.
19+
If you're working with `jest`, you can use [`eslint-plugin-jest`'s version of this rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md) to lint your test files, which knows when it's ok to pass an unbound method to `expect` calls.
2020
:::
2121

2222
## Examples

packages/eslint-plugin/tests/docs-eslint-output-snapshots/no-unnecessary-boolean-literal-compare.shot

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/eslint-plugin/tests/docs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ describe('Validating rule metadata', () => {
473473
describe(ruleName, () => {
474474
it('`name` field in rule must match the filename', () => {
475475
// validate if rule name is same as url
476-
// there is no way to access this field but its used only in generation of docs url
476+
// there is no way to access this field but it's used only in generation of docs url
477477
expect(rule.meta.docs?.url).toBe(
478478
`https://typescript-eslint.io/rules/${ruleName}`,
479479
);

packages/typescript-estree/src/create-program/createProjectProgram.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ function createProjectProgram(
4747
parseSettings.filePath,
4848
parseSettings.tsconfigRootDir,
4949
);
50-
const relativeProjects = parseSettings.projects.map(describeProjectFilePath);
50+
const relativeProjects = Array.from(parseSettings.projects.values()).map(
51+
describeProjectFilePath,
52+
);
5153
const describedPrograms =
5254
relativeProjects.length === 1
5355
? relativeProjects[0]
@@ -92,7 +94,7 @@ function createProjectProgram(
9294

9395
if (!hasMatchedAnError) {
9496
const [describedInclusions, describedSpecifiers] =
95-
parseSettings.projects.length === 1
97+
parseSettings.projects.size === 1
9698
? ['that TSConfig does not', 'that TSConfig']
9799
: ['none of those TSConfigs', 'one of those TSConfigs'];
98100
errorLines.push(

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy