mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-01-07 16:13:02 +01:00
Updated ESLint to v2 and fixed eslintrc as well as the code
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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.';
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -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; }
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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); }
|
||||
|
||||
13
themes/grav/js/admin.min.js
vendored
13
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
6
themes/grav/js/vendor.min.js
vendored
6
themes/grav/js/vendor.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user