diff options
author | Maximilian Krambach <[email protected]> | 2018-08-20 13:12:01 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-08-20 13:12:01 +0000 |
commit | dd32daad0bb21e3d5567326d0b2e548ff8510431 (patch) | |
tree | bbefa811b727f1246fee17a26c9f1c4440609003 /lang/js/src/Errors.js | |
parent | js: revert changes to class read/write restriction (diff) | |
download | gpgme-dd32daad0bb21e3d5567326d0b2e548ff8510431.tar.gz gpgme-dd32daad0bb21e3d5567326d0b2e548ff8510431.zip |
js: add and apply eslint rules
--
* mainly spacing, see .eslintrc.json for details
Diffstat (limited to 'lang/js/src/Errors.js')
-rw-r--r-- | lang/js/src/Errors.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lang/js/src/Errors.js b/lang/js/src/Errors.js index 2a35bc5e..53e7bcd7 100644 --- a/lang/js/src/Errors.js +++ b/lang/js/src/Errors.js @@ -120,7 +120,7 @@ const err_list = { * @param {*} info Error message passed through if code is 'GNUPG_ERROR' * @returns {GPGME_Error} */ -export function gpgme_error(code = 'GENERIC_ERROR', info){ +export function gpgme_error (code = 'GENERIC_ERROR', info){ if (err_list.hasOwnProperty(code)){ if (err_list[code].type === 'error'){ return new GPGME_Error(code); @@ -147,9 +147,9 @@ export function gpgme_error(code = 'GENERIC_ERROR', info){ * @extends Error */ class GPGME_Error extends Error{ - constructor(code = 'GENERIC_ERROR', msg=''){ + constructor (code = 'GENERIC_ERROR', msg=''){ - if (code === 'GNUPG_ERROR' && typeof(msg) === 'string'){ + if (code === 'GNUPG_ERROR' && typeof (msg) === 'string'){ super(msg); } else if (err_list.hasOwnProperty(code)){ if (msg){ @@ -163,7 +163,7 @@ class GPGME_Error extends Error{ this._code = code; } - get code(){ + get code (){ return this._code; } }
\ No newline at end of file |