-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert to new flat config for eslint
- Loading branch information
Showing
5 changed files
with
37 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// @ts-check | ||
|
||
import eslint from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default [ | ||
eslint.configs.recommended, | ||
...tseslint.configs.strictTypeChecked, | ||
{ ignores: ['**/*.js'] }, | ||
{ | ||
languageOptions: { parserOptions: { projectService: true } }, | ||
rules: { | ||
'@typescript-eslint/no-confusing-void-expression': 'off', //prefer minimal arrow functions | ||
'@typescript-eslint/no-floating-promises': 'off', //annimations may be fire-and-forget | ||
'@typescript-eslint/no-misused-promises': 'off', //annimations may be fire-and-forget | ||
'@typescript-eslint/no-non-null-assertion': 'off', //ts cannot always know value exists | ||
'@typescript-eslint/restrict-template-expressions': 'off', //numbers in templates are natural | ||
'@typescript-eslint/unbound-method': 'off', //safer to not use 'this' | ||
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'off', //clarity over theoretical exceptions | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters