X Tutup
Skip to content

Commit 5581990

Browse files
felixriesebergMarshallOfSound
authored andcommitted
build: Update TypeScript, use @typescript-eslint (electron#17251)
* build: Update TypeScript to v3.3 * build: Update TypeScript, use @typescript-eslint
1 parent 8c4d643 commit 5581990

File tree

10 files changed

+104
-92
lines changed

10 files changed

+104
-92
lines changed

.eslintrc.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
{
22
"extends": "standard",
3-
"parser": "typescript-eslint-parser",
4-
"plugins": ["typescript"],
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint"],
55
"env": {
66
"browser": true
77
},
88
"rules": {
99
"no-var": "error",
1010
"no-unused-vars": 0,
1111
"no-global-assign": 0,
12-
"typescript/no-unused-vars": "error",
12+
"@typescript-eslint/no-unused-vars": ["error", {
13+
"vars": "all",
14+
"args": "after-used",
15+
"ignoreRestSiblings": false
16+
}],
1317
"prefer-const": ["error", {
1418
"destructuring": "all"
1519
}]
1620
},
1721
"parserOptions": {
1822
"ecmaVersion": 6,
1923
"sourceType": "module"
20-
}
24+
},
25+
"overrides": [
26+
{
27+
"files": "*.js",
28+
"rules": {
29+
"@typescript-eslint/no-unused-vars": "off"
30+
}
31+
}
32+
]
2133
}

default_app/.eslintrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

lib/.eslintrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

lib/browser/api/content-tracing.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ contentTracing.getCategories = deprecate.promisify(contentTracing.getCategories)
66
contentTracing.startRecording = deprecate.promisify(contentTracing.startRecording)
77
contentTracing.stopRecording = deprecate.promisify(contentTracing.stopRecording)
88
contentTracing.getTraceBufferUsage = deprecate.promisifyMultiArg(
9-
contentTracing.getTraceBufferUsage,
10-
(value) => [value.paths, value.bookmarks]
9+
contentTracing.getTraceBufferUsage
10+
// convertPromiseValue: Temporarily disabled until it's used
11+
/* (value) => [value.paths, value.bookmarks] */
1112
)
1213

1314
module.exports = contentTracing

lib/browser/api/protocol.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const protocol = process.atomBinding('protocol')
55

66
// Fallback protocol APIs of default session.
77
Object.setPrototypeOf(protocol, new Proxy({}, {
8-
get (target, property) {
8+
get (_target, property) {
99
if (!app.isReady()) return
1010

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

24-
getOwnPropertyDescriptor (target) {
24+
getOwnPropertyDescriptor () {
2525
return { configurable: true, enumerable: true }
2626
}
2727
}))

lib/common/api/deprecate.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ const deprecate: ElectronInternal.DeprecationUtil = {
102102
} as T
103103
},
104104

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

package-lock.json

Lines changed: 73 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
X Tutup