Skip to content

Commit

Permalink
chore: fix lint and build website errors (#10288)
Browse files Browse the repository at this point in the history
chore: fix lint errors
  • Loading branch information
yeonjuan authored Nov 5, 2024
1 parent bce4560 commit c13b6b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 4 additions & 5 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ export default tseslint.config(
//
// our plugin :D
//

'@typescript-eslint/no-confusing-void-expression': [
'error',
{ ignoreVoidReturningFunctions: true },
],
'@typescript-eslint/ban-ts-comment': [
'error',
{
Expand All @@ -123,6 +118,10 @@ export default tseslint.config(
'ts-nocheck': true,
},
],
'@typescript-eslint/no-confusing-void-expression': [
'error',
{ ignoreVoidReturningFunctions: true },
],
// TODO: enable it once we drop support for TS<5.0
// https://github.com/typescript-eslint/typescript-eslint/issues/10065
'@typescript-eslint/consistent-type-exports': [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ console.log(void alert('Hello, world!'));

### `ignoreVoidReturningFunctions`

{/* insert option description */}

Whether to ignore returns from functions with `void` return types when inside a function with a `void` return type.

Some projects prefer allowing functions that explicitly return `void` to return `void` expressions. Doing so allows more writing more succinct functions.
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/tests/docs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ describe('Validating rule docs', () => {
const headings = tokens.filter(tokenIsH2);

headings.forEach(heading => {
const nonCodeText = heading.text.replace(/`[^`]*`/g, '');
const nonCodeText = heading.text.replaceAll(/`[^`]*`/g, '');
expect(nonCodeText).toBe(titleCase(nonCodeText));
});
});
Expand Down

0 comments on commit c13b6b4

Please sign in to comment.