-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: migrate to eslint v9 and clean it up * style: manual fixes to make new eslint happy * style: apply eslint autofix * build: downgrade to TypeScript 5.6 to ensure compatability with typedoc
- Loading branch information
Showing
8 changed files
with
336 additions
and
875 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
// @ts-check | ||
|
||
import eslint from '@eslint/js' | ||
import tseslint from 'typescript-eslint' | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
tseslint.configs.recommended, | ||
// Library | ||
{ | ||
files: ['lib/**/*'], | ||
rules: { | ||
// Things we probably should fix at some point | ||
'@typescript-eslint/ban-ts-comment': 'warn', | ||
'@typescript-eslint/no-empty-object-type': 'warn', | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/no-unsafe-function-type': 'warn', | ||
'@typescript-eslint/no-unused-vars': 'warn', | ||
// Things we won't allow | ||
'@typescript-eslint/consistent-type-imports': 'error', | ||
'@typescript-eslint/no-this-alias': [ | ||
'error', | ||
{ | ||
allowDestructuring: true, // Allow `const { props, state } = this`; false by default | ||
allowedNames: ['self'], // Allow `const self = this`; `[]` by default | ||
}, | ||
], | ||
}, | ||
}, | ||
// Tests | ||
{ | ||
files: ['test/**/*'], | ||
rules: { | ||
'@typescript-eslint/no-unused-expressions': 'off', | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/ban-ts-comment': 'warn', | ||
}, | ||
} | ||
) |
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
Oops, something went wrong.