diff --git a/.eslintrc.js b/.eslintrc.js index b52c703df..c882910a6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -11,12 +11,13 @@ module.exports = { }, extends: ["eslint:recommended", "google"], rules: { - // rules we've always adhered to + // rules we've always adhered to or now do "max-len": ["error", { code: 90, ignoreComments: true, }], curly: ["error", "multi-line"], + "prefer-const": ["error"], // loosen jsdoc requirements a little "require-jsdoc": ["error", { @@ -55,7 +56,6 @@ module.exports = { "padded-blocks": ["warn"], "no-extend-native": ["warn"], "camelcase": ["warn"], - "prefer-const": ["warn"], } } diff --git a/package.json b/package.json index 26cf0ad08..e82d4c73b 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "build": "babel -s -d lib src && rimraf dist && mkdir dist && browserify --exclude olm browser-index.js -o dist/browser-matrix.js --ignore-missing && uglifyjs -c -m -o dist/browser-matrix.min.js dist/browser-matrix.js", "dist": "npm run build", "watch": "watchify --exclude olm browser-index.js -o dist/browser-matrix-dev.js -v", - "lint": "eslint --max-warnings 122 src spec", + "lint": "eslint --max-warnings 121 src spec", "prepublish": "npm run build && git rev-parse HEAD > git-revision.txt" }, "repository": { diff --git a/src/utils.js b/src/utils.js index 662dee619..66d243ece 100644 --- a/src/utils.js +++ b/src/utils.js @@ -414,7 +414,7 @@ module.exports.runPolyfills = function() { // Reference: http://es5.github.io/#x15.4.4.19 if (!Array.prototype.map) { Array.prototype.map = function(callback, thisArg) { - let T, A, k; + let T, k; if (this === null || this === undefined) { throw new TypeError(' this is null or not defined'); @@ -443,7 +443,7 @@ module.exports.runPolyfills = function() { // 6. Let A be a new array created as if by the expression new Array(len) // where Array is the standard built-in constructor with that name and // len is the value of len. - A = new Array(len); + const A = new Array(len); // 7. Let k be 0 k = 0;