diff --git a/.eslintrc.json b/.eslintrc.json index aa47233f..fcce24d1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,6 +19,6 @@ "curly": "error", "eqeqeq": ["warn", "smart"], "no-var": "error", - "prefer-const": "warn" + "prefer-const": "error" } } diff --git a/lib/exclusive-canonicalization.js b/lib/exclusive-canonicalization.js index c08ec4f0..300492a5 100644 --- a/lib/exclusive-canonicalization.js +++ b/lib/exclusive-canonicalization.js @@ -192,7 +192,7 @@ ExclusiveCanonicalization.prototype.processInner = function ( let i; let pfxCopy; - let ns = this.renderNs( + const ns = this.renderNs( node, prefixesInScope, defaultNs, @@ -300,7 +300,7 @@ ExclusiveCanonicalization.prototype.process = function (node, options) { * If you have a PrefixList then use it and the ancestors to add the necessary namespaces */ if (inclusiveNamespacesPrefixList) { - let prefixList = + const prefixList = inclusiveNamespacesPrefixList instanceof Array ? inclusiveNamespacesPrefixList : inclusiveNamespacesPrefixList.split(" "); @@ -319,7 +319,7 @@ ExclusiveCanonicalization.prototype.process = function (node, options) { }); } - let res = this.processInner( + const res = this.processInner( node, [], defaultNs,