Skip to content
Open
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
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
15 changes: 13 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ module.exports = {
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/*/index.js'
'lib/*/index.js',
'server/**/*.js'
],
parserOptions: {
sourceType: 'script',
Expand All @@ -34,7 +37,15 @@ module.exports = {
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

// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off'
})
}
]
};
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/connect.lock
/coverage/
Expand Down
9 changes: 9 additions & 0 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

module.exports = {
extends: 'recommended',
rules: {
"attribute-indentation": false,
"block-indentation": false
}
};
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@ install:
- yarn install --non-interactive

script:
<<<<<<< HEAD
- yarn lint:js
- yarn test
=======
- npm run lint:hbs
- npm run lint:js
- npm test
>>>>>>> 8512e1e... message
6 changes: 3 additions & 3 deletions app/adapters/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default DS.JSONAPIAdapter.extend(DataAdapterMixin, {
},
host: env.apiHost,
namespace: 'api',
pathForType: function (type) {
pathForType: function () {
const original = this._super(...arguments)
return underscore(original)
},
Expand Down Expand Up @@ -44,10 +44,10 @@ export default DS.JSONAPIAdapter.extend(DataAdapterMixin, {
}
},
actions: {
error (e, transition) {
error (e) {
if(e && e.status === 401) {
this.get('session').invalidate()
}
}
}
})
})
2 changes: 1 addition & 1 deletion app/pods/callback/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default Route.extend({
return ;
}

return this.get('session').authenticate('authenticator:custom', transition.queryParams.code)
return this.get('session').authenticate('authenticator:custom', transition.to.queryParams.code)
.then(() => this.get('currentUser').load())
},
afterModel () {
Expand Down
2 changes: 0 additions & 2 deletions app/pods/questions/index/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ export default Controller.extend({
searchTask: task(function * () {
yield timeout(250)

let searchStr = this.get('searchString').trim()

const questions = yield this.get('store').query('question', {
include: 'user',
filter: {
Expand Down
2 changes: 0 additions & 2 deletions app/pods/quiz/index/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ export default Controller.extend({
searchTask: task(function * () {
yield timeout(250)

let searchStr = this.get('searchString').trim()

const quizzes = yield this.get('store').query('quiz', {
filter: {
title: {
Expand Down
4 changes: 1 addition & 3 deletions app/services/current-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ export default Service.extend({
this.set('user', data)
this.get('router').transitionTo('err', 'ADMIN_ONLY')
}
}).catch(err => {
this.get('session').invalidate()
})
}
}
})
})
2 changes: 1 addition & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function(environment) {
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Expand Down
3 changes: 3 additions & 0 deletions config/optional-features.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"jquery-integration": true
}
Loading