Skip to content

Commit

Permalink
fix: Allow async event handlers in react
Browse files Browse the repository at this point in the history
  • Loading branch information
vladcos committed Apr 9, 2024
1 parent 58d6af8 commit c8b6d55
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/includes/typescript-eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,14 @@ module.exports = defineConfig({
'@typescript-eslint/require-await': 'off',
},
},
{
files: ['*.tsx'],
rules: {
'@typescript-eslint/no-misused-promises': [
'error',
{ checksVoidReturn: { attributes: false } },
],
},
},
],
})
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// @ts-check
import '@rushstack/eslint-patch/modern-module-resolution'
import { defineConfig } from 'eslint-define-config'

// Fix eslint shareable config (https://github.com/eslint/eslint/issues/3458)
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = defineConfig({
parser: '@typescript-eslint/parser',
ignorePatterns: ['.eslintrc.js'],
Expand Down

0 comments on commit c8b6d55

Please sign in to comment.