Skip to content

Commit c13b6b4

Browse files
authored
chore: fix lint and build website errors (#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

+4-5
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

+2
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

+1-1
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)