Skip to content

Commit ed1719a

Browse files
committed
Add linting and update dependencies
1 parent 7c09e7b commit ed1719a

10 files changed

+2715
-685
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
!/tsconfig-*.json
88
!/.prettierignore
99
/benchmark-*.json
10+
!eslint.config.mjs

eslint.config.mjs

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import eslint from '@eslint/js'
2+
import tseslint from 'typescript-eslint'
3+
4+
export default tseslint.config(
5+
{
6+
ignores: [
7+
'.tap/',
8+
'tap-snapshots/',
9+
'dist/',
10+
'benchmark/',
11+
'eslint.config.mjs',
12+
'map.js',
13+
],
14+
},
15+
eslint.configs.recommended,
16+
...tseslint.configs.recommended,
17+
...tseslint.configs.recommendedTypeChecked,
18+
{
19+
languageOptions: {
20+
parserOptions: {
21+
projectService: true,
22+
tsconfigRootDir: import.meta.dirname,
23+
},
24+
},
25+
},
26+
{
27+
files: ['**/test/**/*.ts'],
28+
rules: {
29+
'no-empty': 'off',
30+
'@typescript-eslint/require-await': 'off',
31+
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
32+
'@typescript-eslint/ban-ts-comment': [
33+
'error',
34+
{
35+
minimumDescriptionLength: 0,
36+
},
37+
],
38+
'@typescript-eslint/no-floating-promises': [
39+
'error',
40+
{
41+
allowForKnownSafeCalls: [
42+
'test',
43+
'rejects',
44+
'resolveMatch',
45+
'resolves',
46+
].map(name => ({
47+
name,
48+
from: 'package',
49+
package: 'tap',
50+
})),
51+
},
52+
],
53+
},
54+
},
55+
)

0 commit comments

Comments
 (0)