1
0
mirror of https://github.com/lrsjng/h5ai.git synced 2025-08-11 16:34:01 +02:00

Update deps. Fix lint issues.

This commit is contained in:
Lars Jung
2016-05-27 16:31:27 +02:00
parent 8e143a4607
commit 641d9b3cfa
6 changed files with 10 additions and 12 deletions

View File

@@ -59,6 +59,7 @@
handle-callback-err: 2 handle-callback-err: 2
indent: [2, 4] indent: [2, 4]
key-spacing: [2, {beforeColon: false, afterColon: true}] key-spacing: [2, {beforeColon: false, afterColon: true}]
keyword-spacing: [2, {before: true, after: true}]
linebreak-style: [2, unix] linebreak-style: [2, unix]
max-depth: [1, 4] max-depth: [1, 4]
max-len: [0, 80, 4] max-len: [0, 80, 4]
@@ -90,7 +91,6 @@
no-else-return: 1 no-else-return: 1
no-empty: 2 no-empty: 2
no-empty-character-class: 2 no-empty-character-class: 2
no-empty-label: 2
no-empty-pattern: 2 no-empty-pattern: 2
no-eq-null: 2 no-eq-null: 2
no-eval: 2 no-eval: 2
@@ -189,12 +189,10 @@
semi: 2 semi: 2
semi-spacing: [2, {before: false, after: true}] semi-spacing: [2, {before: false, after: true}]
sort-vars: 0 sort-vars: 0
space-after-keywords: [2, always]
space-before-blocks: [2, always] space-before-blocks: [2, always]
space-before-function-paren: [2, {anonymous: always, named: never}] space-before-function-paren: [2, {anonymous: always, named: never}]
space-in-parens: [2, never] space-in-parens: [2, never]
space-infix-ops: 2 space-infix-ops: 2
space-return-throw-case: 2
space-unary-ops: [2, {words: true, nonwords: false}] space-unary-ops: [2, {words: true, nonwords: false}]
spaced-comment: [2, always] spaced-comment: [2, always]
strict: [2, never] strict: [2, never]

View File

@@ -16,10 +16,10 @@
"build": "npm run -s ghu release" "build": "npm run -s ghu release"
}, },
"devDependencies": { "devDependencies": {
"babel-core": "6.8.0", "babel-core": "6.9.0",
"babel-eslint": "6.0.4", "babel-eslint": "6.0.4",
"babel-preset-es2015": "6.6.0", "babel-preset-es2015": "6.9.0",
"eslint": "2.10.1", "eslint": "2.10.2",
"ghu": "0.4.0" "ghu": "0.4.0"
}, },
"engines": { "engines": {

View File

@@ -24,7 +24,7 @@ modulejs.define('core/types', ['_', 'config'], function (_, config) {
var name = slashidx >= 0 ? sequence.substr(slashidx + 1) : sequence; var name = slashidx >= 0 ? sequence.substr(slashidx + 1) : sequence;
var result; var result;
_.each(regexps, function (regexp, type) { _.each(regexps, function (regexp, type) { // eslint-disable-line consistent-return
if (regexps[type].test(name)) { if (regexps[type].test(name)) {
result = type; result = type;
return false; return false;

View File

@@ -48,8 +48,8 @@ modulejs.define('core/util', ['_'], function (_) {
return isNaN(oFxNcL) ? 1 : -1; return isNaN(oFxNcL) ? 1 : -1;
} else if (typeof oFxNcL !== typeof oFyNcL) { } else if (typeof oFxNcL !== typeof oFyNcL) {
// rely on string comparison if different types - i.e. '02' < 2 != '02' < '2' // rely on string comparison if different types - i.e. '02' < 2 != '02' < '2'
oFxNcL += ''; oFxNcL = String(oFxNcL);
oFyNcL += ''; oFxNcL = String(oFxNcL);
} }
if (oFxNcL < oFyNcL) { if (oFxNcL < oFyNcL) {
return -1; return -1;

View File

@@ -21,7 +21,7 @@ modulejs.define('ext/peer5', ['_', '$', 'core/settings'], function (_, $, allset
// attach to file items, once the DOM is ready // attach to file items, once the DOM is ready
$(function () { $(function () {
$('body').on('click', '.item.file > a', function (ev) { $('body').on('click', '.item.file > a', function (ev) { // eslint-disable-line consistent-return
if (window.peer5) { if (window.peer5) {
ev.preventDefault(); ev.preventDefault();
var url = ev.currentTarget.href; var url = ev.currentTarget.href;

View File

@@ -20,7 +20,7 @@ modulejs.define('model/item', ['_', 'core/event', 'core/location', 'core/server'
return sequence; return sequence;
} }
function splitPath(sequence) { function splitPath(sequence) { // eslint-disable-line consistent-return
if (sequence === '/') { if (sequence === '/') {
return { return {
parent: null, parent: null,
@@ -55,7 +55,7 @@ modulejs.define('model/item', ['_', 'core/event', 'core/location', 'core/server'
return null; return null;
} }
var item = cache[href] || new Item(href); var item = cache[href] || new Item(href); // eslint-disable-line no-use-before-define
if (_.isNumber(options.time)) { if (_.isNumber(options.time)) {
item.time = options.time; item.time = options.time;