Skip to content

Commit e14815f

Browse files
committed
Fix ESLint issues in Node.js files
1 parent 126cbce commit e14815f

File tree

3 files changed

+81
-74
lines changed

3 files changed

+81
-74
lines changed

config/environment.js

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,53 @@
1-
/* jshint node: true */
1+
'use strict';
2+
3+
/* eslint-env node */
24

35
module.exports = function(environment) {
4-
var ENV = {
5-
modulePrefix: 'cargo',
6-
environment: environment,
7-
rootURL: '/',
8-
locationType: 'router-scroll',
9-
historySupportMiddleware: true,
10-
EmberENV: {
11-
FEATURES: {
12-
// Here you can enable experimental features on an ember canary build
13-
// e.g. 'with-controller': true
14-
},
15-
EXTEND_PROTOTYPES: {
16-
// Prevent Ember Data from overriding Date.parse.
17-
Date: false
18-
}
19-
},
20-
21-
APP: {
22-
// Here you can pass flags/options to your application instance
23-
// when it is created
6+
var ENV = {
7+
modulePrefix: 'cargo',
8+
environment,
9+
rootURL: '/',
10+
locationType: 'router-scroll',
11+
historySupportMiddleware: true,
12+
EmberENV: {
13+
FEATURES: {
14+
// Here you can enable experimental features on an ember canary build
15+
// e.g. 'with-controller': true
16+
},
17+
EXTEND_PROTOTYPES: {
18+
// Prevent Ember Data from overriding Date.parse.
19+
Date: false
20+
}
21+
},
22+
23+
APP: {
24+
// Here you can pass flags/options to your application instance
25+
// when it is created
26+
}
27+
};
28+
29+
if (environment === 'development') {
30+
// ENV.APP.LOG_RESOLVER = true;
31+
// ENV.APP.LOG_ACTIVE_GENERATION = true;
32+
// ENV.APP.LOG_TRANSITIONS = true;
33+
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
34+
// ENV.APP.LOG_VIEW_LOOKUPS = true;
2435
}
25-
};
26-
27-
if (environment === 'development') {
28-
// ENV.APP.LOG_RESOLVER = true;
29-
// ENV.APP.LOG_ACTIVE_GENERATION = true;
30-
// ENV.APP.LOG_TRANSITIONS = true;
31-
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
32-
// ENV.APP.LOG_VIEW_LOOKUPS = true;
33-
}
34-
35-
if (environment === 'test') {
36-
// Testem prefers this...
37-
ENV.locationType = 'none';
3836

39-
// keep test console output quieter
40-
ENV.APP.LOG_ACTIVE_GENERATION = false;
41-
ENV.APP.LOG_VIEW_LOOKUPS = false;
37+
if (environment === 'test') {
38+
// Testem prefers this...
39+
ENV.locationType = 'none';
4240

43-
ENV.APP.rootElement = '#ember-testing';
44-
}
41+
// keep test console output quieter
42+
ENV.APP.LOG_ACTIVE_GENERATION = false;
43+
ENV.APP.LOG_VIEW_LOOKUPS = false;
4544

46-
if (environment === 'production') {
45+
ENV.APP.rootElement = '#ember-testing';
46+
}
4747

48-
}
48+
if (environment === 'production') {
49+
// here be dragons
50+
}
4951

50-
return ENV;
52+
return ENV;
5153
};

ember-cli-build.js

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
1-
/*jshint node:true*/
2-
/* global require, module */
1+
'use strict';
2+
3+
/* eslint-env node */
4+
35
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
46

57
module.exports = function(defaults) {
6-
var app = new EmberApp(defaults, {
7-
babel6: {
8-
plugins: ['transform-object-rest-spread'],
9-
},
10-
});
8+
var app = new EmberApp(defaults, {
9+
babel6: {
10+
plugins: ['transform-object-rest-spread'],
11+
},
12+
});
1113

12-
// Use `app.import` to add additional libraries to the generated
13-
// output files.
14-
//
15-
// If you need to use different assets in different
16-
// environments, specify an object as the first parameter. That
17-
// object's keys should be the environment name and the values
18-
// should be the asset to use in that environment.
19-
//
20-
// If the library that you are including contains AMD or ES6
21-
// modules that you would like to import into your application
22-
// please specify an object with the list of modules as keys
23-
// along with the exports of each module as its value.
14+
// Use `app.import` to add additional libraries to the generated
15+
// output files.
16+
//
17+
// If you need to use different assets in different
18+
// environments, specify an object as the first parameter. That
19+
// object's keys should be the environment name and the values
20+
// should be the asset to use in that environment.
21+
//
22+
// If the library that you are including contains AMD or ES6
23+
// modules that you would like to import into your application
24+
// please specify an object with the list of modules as keys
25+
// along with the exports of each module as its value.
2426

25-
app.import('bower_components/normalize-css/normalize.css');
26-
app.import('bower_components/clipboard/dist/clipboard.js');
27-
return app.toTree();
27+
app.import('bower_components/normalize-css/normalize.css');
28+
app.import('bower_components/clipboard/dist/clipboard.js');
29+
return app.toTree();
2830
};

testem.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
/*jshint node:true*/
1+
'use strict';
2+
3+
/* eslint-env node */
4+
25
module.exports = {
3-
"test_page": "tests/index.html?hidepassed",
4-
"disable_watching": true,
5-
"launch_in_ci": [
6-
"PhantomJS"
7-
],
8-
"launch_in_dev": [
9-
"PhantomJS",
10-
"Chrome"
11-
]
6+
'test_page': 'tests/index.html?hidepassed',
7+
'disable_watching': true,
8+
'launch_in_ci': [
9+
'PhantomJS'
10+
],
11+
'launch_in_dev': [
12+
'PhantomJS',
13+
'Chrome'
14+
]
1215
};

0 commit comments

Comments
 (0)