Skip to content

Commit

Permalink
update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi committed Feb 16, 2023
1 parent 8dca2f1 commit a8d1e94
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ module.exports = {
'@typescript-eslint/no-dynamic-delete': 'off',
'@typescript-eslint/method-signature-style': 'off',
'@typescript-eslint/prefer-includes': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/consistent-type-imports': 'off',
'@typescript-eslint/consistent-generic-constructors': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
"@tybys/tsapi": "^0.6.0",
"@types/fs-extra": "^9.0.13",
"@types/node": "^16.11.21",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.32.0",
"eslint": "^8.21.0",
"eslint-config-standard-with-typescript": "^22.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.2.4",
"eslint-plugin-promise": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"eslint": "^8.34.0",
"eslint-config-standard-with-typescript": "^34.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-promise": "^6.1.1",
"fs-extra": "^10.1.0",
"typescript": "~4.8.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/emnapi/src/emscripten/runtime.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ declare const LibraryManager: {
library: any
}

declare function mergeInto (target: any, source: { [key: string]: any }): void
declare function mergeInto (target: any, source: Record<string, any>): void

// runtime
declare const wasmMemory: WebAssembly.Memory
Expand Down
6 changes: 3 additions & 3 deletions packages/emnapi/src/emscripten/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ function emnapiImplement (name: string, sig: string | undefined, compilerTimeFun
// emnapi_*
function emnapiImplement2 (...args: Parameters<typeof emnapiImplement>): void
function emnapiImplement2 (): void {
return emnapiImplement.apply(null, arguments as any)
emnapiImplement.apply(null, arguments as any)
}

// _emnapi_*
function emnapiImplementInternal (...args: Parameters<typeof emnapiImplement>): void
function emnapiImplementInternal (): void {
return emnapiImplement.apply(null, arguments as any)
emnapiImplement.apply(null, arguments as any)
}

// $emnapi*
function emnapiImplementHelper (name: string, sig: string | undefined, compilerTimeFunction: Function, deps?: string[], _exportName?: string): void {
return emnapiImplement(name, sig, compilerTimeFunction, deps)
emnapiImplement(name, sig, compilerTimeFunction, deps)
}

function emnapiDefineVar (name: string, value: any, deps?: string[], postset?: string): void {
Expand Down
2 changes: 1 addition & 1 deletion packages/emnapi/src/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function emnapiDefineProperty (envObject: Env, obj: object, propertyName: string
}
}

function emnapiGetHandle (js_object: napi_value): { status: napi_status; handle?: Handle<any>} {
function emnapiGetHandle (js_object: napi_value): { status: napi_status; handle?: Handle<any> } {
let handle = emnapiCtx.handleStore.get(js_object)!
if (!(handle.isObject() || handle.isFunction())) {
return { status: napi_status.napi_invalid_arg }
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/src/Context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export class Context {
}

closeScope (envObject: Env, _scope?: HandleScope): void {
return this.scopeStore.closeScope(envObject)
this.scopeStore.closeScope(envObject)
}

ensureHandle<S> (value: S): Handle<S> {
Expand Down

0 comments on commit a8d1e94

Please sign in to comment.