Skip to content

Commit c13b6b4

Browse files
authored
chore: fix lint and build website errors (typescript-eslint#10288)
chore: fix lint errors
1 parent bce4560 commit c13b6b4

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

eslint.config.mjs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,6 @@ export default tseslint.config(
108108
//
109109
// our plugin :D
110110
//
111-
112-
'@typescript-eslint/no-confusing-void-expression': [
113-
'error',
114-
{ ignoreVoidReturningFunctions: true },
115-
],
116111
'@typescript-eslint/ban-ts-comment': [
117112
'error',
118113
{
@@ -123,6 +118,10 @@ export default tseslint.config(
123118
'ts-nocheck': true,
124119
},
125120
],
121+
'@typescript-eslint/no-confusing-void-expression': [
122+
'error',
123+
{ ignoreVoidReturningFunctions: true },
124+
],
126125
// TODO: enable it once we drop support for TS<5.0
127126
// https://github.com/typescript-eslint/typescript-eslint/issues/10065
128127
'@typescript-eslint/consistent-type-exports': [

packages/eslint-plugin/docs/rules/no-confusing-void-expression.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ console.log(void alert('Hello, world!'));
125125

126126
### `ignoreVoidReturningFunctions`
127127

128+
{/* insert option description */}
129+
128130
Whether to ignore returns from functions with `void` return types when inside a function with a `void` return type.
129131

130132
Some projects prefer allowing functions that explicitly return `void` to return `void` expressions. Doing so allows more writing more succinct functions.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ describe('Validating rule docs', () => {
253253
const headings = tokens.filter(tokenIsH2);
254254

255255
headings.forEach(heading => {
256-
const nonCodeText = heading.text.replace(/`[^`]*`/g, '');
256+
const nonCodeText = heading.text.replaceAll(/`[^`]*`/g, '');
257257
expect(nonCodeText).toBe(titleCase(nonCodeText));
258258
});
259259
});

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