Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce eslint no-unused-vars #322

Merged
merged 1 commit into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"extends": ["eslint:recommended", "prettier"],
"rules": {
"no-console": "error",
"no-unused-vars": "warn",
"no-unused-vars": "error",
"no-prototype-builtins": "error",
"one-var": ["error", "never"],
"no-duplicate-imports": "error",
Expand Down
4 changes: 2 additions & 2 deletions lib/c14n-canonicalization.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class C14nCanonicalization {
return attr1.localeCompare(attr2);
}

renderAttrs(node, defaultNS) {
renderAttrs(node) {
let i;
let attr;
const attrListToRender = [];
Expand Down Expand Up @@ -171,7 +171,7 @@ class C14nCanonicalization {
defaultNsForPrefix,
ancestorNamespaces
);
const res = ["<", node.tagName, ns.rendered, this.renderAttrs(node, ns.newDefaultNs), ">"];
const res = ["<", node.tagName, ns.rendered, this.renderAttrs(node), ">"];

for (i = 0; i < node.childNodes.length; ++i) {
pfxCopy = prefixesInScope.slice(0);
Expand Down
4 changes: 2 additions & 2 deletions lib/exclusive-canonicalization.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ExclusiveCanonicalization {
return attr1.localeCompare(attr2);
}

renderAttrs(node, defaultNS) {
renderAttrs(node) {
let i;
let attr;
const res = [];
Expand Down Expand Up @@ -183,7 +183,7 @@ class ExclusiveCanonicalization {
defaultNsForPrefix,
inclusiveNamespacesPrefixList
);
const res = ["<", node.tagName, ns.rendered, this.renderAttrs(node, ns.newDefaultNs), ">"];
const res = ["<", node.tagName, ns.rendered, this.renderAttrs(node), ">"];

for (i = 0; i < node.childNodes.length; ++i) {
pfxCopy = prefixesInScope.slice(0);
Expand Down
1 change: 0 additions & 1 deletion test/hmac-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const crypto = require("../index");
const xpath = require("xpath");
const xmldom = require("@xmldom/xmldom");
const fs = require("fs");
const { sign } = require("crypto");
const expect = require("chai").expect;

describe("HMAC tests", function () {
Expand Down