Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ember-cli 2.14.0 upgrade + eslint #167

Merged
merged 1 commit into from
Jul 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@
/coverage/*
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
32 changes: 0 additions & 32 deletions .jshintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ before_install:
- phantomjs --version

install:
- yarn install --no-lockfile
- yarn install --no-lockfile --non-interactive

script:
- yarn run test
14 changes: 8 additions & 6 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-addon');
/* eslint-env node */
'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
/* hack so that we can test ourselves, only really and ember-cli-babel thing */
var super$addonInstalled = EmberApp.prototype._addonInstalled;
var super$addonInstalled = EmberAddon.prototype._addonInstalled;

EmberApp.prototype._addonInstalled = function(addonName) {
EmberAddon.prototype._addonInstalled = function(addonName) {
if (addonName === 'ember-cli-babel') {
return true;
} else{
Expand All @@ -14,14 +16,14 @@ module.exports = function(defaults) {
};
/* end hack */

var app = new EmberApp(defaults, {
let app = new EmberAddon(defaults, {
'ember-cli-babel': {
includePolyfill: true
}
});

/*
This build file specifes the options for the dummy test app of this
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* jshint node: true */
/* eslint-env node */
'use strict';

const VersionChecker = require('ember-cli-version-checker');
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
},
"scripts": {
"build": "ember build",
"jshint": "jshint",
"start": "ember server",
"test:node": "mocha node-tests",
"test:debug": "mocha debug node-tests",
Expand All @@ -55,23 +54,23 @@
"common-tags": "^1.4.0",
"console-ui": "^1.0.2",
"core-object": "^3.1.3",
"ember-cli": "2.13.2",
"ember-cli": "~2.14.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-eslint": "^3.0.0",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.4.3",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^4.0.0",
"ember-cli-shims": "^1.1.0",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"ember-source": "^2.13.0",
"ember-source": "~2.14.0",
"loader.js": "^4.4.0",
"mocha": "^3.4.1",
"resolve": "^1.3.3"
},
"engines": {
"node": "4.x || 6.x || >= 7"
"node": "^4.5 || 6.* || >= 7.*"
},
"ember-addon": {
"configPath": "tests/dummy/config"
Expand Down
14 changes: 7 additions & 7 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-env node */
module.exports = {
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
"PhantomJS"
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: [
'PhantomJS'
],
"launch_in_dev": [
"PhantomJS",
"Chrome"
launch_in_dev: [
'PhantomJS',
'Chrome'
]
};
3 changes: 2 additions & 1 deletion tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
env: {
embertest: true
embertest: true,
es6: true
}
};
52 changes: 0 additions & 52 deletions tests/.jshintrc

This file was deleted.

5 changes: 1 addition & 4 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

const { Application } = Ember;
let App;

App = Application.extend({
const App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/controllers/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import Ember from 'ember';

export default Ember.Controller.extend({
// Just a very roundabout way of using some ES6 features
value: ((test = 'Test') => `${test} ${'Value'}`)(), // jshint ignore:line
value: ((test = 'Test') => `${test} ${'Value'}`)(),

// Test a generator (needs the regenerator runtime) and some ES6 constructs (requires the corejs polyfill)
values: Ember.A(Array.from({ *[Symbol.iterator]() { yield 'one'; yield 'two'; } })) // jshint ignore:line
values: Ember.A(Array.from({ *[Symbol.iterator]() { yield 'one'; yield 'two'; } }))
});
5 changes: 3 additions & 2 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* eslint-env node */
'use strict';

module.exports = function(environment) {
var ENV = {
let ENV = {
modulePrefix: 'dummy',
environment: environment,
environment,
rootURL: '/',
locationType: 'auto',
EmberENV: {
Expand Down
1 change: 0 additions & 1 deletion tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-env node */

module.exports = {
browsers: [
'ie 9',
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers/module-for-acceptance.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Ember from 'ember';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';

const { RSVP: { Promise } } = Ember;
const { RSVP: { resolve } } = Ember;

export default function(name, options = {}) {
module(name, {
Expand All @@ -17,7 +17,7 @@ export default function(name, options = {}) {

afterEach() {
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
return Promise.resolve(afterEach).then(() => destroyApp(this.application));
return resolve(afterEach).then(() => destroyApp(this.application));
}
});
}
Loading