npm run lint
to show any style issues detected by cpplint
and eslint
.path
)ipc
, app
)@
)path.join()
to concatenate filenames.os.tmpdir()
rather than /tmp
when you need to reference thereturn
when returning explicitly at the end of a function.return null
, return undefined
, null
or undefined
script/cpplint.py
to check whether all files conform.npm run lint-docs
to ensure that your documentation changes are formatted correctly.-
instead of _
, e.g.file-name.js
rather than file_name.js
, because inmodule-name
form. This rule only applies to .js
files.function () { }
+
BrowserWindow
, use PascalCase
.globalShortcut
, use camelCase
.win.webContents
, use mixedCase
.<webview> Tag
orProcess Object
..getText()
and .setText(text)
are preferred to .text([text])
. There is a discussion on this.