From 4d5a19f4ff0887f1196af078c12fbfd7c454fe98 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 17 May 2018 14:38:56 -0400 Subject: [PATCH] Fixup linting issues. --- .eslintrc.js | 3 ++- addon/resolvers/classic/index.js | 4 ++-- mu-trees/addon/module-registries/requirejs.js | 3 --- mu-trees/addon/resolvers/glimmer-wrapper/index.js | 2 +- tests/.eslintrc.js | 5 ----- tests/unit/resolvers/classic/basic-test.js | 7 ++----- 6 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 tests/.eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js index 29e21cb0..6ec7cfa6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -27,7 +27,8 @@ module.exports = { 'addon/**', 'addon-test-support/**', 'app/**', - 'tests/dummy/app/**' + 'tests/dummy/app/**', + 'mu-trees/**', ], parserOptions: { sourceType: 'script', diff --git a/addon/resolvers/classic/index.js b/addon/resolvers/classic/index.js index 1dbbaca6..abb6a228 100644 --- a/addon/resolvers/classic/index.js +++ b/addon/resolvers/classic/index.js @@ -373,9 +373,9 @@ const Resolver = DefaultResolver.extend({ description = this.lookupDescription(parsedName); } + /* eslint-disable no-console */ if (console && console.info) { - // eslint-disable-next-line no-console - console.info(symbol, parsedName.fullName, padding, description); + console.info(symbol, parsedName.fullName, padding, description); } }, diff --git a/mu-trees/addon/module-registries/requirejs.js b/mu-trees/addon/module-registries/requirejs.js index 64f990a8..748f46f0 100644 --- a/mu-trees/addon/module-registries/requirejs.js +++ b/mu-trees/addon/module-registries/requirejs.js @@ -1,4 +1,3 @@ -/* global require, requirejs */ import { deserializeSpecifier } from '@glimmer/di'; @@ -83,8 +82,6 @@ export default class RequireJSRegistry { get(specifierString) { let specifier = deserializeSpecifier(specifierString); - let useDefaultType = this._checkDefaultType(specifier); - /* return an export */ let moduleExport = this._detectModule(specifier, path => { return (path in this._require.entries) && this._require(path).default; diff --git a/mu-trees/addon/resolvers/glimmer-wrapper/index.js b/mu-trees/addon/resolvers/glimmer-wrapper/index.js index 9badb1b4..a280e640 100644 --- a/mu-trees/addon/resolvers/glimmer-wrapper/index.js +++ b/mu-trees/addon/resolvers/glimmer-wrapper/index.js @@ -92,7 +92,7 @@ const Resolver = DefaultResolver.extend({ if (source || namespace) { let rootName = namespace || this._configRootName; - let [type, name] = specifier.split(':'); + let [type] = specifier.split(':'); /* * Ember components require their lookupString to be massaged. Make this diff --git a/tests/.eslintrc.js b/tests/.eslintrc.js deleted file mode 100644 index fbf25552..00000000 --- a/tests/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - env: { - embertest: true - } -}; diff --git a/tests/unit/resolvers/classic/basic-test.js b/tests/unit/resolvers/classic/basic-test.js index 06febf7d..65371c0d 100644 --- a/tests/unit/resolvers/classic/basic-test.js +++ b/tests/unit/resolvers/classic/basic-test.js @@ -1,5 +1,7 @@ /* globals requirejs, define */ +/* eslint-disable no-console */ + import Ember from 'ember'; import require from 'require'; import { module, test } from 'qunit'; @@ -499,9 +501,6 @@ module("Logging", { beforeEach: function() { originalConsoleInfo = console ? console.info : null; logCalls = []; - if (!console) { - console = {info: null}; - } console.info = function(arg) { logCalls.push(arg); }; @@ -511,8 +510,6 @@ module("Logging", { afterEach: function() { if (originalConsoleInfo) { console.info = originalConsoleInfo; - } else { - console = undefined; } } });