Skip to content
Permalink
Browse files

build: Update TypeScript, use @typescript-eslint (#17251)

* build: Update TypeScript to v3.3

* build: Update TypeScript, use @typescript-eslint
  • Loading branch information...
felixrieseberg authored and MarshallOfSound committed Mar 7, 2019
1 parent 8c4d643 commit 5581990d78e3601c00775dcbdcc48ca94d898015
@@ -1,21 +1,33 @@
{
"extends": "standard",
"parser": "typescript-eslint-parser",
"plugins": ["typescript"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"env": {
"browser": true
},
"rules": {
"no-var": "error",
"no-unused-vars": 0,
"no-global-assign": 0,
"typescript/no-unused-vars": "error",
"@typescript-eslint/no-unused-vars": ["error", {
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}],
"prefer-const": ["error", {
"destructuring": "all"
}]
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
}
},
"overrides": [
{
"files": "*.js",
"rules": {
"@typescript-eslint/no-unused-vars": "off"
}
}
]
}

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -6,8 +6,9 @@ contentTracing.getCategories = deprecate.promisify(contentTracing.getCategories)
contentTracing.startRecording = deprecate.promisify(contentTracing.startRecording)
contentTracing.stopRecording = deprecate.promisify(contentTracing.stopRecording)
contentTracing.getTraceBufferUsage = deprecate.promisifyMultiArg(
contentTracing.getTraceBufferUsage,
(value) => [value.paths, value.bookmarks]
contentTracing.getTraceBufferUsage
// convertPromiseValue: Temporarily disabled until it's used
/* (value) => [value.paths, value.bookmarks] */
)

module.exports = contentTracing
@@ -5,7 +5,7 @@ const protocol = process.atomBinding('protocol')

// Fallback protocol APIs of default session.
Object.setPrototypeOf(protocol, new Proxy({}, {
get (target, property) {
get (_target, property) {
if (!app.isReady()) return

const protocol = session.defaultSession!.protocol
@@ -21,7 +21,7 @@ Object.setPrototypeOf(protocol, new Proxy({}, {
return Object.getOwnPropertyNames(Object.getPrototypeOf(session.defaultSession!.protocol))
},

getOwnPropertyDescriptor (target) {
getOwnPropertyDescriptor () {
return { configurable: true, enumerable: true }
}
}))
@@ -102,7 +102,8 @@ const deprecate: ElectronInternal.DeprecationUtil = {
} as T
},

promisifyMultiArg: <T extends (...args: any[]) => any>(fn: T, convertPromiseValue: (v: any) => any): T => {
// convertPromiseValue: Temporarily disabled until it's used
promisifyMultiArg: <T extends (...args: any[]) => any>(fn: T /* convertPromiseValue: (v: any) => any */): T => {
const fnName = fn.name || 'function'
const oldName = `${fnName} with callbacks`
const newName = `${fnName} with Promises`

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 5581990

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.