Use standard and prettier (#10)

* switch from custom eslint config to standard + prettier

* fix new standard eslint violations

* add editorconfig file

* auto-fix all other violations

* update lint yarn script

* remove jshint comment
This commit is contained in:
Spencer
2019-07-09 13:24:13 -07:00
committed by GitHub
parent f69840c50f
commit 7c1573fb07
119 changed files with 4506 additions and 3521 deletions

View File

@ -4,29 +4,28 @@ var sinon = require('sinon');
var expect = require('expect.js');
var parentLog;
beforeEach(function () {
beforeEach(function() {
parentLog = new Log();
});
afterEach(function () {
afterEach(function() {
parentLog.close();
});
function makeLogger(parent, levels) {
parent = parent || parentLog;
var config = {
levels: Log.parseLevels(levels || 'trace')
levels: Log.parseLevels(levels || 'trace'),
};
return new ConsoleLogger(parent, config);
}
require('../../utils/auto_release_stub').make();
describe('Console Logger', function () {
describe('Console Logger', function() {
require('../generic_logger_tests')(makeLogger);
it('checks before using unique logging functions, falls back to #log()', function () {
it('checks before using unique logging functions, falls back to #log()', function() {
var _warning = console.warn;
console.warn = null;
sinon.stub(console, 'log');
@ -39,5 +38,4 @@ describe('Console Logger', function () {
console.warn = _warning;
console.log.restore();
});
});