You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Add google eslint rules as a base
Remove some we don't care about. Set some other ones we do care about but don't currently adhere to to warn. Set the max warnings threshold to the current number of warnings, so we don't introduce more of them. Fix a bunch of legit lint errors and add exceptions to various places in the test code that does funny things with 'this'.
This commit is contained in:
@@ -348,16 +348,12 @@ var deepCompare = module.exports.deepCompare = function(x, y) {
|
||||
*/
|
||||
module.exports.extend = function() {
|
||||
var target = arguments[0] || {};
|
||||
// disable jshint "The body of a for in should be wrapped in an if
|
||||
// statement"
|
||||
/* jshint -W089 */
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var propName in source) {
|
||||
for (var propName in source) { // eslint-disable-line guard-for-in
|
||||
target[propName] = source[propName];
|
||||
}
|
||||
}
|
||||
/* jshint +W089 */
|
||||
return target;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user