Skip to content

Commit

Permalink
Add linting and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Oct 10, 2024
1 parent b4577e4 commit d1a59d7
Show file tree
Hide file tree
Showing 10 changed files with 2,715 additions and 685 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
!/tsconfig-*.json
!/.prettierignore
/benchmark-*.json
!eslint.config.mjs
55 changes: 55 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'

export default tseslint.config(
{
ignores: [
'.tap/',
'tap-snapshots/',
'dist/',
'benchmark/',
'eslint.config.mjs',
'map.js',
],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ['**/test/**/*.ts'],
rules: {
'no-empty': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
minimumDescriptionLength: 0,
},
],
'@typescript-eslint/no-floating-promises': [
'error',
{
allowForKnownSafeCalls: [
'test',
'rejects',
'resolveMatch',
'resolves',
].map(name => ({
name,
from: 'package',
package: 'tap',
})),
},
],
},
},
)
Loading

0 comments on commit d1a59d7

Please sign in to comment.