Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9066e4b

Browse files
Merge branch 'main' into cios-in
2 parentse0e68c2 +c13b6b4 commit9066e4b

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
constheadings=tokens.filter(tokenIsH2);
254254

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp