Updated ESLint to v2 and fixed eslintrc as well as the code

This commit is contained in:
Djamil Legato
2016-02-18 15:49:21 -08:00
parent 91daec7b47
commit 787ff61a1b
6 changed files with 19 additions and 33 deletions

View File

@@ -4,23 +4,9 @@
"node": true
},
"ecmaFeatures": {
"arrowFunctions": true,
"destructuring": true,
"classes": true,
"defaultParams": true,
"blockBindings": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"restParams": true,
"spread": true,
"forOf": true,
"generators": true,
"templateStrings": true,
"superInFunctions": true,
"experimentalObjectRestSpread": true
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
@@ -74,7 +60,6 @@
"no-else-return": 0,
"no-empty": 0,
"no-empty-character-class": 2,
"no-empty-label": 2,
"no-eq-null": 0,
"no-eval": 2,
"no-ex-assign": 2,
@@ -161,12 +146,11 @@
"semi": [2, "always"],
"semi-spacing": 0,
"sort-vars": 0,
"space-after-keywords": [2, "always"],
"keyword-spacing": [2, {"after": true, "overrides": {"throw": { "after": true}, "return": { "before": true }}}],
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, "never"],
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"space-return-throw-case": 2,
"space-unary-ops": [2, { "words": true, "nonwords": false }],
"spaced-comment": [2, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!"] }],
"strict": 0,

View File

@@ -18,7 +18,7 @@ const DOMBehaviors = {
// Catch browser uri change / refresh attempt and stop it if the form state is dirty
$(window).on('beforeunload._grav', () => {
if (Instance.equals() === false) {
return `You have made changes on this page that you have not yet confirmed. If you navigate away from this page you will lose your unsaved changes.`;
return 'You have made changes on this page that you have not yet confirmed. If you navigate away from this page you will lose your unsaved changes.';
}
});
},

View File

@@ -1,4 +1,5 @@
import $ from 'jquery';
import Map from 'es6-map';
const BREAKPOINT = 48 - 0.062;
const EVENTS = 'touchstart._grav click._grav';
@@ -39,7 +40,7 @@ export default class MobileSidebar {
$('#admin-sidebar').toggle({
easing: 'swing',
duration: 200,
complete: () => this.isOpen = true
complete: () => { this.isOpen = true; }
});
}
@@ -50,7 +51,7 @@ export default class MobileSidebar {
$('#admin-sidebar').toggle({
easing: 'swing',
duration: 200,
complete: () => this.isOpen = false
complete: () => { this.isOpen = false; }
});
}

View File

@@ -54,7 +54,7 @@ export function userFeedback(response) {
if (settings) {
backup = Object.assign({}, toastr.options);
Object.keys(settings).forEach((key) => toastr.options[key] = settings[key]);
Object.keys(settings).forEach((key) => { toastr.options[key] = settings[key]; });
}
if (message) { toastr[status === 'success' ? 'success' : 'error'](message); }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long