1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Update ESLint

* Bump version
 * Add a couple of rules to match our existing precedent
 * Fix a few genuine lint errors
 * Ignore a guard-for-in (not sure why eslint doesn't like this?)
 * Update max warnings
This commit is contained in:
David Baker
2019-01-09 17:29:30 +00:00
parent f6c8687dc8
commit 68bb8182e4
6 changed files with 486 additions and 607 deletions

View File

@@ -330,7 +330,7 @@ const deepCompare = module.exports.deepCompare = function(x, y) {
}
// finally, compare each of x's keys with y
for (p in y) {
for (p in y) { // eslint-disable-line guard-for-in
if (y.hasOwnProperty(p) !== x.hasOwnProperty(p)) {
return false;
}
@@ -693,7 +693,7 @@ module.exports.globToRegexp = function(glob, extended) {
if (extended) {
pat = pat.replace(/\\\[(!|)(.*)\\]/g, function(match, p1, p2, offset, string) {
const first = p1 && '^' || '';
const second = p2.replace(/\\\-/, '-');
const second = p2.replace(/\\-/, '-');
return '[' + first + second + ']';
});
}