diff --git a/asn1.js b/asn1.js index d9f12d7..d44bae6 100644 --- a/asn1.js +++ b/asn1.js @@ -13,8 +13,6 @@ // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */ -/*global oids */ (function (undefined) { "use strict"; @@ -450,4 +448,3 @@ ASN1.decode = function (stream) { // export globals if (typeof module !== 'undefined') { module.exports = ASN1; } else { window.ASN1 = ASN1; } })(); - diff --git a/base64.js b/base64.js index bafe14c..cb3663b 100644 --- a/base64.js +++ b/base64.js @@ -13,7 +13,6 @@ // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */ (function (undefined) { "use strict"; @@ -54,12 +53,12 @@ Base64.decode = function (a) { } } switch (char_count) { - case 1: + case 1: throw "Base64 encoding incomplete: at least 2 bits missing"; - case 2: + case 2: out[out.length] = (bits >> 10); break; - case 3: + case 3: out[out.length] = (bits >> 16); out[out.length] = (bits >> 8) & 0xFF; break; @@ -84,4 +83,3 @@ Base64.unarmor = function (a) { // export globals if (typeof module !== 'undefined') { module.exports = Base64; } else { window.Base64 = Base64; } })(); - diff --git a/dom.js b/dom.js index 8449646..d1c44c4 100644 --- a/dom.js +++ b/dom.js @@ -13,8 +13,7 @@ // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */ -/*global oids, ASN1 */ +/*global oids */ (function (undefined) { "use strict"; diff --git a/hex.js b/hex.js index 01cfeb6..35cb4d8 100644 --- a/hex.js +++ b/hex.js @@ -13,7 +13,6 @@ // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */ (function (undefined) { "use strict"; diff --git a/index.js b/index.js index 1b8b16e..5605dad 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,4 @@ -/*jshint browser: true, strict: true, globalstrict: true, indent: 4, immed: true, latedef: true, undef: true, regexdash: false */ -/*global Hex, Base64, ASN1 */ +/*global Hex, Base64, ASN1 */ "use strict"; var maxLength = 10240, diff --git a/int10.js b/int10.js index a717f87..b4ecf42 100644 --- a/int10.js +++ b/int10.js @@ -13,7 +13,6 @@ // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */ (function () { "use strict"; diff --git a/package.json b/package.json new file mode 100644 index 0000000..81a5d35 --- /dev/null +++ b/package.json @@ -0,0 +1,37 @@ +{ + "name": "asn1js", + "version": "1.0.0", + "description": "Generic ASN.1 parser/decoder that can decode any valid ASN.1 DER or BER structures.", + "main": "asn1.js", + "repository": { + "type": "git", + "url": "git+https://github.com/lapo-luchini/asn1js.git" + }, + "keywords": [ "asn1", "ber", "der", "pem" ], + "author": "Lapo Luchini ", + "license": "ISC", + "bugs": { "url": "https://github.com/lapo-luchini/asn1js/issues" }, + "homepage": "https://lapo.it/asn1js/", + "eslintConfig": { + "env": { + "browser": true, + "node": true + }, + "extends": [ "eslint:recommended" ], + "rules": { + "strict": [ "error", "function" ], + "indent": [ "error", 4, { "outerIIFEBody": 0 } ], + "linebreak-style": [ "error", "unix" ], + "semi": [ "warn", "always" ], + "comma-dangle": [ "error", "never" ] + }, + "overrides": [ + { + "files": [ "index.js", "test.js" ], + "rules": { + "strict": [ "error", "global" ] + } + } + ] + } +}