Skip to content

Commit

Permalink
feat(eslint-config): Reconfigure TS unused vars
Browse files Browse the repository at this point in the history
Reconfigures rules to allow `_` prefixed args to be unused.
  • Loading branch information
langri-sha committed May 18, 2024
1 parent 648ff29 commit efe0c5a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feat(eslint-config): Reconfigure TS unused vars",
"packageName": "@langri-sha/babel-test",
"email": "filip.dupanovic@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feat(eslint-config): Reconfigure TS unused vars",
"packageName": "@langri-sha/eslint-config",
"email": "filip.dupanovic@gmail.com",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion packages/babel-test/src/fixtures/babel-preset-test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ConfigAPI } from '@babel/core'

const config = (
api: ConfigAPI,
_api: ConfigAPI,
options: { foobar?: string },
): { plugins: Array<Array<unknown>> } => ({
plugins: [
Expand Down
13 changes: 13 additions & 0 deletions packages/eslint-config/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ export default [
],

// Contributing.
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],

'unicorn/no-anonymous-default-export': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-null': 'off',
Expand Down

0 comments on commit efe0c5a

Please sign in to comment.