Skip to content

Commit 9d22af3

Browse files
authored
enable no-var rule and fix violations (#1675)
1 parent d416a78 commit 9d22af3

21 files changed

+188
-188
lines changed

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default [
1414
}
1515
},
1616
rules: {
17+
"no-var": "error",
1718
"jsdoc/require-param-description": "off",
1819
"jsdoc/require-returns-description": "off",
1920
"jsdoc/tag-lines": ["error", "any", { startLines: 1 }],

lib/chai/assertion.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,21 +136,21 @@ Assertion.prototype.assert = function (
136136
_actual,
137137
showDiff
138138
) {
139-
var ok = util.test(this, arguments);
139+
let ok = util.test(this, arguments);
140140
if (false !== showDiff) showDiff = true;
141141
if (undefined === expected && undefined === _actual) showDiff = false;
142142
if (true !== config.showDiff) showDiff = false;
143143

144144
if (!ok) {
145145
msg = util.getMessage(this, arguments);
146-
var actual = util.getActual(this, arguments);
147-
var assertionErrorObjectProperties = {
146+
let actual = util.getActual(this, arguments);
147+
let assertionErrorObjectProperties = {
148148
actual: actual,
149149
expected: expected,
150150
showDiff: showDiff
151151
};
152152

153-
var operator = util.getOperator(this, arguments);
153+
let operator = util.getOperator(this, arguments);
154154
if (operator) {
155155
assertionErrorObjectProperties.operator = operator;
156156
}

0 commit comments

Comments
 (0)