From cd364f5c15081c9e20ccb475f9216cf8be779c9f Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Sun, 5 Nov 2017 17:50:14 -0800 Subject: [PATCH] promote eslint rule "semi" to entire project --- .eslintrc.js | 2 ++ node-tests/.eslintrc.js | 1 - packages/container/lib/registry.js | 4 ++-- .../tests/system/application_instance_test.js | 4 ++-- .../tests/system/application_test.js | 2 +- .../default_resolver_test.js | 2 +- .../ember-application/tests/system/visit_test.js | 2 +- packages/ember-debug/lib/deprecate.js | 8 ++++---- packages/ember-debug/lib/handlers.js | 6 +++--- packages/ember-debug/lib/index.js | 4 ++-- packages/ember-debug/lib/warn.js | 6 +++--- .../tests/container_debug_adapter_test.js | 2 +- .../tests/integration/application/engine-test.js | 6 +++--- .../components/curly-components-test.js | 2 +- packages/ember-metal/lib/map.js | 4 ++-- packages/ember-metal/lib/property_set.js | 2 +- packages/ember-metal/tests/alias_test.js | 2 +- packages/ember-metal/tests/mixin/reopen_test.js | 2 +- packages/ember-metal/tests/observer_test.js | 8 ++++---- packages/ember-routing/lib/system/router.js | 4 ++-- packages/ember-routing/lib/utils.js | 2 +- .../lib/computed/reduce_computed_macros.js | 2 +- .../ember-runtime/lib/system/native_array.js | 2 +- .../tests/suites/mutable_array/insertAt.js | 2 +- .../tests/system/string/camelize_test.js | 2 +- .../plugins/assert-reserved-named-arguments.js | 2 +- .../lib/plugins/deprecate-render-model.js | 2 +- .../transform-dot-component-invocation.js | 4 ++-- .../lib/plugins/transform-has-block-syntax.js | 2 +- ...ansform-quoted-bindings-into-just-bindings.js | 2 +- .../plugins/transform-top-level-components.js | 2 +- packages/ember-testing/tests/ext/rsvp_test.js | 6 +++--- packages/ember/lib/index.js | 2 +- packages/ember/tests/component_context_test.js | 2 +- packages/ember/tests/helpers/link_to_test.js | 8 ++++---- .../link_to_with_query_params_test.js | 12 ++++++------ packages/ember/tests/production_build_test.js | 2 +- packages/ember/tests/reexports_test.js | 6 +++--- packages/ember/tests/routing/basic_test.js | 2 +- .../ember/tests/routing/decoupled_basic_test.js | 2 +- packages/ember/tests/routing/substates_test.js | 16 ++++++++-------- .../internal-test-helpers/lib/test-resolver.js | 2 +- packages/node-module/lib/node-module.js | 4 ++-- 43 files changed, 81 insertions(+), 80 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 54039c1a0ea..3901626b43c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -35,6 +35,8 @@ module.exports = { 'ember-internal/require-yuidoc-access': 'error', 'ember-internal/no-const-outside-module-scope': 'error', + 'semi': 'error', + // temporarily disabled 'no-unused-vars': 'off', 'comma-dangle': 'off', diff --git a/node-tests/.eslintrc.js b/node-tests/.eslintrc.js index 8ca2c74e42a..2fb7b4cc4cf 100644 --- a/node-tests/.eslintrc.js +++ b/node-tests/.eslintrc.js @@ -4,6 +4,5 @@ module.exports = { node: true, }, rules: { - 'semi': 'error', }, }; diff --git a/packages/container/lib/registry.js b/packages/container/lib/registry.js index 65040902918..fd9237d347b 100644 --- a/packages/container/lib/registry.js +++ b/packages/container/lib/registry.js @@ -627,7 +627,7 @@ if (DEBUG) { } return injections; - } + }; Registry.prototype.validateInjections = function(injections) { if (!injections) { return; } @@ -639,7 +639,7 @@ if (DEBUG) { assert(`Attempting to inject an unknown injection: '${fullName}'`, this.has(fullName)); } - } + }; } function expandLocalLookup(registry, normalizedName, normalizedSource) { diff --git a/packages/ember-application/tests/system/application_instance_test.js b/packages/ember-application/tests/system/application_instance_test.js index c427023b979..06843a9a666 100644 --- a/packages/ember-application/tests/system/application_instance_test.js +++ b/packages/ember-application/tests/system/application_instance_test.js @@ -126,7 +126,7 @@ QUnit.test('unregistering a factory clears all cached instances of that factory' let postController1 = appInstance.lookup('controller:post'); let postController1Factory = appInstance.factoryFor('controller:post'); assert.ok(postController1 instanceof PostController1, 'precond - lookup creates instance'); - assert.equal(PostController1, postController1Factory.class, 'precond - factoryFor().class matches') + assert.equal(PostController1, postController1Factory.class, 'precond - factoryFor().class matches'); appInstance.unregister('controller:post'); appInstance.register('controller:post', PostController2); @@ -134,7 +134,7 @@ QUnit.test('unregistering a factory clears all cached instances of that factory' let postController2 = appInstance.lookup('controller:post'); let postController2Factory = appInstance.factoryFor('controller:post'); assert.ok(postController2 instanceof PostController2, 'lookup creates instance'); - assert.equal(PostController2, postController2Factory.class, 'factoryFor().class matches') + assert.equal(PostController2, postController2Factory.class, 'factoryFor().class matches'); assert.notStrictEqual(postController1, postController2, 'lookup creates a brand new instance, because the previous one was reset'); }); diff --git a/packages/ember-application/tests/system/application_test.js b/packages/ember-application/tests/system/application_test.js index df086d16cf6..f5cd501f3ab 100644 --- a/packages/ember-application/tests/system/application_test.js +++ b/packages/ember-application/tests/system/application_test.js @@ -218,7 +218,7 @@ moduleFor('Ember.Application, default resolver with autoboot', class extends Def [`@test can specify custom router`](assert) { let MyRouter = Router.extend(); this.runTask(() => { - this.createApplication() + this.createApplication(); this.application.Router = MyRouter; }); diff --git a/packages/ember-application/tests/system/dependency_injection/default_resolver_test.js b/packages/ember-application/tests/system/dependency_injection/default_resolver_test.js index 234b1341e7d..419f18d7eaa 100644 --- a/packages/ember-application/tests/system/dependency_injection/default_resolver_test.js +++ b/packages/ember-application/tests/system/dependency_injection/default_resolver_test.js @@ -183,7 +183,7 @@ moduleFor('Ember.Application Dependency Injection - Integration - default resolv this.application.FooRoute = Component.extend(); expectAssertion(() => { - this.privateRegistry.resolve(`route:foo`) + this.privateRegistry.resolve(`route:foo`); }, /to resolve to an Ember.Route/, 'Should assert'); } diff --git a/packages/ember-application/tests/system/visit_test.js b/packages/ember-application/tests/system/visit_test.js index 2ef8696d9a9..d6bc02079fa 100644 --- a/packages/ember-application/tests/system/visit_test.js +++ b/packages/ember-application/tests/system/visit_test.js @@ -128,7 +128,7 @@ moduleFor('Ember.Application - visit()', class extends ApplicationTestCase { * Destroy the instance. */ return this.runTask(() => { - this.applicationInstance.destroy() + this.applicationInstance.destroy(); this.applicationInstance = null; }); }).then(() => { diff --git a/packages/ember-debug/lib/deprecate.js b/packages/ember-debug/lib/deprecate.js index 24a9bfb6e92..f92f6de6359 100644 --- a/packages/ember-debug/lib/deprecate.js +++ b/packages/ember-debug/lib/deprecate.js @@ -53,7 +53,7 @@ let missingOptionsDeprecation, missingOptionsIdDeprecation, missingOptionsUntilD if (DEBUG) { registerHandler = function registerHandler(handler) { genericRegisterHandler('deprecate', handler); - } + }; let formatMessage = function formatMessage(_message, options) { let message = _message; @@ -67,7 +67,7 @@ if (DEBUG) { } return message; - } + }; registerHandler(function logDeprecationToConsole(message, options) { let updatedMessage = formatMessage(message, options); @@ -196,7 +196,7 @@ if (DEBUG) { } invoke('deprecate', ...arguments); - } + }; } export default deprecate; @@ -206,4 +206,4 @@ export { missingOptionsDeprecation, missingOptionsIdDeprecation, missingOptionsUntilDeprecation -} +}; diff --git a/packages/ember-debug/lib/handlers.js b/packages/ember-debug/lib/handlers.js index 6cf6e15e9ae..12acb8aadab 100644 --- a/packages/ember-debug/lib/handlers.js +++ b/packages/ember-debug/lib/handlers.js @@ -12,7 +12,7 @@ if (DEBUG) { HANDLERS[type] = (message, options) => { callback(message, options, nextHandler); }; - } + }; invoke = function invoke(type, message, test, options) { if (test) { return; } @@ -22,10 +22,10 @@ if (DEBUG) { if (handlerForType) { handlerForType(message, options); } - } + }; } export { registerHandler, invoke -} +}; diff --git a/packages/ember-debug/lib/index.js b/packages/ember-debug/lib/index.js index 98e033d1c4a..db5685c82f3 100644 --- a/packages/ember-debug/lib/index.js +++ b/packages/ember-debug/lib/index.js @@ -1,4 +1,4 @@ -import { DEBUG } from 'ember-env-flags' +import { DEBUG } from 'ember-env-flags'; import { ENV, environment } from 'ember-environment'; import Logger from 'ember-console'; import { isTesting } from './testing'; @@ -297,4 +297,4 @@ export { setDebugFunction, getDebugFunction, _warnIfUsingStrippedFeatureFlags -} +}; diff --git a/packages/ember-debug/lib/warn.js b/packages/ember-debug/lib/warn.js index ca9e7ab0095..9bbd0df56d5 100644 --- a/packages/ember-debug/lib/warn.js +++ b/packages/ember-debug/lib/warn.js @@ -46,7 +46,7 @@ if (DEBUG) { */ registerHandler = function registerHandler(handler) { genericRegisterHandler('warn', handler); - } + }; registerHandler(function logWarning(message, options) { Logger.warn(`WARNING: ${message}`); @@ -109,7 +109,7 @@ if (DEBUG) { } invoke('warn', message, test, options); - } + }; } export default warn; @@ -117,4 +117,4 @@ export { registerHandler, missingOptionsIdDeprecation, missingOptionsDeprecation -} +}; diff --git a/packages/ember-extension-support/tests/container_debug_adapter_test.js b/packages/ember-extension-support/tests/container_debug_adapter_test.js index e281c337b9f..59af9c1191e 100644 --- a/packages/ember-extension-support/tests/container_debug_adapter_test.js +++ b/packages/ember-extension-support/tests/container_debug_adapter_test.js @@ -38,7 +38,7 @@ moduleFor('Container Debug Adapter', class extends ApplicationTestCase { } ['@test default ContainerDebugAdapter catalogs controller entries'](assert) { - this.application.PostController = EmberController.extend() + this.application.PostController = EmberController.extend(); let controllerClasses = adapter.catalogEntriesByType('controller'); assert.equal(controllerClasses.length, 1, 'found 1 class'); diff --git a/packages/ember-glimmer/tests/integration/application/engine-test.js b/packages/ember-glimmer/tests/integration/application/engine-test.js index c09248b07a5..5a4f8a29b52 100644 --- a/packages/ember-glimmer/tests/integration/application/engine-test.js +++ b/packages/ember-glimmer/tests/integration/application/engine-test.js @@ -596,12 +596,12 @@ moduleFor('Application test: engine rendering', class extends ApplicationTest { resolveLoading.resolve(); this.runTaskNext(() => { - this.assertText('ApplicationEnginePost') + this.assertText('ApplicationEnginePost'); done(); }); }); - return transition + return transition; }); } @@ -674,7 +674,7 @@ moduleFor('Application test: engine rendering', class extends ApplicationTest { resolveLoading.resolve(); this.runTaskNext(() => { - this.assertText('ApplicationEngineLikes') + this.assertText('ApplicationEngineLikes'); done(); }); }); diff --git a/packages/ember-glimmer/tests/integration/components/curly-components-test.js b/packages/ember-glimmer/tests/integration/components/curly-components-test.js index 8c80d9a4de6..318b3d30eee 100644 --- a/packages/ember-glimmer/tests/integration/components/curly-components-test.js +++ b/packages/ember-glimmer/tests/integration/components/curly-components-test.js @@ -2916,7 +2916,7 @@ moduleFor('Components test: curly components', class extends RenderingTest { this.registerComponent('foo-bar', { ComponentClass: Component.extend({ didReceiveAttrs() { - assert.equal(1, this.get('foo'), 'expected attrs to have correct value') + assert.equal(1, this.get('foo'), 'expected attrs to have correct value'); } }), diff --git a/packages/ember-metal/lib/map.js b/packages/ember-metal/lib/map.js index c1a7e54e2e9..059c23bb8e3 100644 --- a/packages/ember-metal/lib/map.js +++ b/packages/ember-metal/lib/map.js @@ -158,7 +158,7 @@ class OrderedSet { @private */ forEach(fn /*, ...thisArg*/) { - assert(`${Object.prototype.toString.call(fn)} is not a function`, typeof fn === 'function') + assert(`${Object.prototype.toString.call(fn)} is not a function`, typeof fn === 'function'); if (this.size === 0) { return; } @@ -334,7 +334,7 @@ class Map { @private */ forEach(callback/*, ...thisArg*/) { - assert(`${Object.prototype.toString.call(callback)} is not a function`, typeof callback === 'function') + assert(`${Object.prototype.toString.call(callback)} is not a function`, typeof callback === 'function'); if (this.size === 0) { return; } diff --git a/packages/ember-metal/lib/property_set.js b/packages/ember-metal/lib/property_set.js index f196650934d..7bc2c534ed3 100644 --- a/packages/ember-metal/lib/property_set.js +++ b/packages/ember-metal/lib/property_set.js @@ -98,7 +98,7 @@ function setPath(root, path, value, tolerant) { let parts = path.split('.'); let keyName = parts.pop(); - assert('Property set failed: You passed an empty path', keyName.trim().length > 0) + assert('Property set failed: You passed an empty path', keyName.trim().length > 0); let newPath = parts.join('.'); diff --git a/packages/ember-metal/tests/alias_test.js b/packages/ember-metal/tests/alias_test.js index f837f8ad59f..0fef661f346 100644 --- a/packages/ember-metal/tests/alias_test.js +++ b/packages/ember-metal/tests/alias_test.js @@ -8,7 +8,7 @@ import { addObserver, removeObserver, tagFor -} from '..' +} from '..'; let obj, count; diff --git a/packages/ember-metal/tests/mixin/reopen_test.js b/packages/ember-metal/tests/mixin/reopen_test.js index 5446875b036..b1b8cca332a 100644 --- a/packages/ember-metal/tests/mixin/reopen_test.js +++ b/packages/ember-metal/tests/mixin/reopen_test.js @@ -3,7 +3,7 @@ import { run, get, Mixin -} from '../..' +} from '../..'; QUnit.module('Ember.Mixin#reopen'); diff --git a/packages/ember-metal/tests/observer_test.js b/packages/ember-metal/tests/observer_test.js index 0a9311c00f6..b3299e35982 100644 --- a/packages/ember-metal/tests/observer_test.js +++ b/packages/ember-metal/tests/observer_test.js @@ -33,15 +33,15 @@ QUnit.module('addObserver'); testBoth('observer should assert to invalid input', function(get, set) { expectAssertion(()=> { - observer(()=>{}) + observer(()=>{}); }, 'observer called without valid path'); - expectDeprecation('Passing the dependentKeys after the callback function in observer is deprecated. Ensure the callback function is the last argument.') + expectDeprecation('Passing the dependentKeys after the callback function in observer is deprecated. Ensure the callback function is the last argument.'); expectAssertion(()=> { - observer(null) + observer(null); }, 'observer called without a function'); -}) +}); testBoth('observer should fire when property is modified', function(get, set) { let obj = {}; diff --git a/packages/ember-routing/lib/system/router.js b/packages/ember-routing/lib/system/router.js index 5e4c3e71ce8..cfc42e13bd8 100644 --- a/packages/ember-routing/lib/system/router.js +++ b/packages/ember-routing/lib/system/router.js @@ -145,7 +145,7 @@ const EmberRouter = EmberObject.extend(Evented, { this._resetQueuedQueryParameterChanges(); this._handledErrors = dictionary(null); this._engineInstances = Object.create(null); - this._engineInfoByRoute = Object.create(null) + this._engineInfoByRoute = Object.create(null); }, /* @@ -1275,7 +1275,7 @@ export function triggerEvent(handlerInfos, ignoreFailure, args) { } } - let defaultHandler = defaultActionHandlers[name] + let defaultHandler = defaultActionHandlers[name]; if (defaultHandler) { defaultHandler.apply(this, [handlerInfos, ...args]); return; diff --git a/packages/ember-routing/lib/utils.js b/packages/ember-routing/lib/utils.js index 789037ca0b3..23b9c4fee48 100644 --- a/packages/ember-routing/lib/utils.js +++ b/packages/ember-routing/lib/utils.js @@ -5,7 +5,7 @@ import { Error as EmberError } from 'ember-debug'; const ALL_PERIODS_REGEX = /\./g; export function extractRouteArgs(args) { - args = args.slice() + args = args.slice(); let possibleQueryParams = args[args.length - 1]; let queryParams; diff --git a/packages/ember-runtime/lib/computed/reduce_computed_macros.js b/packages/ember-runtime/lib/computed/reduce_computed_macros.js index 4c030374536..03278282eb2 100644 --- a/packages/ember-runtime/lib/computed/reduce_computed_macros.js +++ b/packages/ember-runtime/lib/computed/reduce_computed_macros.js @@ -23,7 +23,7 @@ function reduceMacro(dependentKey, callback, initialValue) { let arr = get(this, dependentKey); if (arr === null || typeof arr !== 'object') { return initialValue; } return arr.reduce(callback, initialValue, this); - }, { dependentKeys: [`${dependentKey}.[]`], readOnly: true }) + }, { dependentKeys: [`${dependentKey}.[]`], readOnly: true }); return cp; } diff --git a/packages/ember-runtime/lib/system/native_array.js b/packages/ember-runtime/lib/system/native_array.js index 4272b0f2859..9dc5f0b41e6 100644 --- a/packages/ember-runtime/lib/system/native_array.js +++ b/packages/ember-runtime/lib/system/native_array.js @@ -54,7 +54,7 @@ let NativeArray = Mixin.create(MutableArray, Observable, Copyable, { // primitive for array support. replace(idx, amt, objects) { assert(FROZEN_ERROR, !this.isFrozen); - assert('The third argument to replace needs to be an array.', objects === null || objects === undefined || Array.isArray(objects)) + assert('The third argument to replace needs to be an array.', objects === null || objects === undefined || Array.isArray(objects)); // if we replaced exactly the same number of items, then pass only the // replaced range. Otherwise, pass the full remaining array length diff --git a/packages/ember-runtime/tests/suites/mutable_array/insertAt.js b/packages/ember-runtime/tests/suites/mutable_array/insertAt.js index eb230c160b6..0a9bcca6eb5 100644 --- a/packages/ember-runtime/tests/suites/mutable_array/insertAt.js +++ b/packages/ember-runtime/tests/suites/mutable_array/insertAt.js @@ -141,7 +141,7 @@ suite.test('[A,B,C].insertAt(1,X) => [A,X,B,C] + notify', function() { obj.objectAt = (ix) => { objectAtCalls.push(ix); return objectAt.call(obj, ix); - } + }; obj.getProperties('firstObject', 'lastObject'); /* Prime the cache */ diff --git a/packages/ember-runtime/tests/system/string/camelize_test.js b/packages/ember-runtime/tests/system/string/camelize_test.js index dc41046a15d..6ac3ba087cb 100644 --- a/packages/ember-runtime/tests/system/string/camelize_test.js +++ b/packages/ember-runtime/tests/system/string/camelize_test.js @@ -15,7 +15,7 @@ function test(given, expected, description) { if (ENV.EXTEND_PROTOTYPES.String) { deepEqual(given.camelize(), expected); } - }) + }); } test('my favorite items', 'myFavoriteItems', 'camelize normal string'); diff --git a/packages/ember-template-compiler/lib/plugins/assert-reserved-named-arguments.js b/packages/ember-template-compiler/lib/plugins/assert-reserved-named-arguments.js index 4a8f0d807eb..09ae0ebcbde 100644 --- a/packages/ember-template-compiler/lib/plugins/assert-reserved-named-arguments.js +++ b/packages/ember-template-compiler/lib/plugins/assert-reserved-named-arguments.js @@ -14,7 +14,7 @@ export default function assertReservedNamedArguments(env) { } } } - } + }; } function assertMessage(moduleName, node) { diff --git a/packages/ember-template-compiler/lib/plugins/deprecate-render-model.js b/packages/ember-template-compiler/lib/plugins/deprecate-render-model.js index d8b53fb4ec3..0e84f3651ad 100644 --- a/packages/ember-template-compiler/lib/plugins/deprecate-render-model.js +++ b/packages/ember-template-compiler/lib/plugins/deprecate-render-model.js @@ -23,7 +23,7 @@ export default function deprecateRenderModel(env) { } } } - } + }; } function deprecationMessage(moduleName, node, param) { diff --git a/packages/ember-template-compiler/lib/plugins/transform-dot-component-invocation.js b/packages/ember-template-compiler/lib/plugins/transform-dot-component-invocation.js index c5c434e0d45..4cb8693330d 100644 --- a/packages/ember-template-compiler/lib/plugins/transform-dot-component-invocation.js +++ b/packages/ember-template-compiler/lib/plugins/transform-dot-component-invocation.js @@ -66,11 +66,11 @@ export default function transformDotComponentInvocation(env) { }, BlockStatement: (node) => { if (isMultipartPath(node.path)) { - wrapInComponent(node, b) + wrapInComponent(node, b); } } } - } + }; } function isMultipartPath(path) { diff --git a/packages/ember-template-compiler/lib/plugins/transform-has-block-syntax.js b/packages/ember-template-compiler/lib/plugins/transform-has-block-syntax.js index f9a3d7e7034..5e4058c61d6 100644 --- a/packages/ember-template-compiler/lib/plugins/transform-has-block-syntax.js +++ b/packages/ember-template-compiler/lib/plugins/transform-has-block-syntax.js @@ -47,5 +47,5 @@ export default function transformHasBlockSyntax(env) { } } } - } + }; } diff --git a/packages/ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.js b/packages/ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.js index 54d3f2487b3..58a7bb87feb 100644 --- a/packages/ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.js +++ b/packages/ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.js @@ -12,7 +12,7 @@ export default function transformQuotedBindingsIntoJustBindings(env) { styleAttr.value = styleAttr.value.parts[0]; } } - } + }; } function validStyleAttr(attr) { diff --git a/packages/ember-template-compiler/lib/plugins/transform-top-level-components.js b/packages/ember-template-compiler/lib/plugins/transform-top-level-components.js index 6a010efab88..fe906bfc6d2 100644 --- a/packages/ember-template-compiler/lib/plugins/transform-top-level-components.js +++ b/packages/ember-template-compiler/lib/plugins/transform-top-level-components.js @@ -10,7 +10,7 @@ export default function transformTopLevelComponent(env) { }); } } - } + }; } function hasSingleComponentNode(program, componentCallback) { diff --git a/packages/ember-testing/tests/ext/rsvp_test.js b/packages/ember-testing/tests/ext/rsvp_test.js index 4d4f817650c..b0589e2ea13 100644 --- a/packages/ember-testing/tests/ext/rsvp_test.js +++ b/packages/ember-testing/tests/ext/rsvp_test.js @@ -92,7 +92,7 @@ QUnit.module('TestPromise'); QUnit.test('does not throw error when falsy value passed to then', function() { expect(1); return new TestPromise(function(resolve) { - resolve() + resolve(); }) .then(null) .then(function() { @@ -104,14 +104,14 @@ QUnit.test('able to get last Promise', function() { expect(2); var p1 = new TestPromise(function(resolve) { - resolve() + resolve(); }) .then(function() { ok(true); }); var p2 = new TestPromise(function(resolve) { - resolve() + resolve(); }); deepEqual(getLastPromise(), p2); diff --git a/packages/ember/lib/index.js b/packages/ember/lib/index.js index 367926a8dc5..03ff501ed02 100644 --- a/packages/ember/lib/index.js +++ b/packages/ember/lib/index.js @@ -11,7 +11,7 @@ import { Registry, Container } from 'container'; // ****ember-metal**** import Ember, * as metal from 'ember-metal'; import { EMBER_METAL_WEAKMAP } from 'ember/features'; -import * as FLAGS from 'ember/features' +import * as FLAGS from 'ember/features'; // ember-utils exports Ember.getOwner = utils.getOwner; diff --git a/packages/ember/tests/component_context_test.js b/packages/ember/tests/component_context_test.js index 6f1e3174d2b..894ca1afaa9 100644 --- a/packages/ember/tests/component_context_test.js +++ b/packages/ember/tests/component_context_test.js @@ -43,7 +43,7 @@ moduleFor('Application Lifecycle - Component Context', class extends Application }); this.visit('/').then(() => { - let text = this.$('#wrapper').text().trim() + let text = this.$('#wrapper').text().trim(); assert.equal(text, 'outer', 'The component is composed correctly'); }); } diff --git a/packages/ember/tests/helpers/link_to_test.js b/packages/ember/tests/helpers/link_to_test.js index e935220b126..8fde7209cad 100644 --- a/packages/ember/tests/helpers/link_to_test.js +++ b/packages/ember/tests/helpers/link_to_test.js @@ -219,7 +219,7 @@ moduleFor('The {{link-to}} helper - basic tests', class extends ApplicationTestC assert.equal(this.$('#about-link.foo-is-true').length, 1, 'The about-link was rendered with the truthy class after toggling the property'); } -}) +}); moduleFor('The {{link-to}} helper - location hooks', class extends ApplicationTestCase { @@ -936,7 +936,7 @@ moduleFor('The {{link-to}} helper - nested routes and link-to arguments', class let assertEquality = href => { assert.equal(normalizeUrl(this.$('#string-link').attr('href')), '/'); assert.equal(normalizeUrl(this.$('#path-link').attr('href')), href); - } + }; this.visit('/'); @@ -1039,7 +1039,7 @@ moduleFor('The {{link-to}} helper - nested routes and link-to arguments', class // Old IE includes the whole hostname as well assert.equal(href.slice(-expected[idx].length), expected[idx], `Expected link to be '${expected[idx]}', but was '${href}'`); } - } + }; linksEqual(this.$('a'), ['/foo', '/bar', '/rar', '/foo', '/bar', '/rar', '/bar', '/foo']); @@ -1192,7 +1192,7 @@ moduleFor('The {{link-to}} helper - nested routes and link-to arguments', class let assertEquality = href => { assert.equal(normalizeUrl(this.$('#string-link').attr('href')), '/'); assert.equal(normalizeUrl(this.$('#path-link').attr('href')), href); - } + }; assertEquality('/'); diff --git a/packages/ember/tests/helpers/link_to_test/link_to_with_query_params_test.js b/packages/ember/tests/helpers/link_to_test/link_to_with_query_params_test.js index 6db8fbe0c21..a1fe6fb8a1a 100644 --- a/packages/ember/tests/helpers/link_to_test/link_to_with_query_params_test.js +++ b/packages/ember/tests/helpers/link_to_test/link_to_with_query_params_test.js @@ -8,7 +8,7 @@ moduleFor('The {{link-to}} helper: invoking with query params', class extends Ap let indexProperties = { foo: '123', bar: 'abc' - } + }; this.add('controller:index', Controller.extend({ queryParams: ['foo', 'bar', 'abool'], foo: indexProperties.foo, @@ -158,7 +158,7 @@ moduleFor('The {{link-to}} helper: invoking with query params', class extends Ap return this.visit('/').then(() => { let indexController = this.getController('index'); - let theLink = this.$('#the-link') + let theLink = this.$('#the-link'); assert.equal(theLink.attr('href'), '/?foo=OMG'); @@ -228,7 +228,7 @@ moduleFor('The {{link-to}} helper: invoking with query params', class extends Ap this.router.map(function() { this.route('cars', function() { this.route('create'); - }) + }); }); this.add('controller:cars', Controller.extend({ @@ -285,7 +285,7 @@ moduleFor('The {{link-to}} helper: invoking with query params', class extends Ap this.router.map(function() { this.route('search', function() { this.route('results'); - }) + }); }); this.add('controller:search', Controller.extend({ @@ -323,7 +323,7 @@ moduleFor('The {{link-to}} helper: invoking with query params', class extends Ap this.shouldNotBeActive(assert, '#only-add-archive'); this.shouldNotBeActive(assert, '#remove-one'); - return this.visit('/search?search=same&archive=true') + return this.visit('/search?search=same&archive=true'); }).then(() => { this.shouldBeActive(assert, '#both-same'); this.shouldNotBeActive(assert, '#change-one'); @@ -383,7 +383,7 @@ moduleFor('The {{link-to}} helper: invoking with query params', class extends Ap this.shouldNotBeActive(assert, '#bigger-link'); this.shouldNotBeActive(assert, '#empty-link'); - return this.visit('/?pages=%5B2%2C1%5D') + return this.visit('/?pages=%5B2%2C1%5D'); }).then(() => { this.shouldNotBeActive(assert, '#array-link'); this.shouldNotBeActive(assert, '#bigger-link'); diff --git a/packages/ember/tests/production_build_test.js b/packages/ember/tests/production_build_test.js index da40e3cebcb..272293526fa 100644 --- a/packages/ember/tests/production_build_test.js +++ b/packages/ember/tests/production_build_test.js @@ -1,4 +1,4 @@ -import { DEBUG } from 'ember-env-flags' +import { DEBUG } from 'ember-env-flags'; import { assert as emberAssert, runInDebug diff --git a/packages/ember/tests/reexports_test.js b/packages/ember/tests/reexports_test.js index 2dd102d99c6..7285cd855f1 100644 --- a/packages/ember/tests/reexports_test.js +++ b/packages/ember/tests/reexports_test.js @@ -240,11 +240,11 @@ if (DEBUG) { assert.equal(descriptor.enumerable, false, 'descriptor is not enumerable'); assert.equal(descriptor.configurable, false, 'descriptor is not configurable'); - assert.equal(Ember.MODEL_FACTORY_INJECTIONS, false) + assert.equal(Ember.MODEL_FACTORY_INJECTIONS, false); expectDeprecation(function() { Ember.MODEL_FACTORY_INJECTIONS = true; - }, 'Ember.MODEL_FACTORY_INJECTIONS is no longer required') - assert.equal(Ember.MODEL_FACTORY_INJECTIONS, false, 'writing to the property has no affect') + }, 'Ember.MODEL_FACTORY_INJECTIONS is no longer required'); + assert.equal(Ember.MODEL_FACTORY_INJECTIONS, false, 'writing to the property has no affect'); }); } diff --git a/packages/ember/tests/routing/basic_test.js b/packages/ember/tests/routing/basic_test.js index e96f6a9fa35..e6a6e129649 100644 --- a/packages/ember/tests/routing/basic_test.js +++ b/packages/ember/tests/routing/basic_test.js @@ -2510,7 +2510,7 @@ QUnit.test('Specifying non-existent controller name in route#render throws', fun renderTemplate() { expectAssertion(() => { this.render('homepage', { controller: 'stefanpenneristhemanforme' }); - }, 'You passed `controller: \'stefanpenneristhemanforme\'` into the `render` method, but no such controller could be found.') + }, 'You passed `controller: \'stefanpenneristhemanforme\'` into the `render` method, but no such controller could be found.'); } }); diff --git a/packages/ember/tests/routing/decoupled_basic_test.js b/packages/ember/tests/routing/decoupled_basic_test.js index c1af5b6b5e0..914b6440d6c 100644 --- a/packages/ember/tests/routing/decoupled_basic_test.js +++ b/packages/ember/tests/routing/decoupled_basic_test.js @@ -272,7 +272,7 @@ class extends ApplicationTestCase { 'Monday through Friday: 9am to 5pm', 'Saturday: Noon to Midnight', 'Sunday: Noon to 6pm' - ])) + ])); } })); return this.visit('/').then(() => { diff --git a/packages/ember/tests/routing/substates_test.js b/packages/ember/tests/routing/substates_test.js index 88483c7a039..89e4569bc89 100644 --- a/packages/ember/tests/routing/substates_test.js +++ b/packages/ember/tests/routing/substates_test.js @@ -104,7 +104,7 @@ moduleFor('Loading/Error Substates', class extends ApplicationTestCase { this.router.map(function() { this.route('dummy'); - }) + }); this.add('route:dummy', Route.extend({ model() { return deferred.promise; @@ -204,7 +204,7 @@ moduleFor('Loading/Error Substates', class extends ApplicationTestCase { let promise = this.visit('/').then(() => { let length = this.$('#toplevel-loading').length; - text = this.$('#app').text() + text = this.$('#app').text(); assert.equal( length, @@ -307,7 +307,7 @@ moduleFor('Loading/Error Substates', class extends ApplicationTestCase { this.router.map(function() { this.route('foo', function() { this.route('bar'); - }) + }); }); this.add('route:foo.bar', Route.extend({ @@ -407,7 +407,7 @@ moduleFor('Loading/Error Substates', class extends ApplicationTestCase { this.router.map(function() { this.route('foo', function() { this.route('bar'); - }) + }); }); this.add('route:foo.index', Route.extend({ @@ -489,7 +489,7 @@ moduleFor('Loading/Error Substates - globals mode app', class extends AutobootAp 'toplevel error rendered' ); - reject = false + reject = false; return this.visit('/').then(() => { let text = this.$('#app').text(); @@ -633,7 +633,7 @@ moduleFor('Loading/Error Substates - nested routes', class extends ApplicationTe step(1, 'MomSallyRoute#model'); return RSVP.reject({ msg: 'did it broke?' - }) + }); }, actions: { error() { @@ -682,7 +682,7 @@ moduleFor('Loading/Error Substates - nested routes', class extends ApplicationTe step(1, 'MomSallyRoute#model'); return RSVP.reject({ msg: 'did it broke?' - }) + }); }, actions: { error(err) { @@ -894,7 +894,7 @@ moduleFor('Loading/Error Substates - nested routes', class extends ApplicationTe 'grandma.loading', `in pivot route's child loading state` ); - deferred.resolve() + deferred.resolve(); return promise; }); diff --git a/packages/internal-test-helpers/lib/test-resolver.js b/packages/internal-test-helpers/lib/test-resolver.js index 2968c28a408..44e87a28271 100644 --- a/packages/internal-test-helpers/lib/test-resolver.js +++ b/packages/internal-test-helpers/lib/test-resolver.js @@ -40,4 +40,4 @@ class ModuleBasedResolver extends Resolver { } } -export { ModuleBasedResolver } +export { ModuleBasedResolver }; diff --git a/packages/node-module/lib/node-module.js b/packages/node-module/lib/node-module.js index 6989f13316b..f80d98070a7 100644 --- a/packages/node-module/lib/node-module.js +++ b/packages/node-module/lib/node-module.js @@ -4,10 +4,10 @@ enifed('node-module', ['exports'], function(_exports) { if (IS_NODE) { _exports.require = module.require; _exports.module = module; - _exports.IS_NODE = IS_NODE + _exports.IS_NODE = IS_NODE; } else { _exports.require = null; _exports.module = null; - _exports.IS_NODE = IS_NODE + _exports.IS_NODE = IS_NODE; } }); \ No newline at end of file