Update eslintrc.

This commit is contained in:
Lars Jung 2016-07-01 15:00:39 +02:00
parent a893cb7534
commit 73e74bb887
3 changed files with 5 additions and 4 deletions

View file

@ -18,7 +18,7 @@
comma-dangle: [2, never] comma-dangle: [2, never]
comma-spacing: [2, {before: false, after: true}] comma-spacing: [2, {before: false, after: true}]
comma-style: [2, last] comma-style: [2, last]
complexity: [1, 25] ### complexity: [1, 10] ###
computed-property-spacing: [2, never] computed-property-spacing: [2, never]
consistent-return: 2 consistent-return: 2
consistent-this: [2, self] consistent-this: [2, self]
@ -41,8 +41,8 @@
max-depth: [1, 4] max-depth: [1, 4]
max-len: [0, 80, 4] max-len: [0, 80, 4]
max-nested-callbacks: [1, 3] max-nested-callbacks: [1, 3]
max-params: [1, 5] ### max-params: [1, 4] ###
max-statements: [1, 80] ### max-statements: [1, 30] ###
new-cap: 0 new-cap: 0
new-parens: 2 new-parens: 2
newline-after-var: 0 newline-after-var: 0

View file

@ -1,5 +1,4 @@
--- ---
rules: rules:
max-params: [1, 10]
no-console: 1 no-console: 1
prefer-reflect: 0 prefer-reflect: 0

View file

@ -10,6 +10,7 @@ const dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-
const reHex = /^0x[0-9a-f]+$/i; const reHex = /^0x[0-9a-f]+$/i;
const reLeadingZero = /^0/; const reLeadingZero = /^0/;
/* eslint-disable complexity */
const naturalCmp = (val1, val2) => { const naturalCmp = (val1, val2) => {
// convert all to strings strip whitespace // convert all to strings strip whitespace
const x = String(val1).replace(reStrip, ''); const x = String(val1).replace(reStrip, '');
@ -56,6 +57,7 @@ const naturalCmp = (val1, val2) => {
return 0; return 0;
}; };
/* eslint-enable */
module.exports = { module.exports = {
naturalCmp naturalCmp