Skip to content

Commit 24055b2

Browse files
committed
chore(lint): allow unused vars starting with _
This matches TypeScript's default rules (e.g. what VS Code uses).
1 parent 7784d35 commit 24055b2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.eslintrc.cjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ module.exports = {
4848
'@typescript-eslint/consistent-type-imports': 'error',
4949
'@typescript-eslint/no-floating-promises': 'error',
5050
'@typescript-eslint/no-misused-promises': 'error',
51+
'@typescript-eslint/no-unused-vars': [
52+
'error',
53+
{
54+
// TypeScript by default allows params starting with _
55+
varsIgnorePattern: /^_/.source,
56+
argsIgnorePattern: /^_/.source,
57+
caughtErrorsIgnorePattern: /^_/.source,
58+
destructuredArrayIgnorePattern: /^_/.source,
59+
},
60+
],
5161
'@typescript-eslint/ban-ts-comment': [
5262
'error',
5363
{

0 commit comments

Comments
 (0)