Skip to content

chore: fix lint and build website errors #10288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading