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

Replace "ember-cli-jshint" with "ember-cli-eslint" #1185

Merged
merged 2 commits into from
Jan 27, 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
13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
browser: true
},
rules: {
}
};
32 changes: 0 additions & 32 deletions .jshintrc

This file was deleted.

6 changes: 0 additions & 6 deletions .jshintrc-tests

This file was deleted.

4 changes: 2 additions & 2 deletions addon/internal-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default ObjectProxy.extend(Evented, {

return this._callStoreAsync('restore').then((restoredContent) => {
let { authenticator: authenticatorFactory } = restoredContent.authenticated || {};
if (!!authenticatorFactory) {
if (authenticatorFactory) {
delete restoredContent.authenticated.authenticator;
const authenticator = this._lookupAuthenticator(authenticatorFactory);
return authenticator.restore(restoredContent.authenticated).then((content) => {
Expand Down Expand Up @@ -187,7 +187,7 @@ export default ObjectProxy.extend(Evented, {
if (!this._busy) {
this._busy = true;
let { authenticator: authenticatorFactory } = (content.authenticated || {});
if (!!authenticatorFactory) {
if (authenticatorFactory) {
delete content.authenticated.authenticator;
const authenticator = this._lookupAuthenticator(authenticatorFactory);
authenticator.restore(content.authenticated).then((authenticatedContent) => {
Expand Down
2 changes: 1 addition & 1 deletion addon/session-stores/cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default BaseStore.extend({

_calculateExpirationTime() {
let cachedExpirationTime = this._read(`${this.get('cookieName')}-expiration_time`);
cachedExpirationTime = !!cachedExpirationTime ? new Date().getTime() + cachedExpirationTime * 1000 : null;
cachedExpirationTime = cachedExpirationTime ? new Date().getTime() + cachedExpirationTime * 1000 : null;
return this.get('cookieExpirationTime') ? new Date().getTime() + this.get('cookieExpirationTime') * 1000 : cachedExpirationTime;
},

Expand Down
5 changes: 5 additions & 0 deletions blueprints/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
env: {
node: true
}
};
7 changes: 0 additions & 7 deletions blueprints/.jshintrc

This file was deleted.

2 changes: 1 addition & 1 deletion config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
scenarios: [
{
Expand Down
2 changes: 1 addition & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*jshint node:true*/
/* eslint-env node */
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
"ember-cli-chai": "^0.3.2",
"ember-cli-content-security-policy": "~0.5.0",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-eslint": "^3.0.2",
"ember-cli-fastboot": "1.0.0-beta.13",
"ember-cli-htmlbars": "^1.1.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.3",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-jshint": "^2.0.1",
"ember-cli-mocha": "^0.13.1",
"ember-cli-pretender": "~0.7.0",
"ember-cli-release": "^0.2.9",
Expand Down
5 changes: 5 additions & 0 deletions server/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
env: {
node: true
}
};
3 changes: 0 additions & 3 deletions server/.jshintrc

This file was deleted.

5 changes: 5 additions & 0 deletions tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
env: {
embertest: true
}
};
52 changes: 0 additions & 52 deletions tests/.jshintrc

This file was deleted.

4 changes: 2 additions & 2 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* jshint node: true */
/* eslint-env node */

module.exports = function(environment) {
var ENV = {
Expand Down Expand Up @@ -66,7 +66,7 @@ module.exports = function(environment) {
}

if (environment === 'production') {

// put production settings here
}

return ENV;
Expand Down
6 changes: 1 addition & 5 deletions tests/unit/session-stores/shared/cookie-store-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default function(options) {
let sync;
let cookieService;
let spyRewriteCookieMethod;
let unspyRewriteCookieMethod;

beforeEach(() => {
createStore = options.createStore;
Expand All @@ -25,7 +24,6 @@ export default function(options) {
sinon.spy(cookieService, 'write');
store = createStore(cookieService);
spyRewriteCookieMethod = options.spyRewriteCookieMethod;
unspyRewriteCookieMethod = options.unspyRewriteCookieMethod;
});

afterEach(() => {
Expand Down Expand Up @@ -77,10 +75,8 @@ export default function(options) {
});

it('sends a warning when `cookieExpirationTime` is less than 90 seconds', (done) => {
let store;

run(() => {
store = createStore(cookieService, {
createStore(cookieService, {
cookieName: 'session-cookie-domain',
cookieDomain: 'example.com',
cookieExpirationTime: 60
Expand Down