Skip to content

Commit c4d9739

Browse files
committed
chore: fixed linting
1 parent 0feb057 commit c4d9739

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
module.exports = {
22
extends: 'standard-with-typescript',
3+
parserOptions: {
4+
project: './tsconfig.json',
5+
},
36
env: {
47
browser: true,
58
},

packages/vue3/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function autorun<TResult = unknown> (callback: () => TResult): AutorunEff
1212
const stop = watchEffect((onInvalidate) => {
1313
const computation = Tracker.autorun(() => {
1414
let value: any = callback()
15-
if (value && typeof value.fetch === 'function') {
15+
if (value != null && typeof value.fetch === 'function') {
1616
value = value.fetch()
1717
}
1818
result.value = value
@@ -23,7 +23,7 @@ export function autorun<TResult = unknown> (callback: () => TResult): AutorunEff
2323
})
2424
return {
2525
result: computed<TResult | undefined>(() => result.value),
26-
stop
26+
stop,
2727
}
2828
}
2929

@@ -51,6 +51,6 @@ export function autoSubscribe (callback: () => [name: string, ...args: any[]]):
5151
})
5252

5353
return {
54-
stop
54+
stop,
5555
}
5656
}

packages/vue3/tsconfig.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
"esModuleInterop": true,
3333
"preserveSymlinks": true
3434
},
35-
"exclude": [
36-
"./.meteor/**",
37-
"./packages/**"
35+
"include": [
36+
"src/**/*.ts"
3837
]
3938
}

tsconfig.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"compilerOptions": {
3+
"strictNullChecks": true
4+
},
5+
"include": [
6+
"packages/*/src/**/*.ts"
7+
],
8+
"exclude": [
9+
".meteor/**"
10+
]
11+
}

0 commit comments

Comments
 (0)