Skip to content

Commit

Permalink
Merge pull request #280 from funkensturm/chore/ember-cli
Browse files Browse the repository at this point in the history
Update to ember-cli 2.18.2
  • Loading branch information
fsmanuel authored Feb 7, 2018
2 parents c94eac1 + ad2a5c4 commit d22d13d
Show file tree
Hide file tree
Showing 13 changed files with 197 additions and 56 deletions.
51 changes: 49 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,57 @@ module.exports = {
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
}
'ember/new-module-imports': 0,
'ember/require-super-in-init': 0,
'ember/closure-actions': 0
},
overrides: [
// node files
{
files: [
'index.js',
'testem.js',
'ember-cli-build.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'app/**',
'addon/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
},

// test files
{
files: ['tests/**/*.js'],
excludedFiles: ['tests/dummy/**/*.js'],
env: {
embertest: true
}
}
]
};
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
.bowerrc
.editorconfig
.ember-cli
.gitignore
.eslintrc.js
.gitignore
.watchmanconfig
.travis.yml
bower.json
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ install:
- bower install

script:
- yarn lint:js
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
Expand Down
1 change: 0 additions & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
1 change: 0 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
Expand Down
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

const stew = require('broccoli-stew');
Expand All @@ -19,7 +18,7 @@ module.exports = {
} else if (this.ui) {
this.ui.writeLine(warning);
} else {
console.log(warning);
console.log(warning); // eslint-disable-line no-console
}
},

Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"repository": "https://github.com/funkensturm/ember-local-storage.git",
"scripts": {
"build": "ember build",
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
"start": "ember serve",
"test": "ember try:each"
},
Expand All @@ -40,7 +41,7 @@
"devDependencies": {
"broccoli-asset-rev": "^2.5.0",
"ember-ajax": "^3.0.0",
"ember-cli": "~2.17.0",
"ember-cli": "~2.18.2",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-eslint": "^4.2.1",
"ember-cli-github-pages": "^0.1.2",
Expand All @@ -50,17 +51,19 @@
"ember-cli-inuitcss": "^1.0.1",
"ember-cli-qunit": "^4.1.1",
"ember-cli-release": "^1.0.0-beta.2",
"ember-cli-sass": "^7.1.1",
"ember-cli-sass": "7.1.1",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^2.0.0",
"ember-data": "^2.17.0",
"ember-data": "~2.18.0",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-one-way-controls": "^3.0.1",
"ember-resolver": "^4.1.0",
"ember-source": "~2.17.0",
"ember-source": "~2.18.0",
"eslint-plugin-ember": "^5.0.0",
"eslint-plugin-node": "^5.2.1",
"loader.js": "^4.4.0"
},
"engines": {
Expand Down
6 changes: 4 additions & 2 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
Expand All @@ -12,11 +11,14 @@ module.exports = {
Chrome: {
mode: 'ci',
args: [
// --no-sandbox is needed when running Chrome inside a container
process.env.TRAVIS ? '--no-sandbox' : null,

'--disable-gpu',
'--headless',
'--remote-debugging-port=0',
'--window-size=1440,900'
]
].filter(Boolean)
}
}
};
3 changes: 2 additions & 1 deletion tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
'use strict';

module.exports = function(environment) {
Expand Down Expand Up @@ -46,9 +45,11 @@ module.exports = function(environment) {
ENV.APP.LOG_VIEW_LOOKUPS = false;

ENV.APP.rootElement = '#ember-testing';
ENV.APP.autoboot = false;
}

if (environment === 'production') {
// here you can enable a production-specific feature
ENV.rootURL = '/ember-local-storage'
ENV.locationType = 'hash';
}
Expand Down
1 change: 0 additions & 1 deletion tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env node */
module.exports = {
browsers: [
'ie 9',
Expand Down
1 change: 1 addition & 0 deletions tests/helpers/start-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { run } from '@ember/runloop';

export default function startApp(attrs) {
let attributes = merge({}, config.APP);
attributes.autoboot = true;
attributes = merge(attributes, attrs); // use defaults, but you can override;

return run(() => {
Expand Down
3 changes: 2 additions & 1 deletion tests/test-helper.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

setApplication(Application.create({ autoboot: false }));
setApplication(Application.create(config.APP));

start();
Loading

0 comments on commit d22d13d

Please sign in to comment.