Skip to content

Commit

Permalink
[Dev Deps] update eslint, @ljharb/eslint-config, `grunt-contrib-w…
Browse files Browse the repository at this point in the history
…atch`, `jshint`
  • Loading branch information
ljharb committed Aug 10, 2018
1 parent 4a81503 commit 8583cbe
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 57 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Expand Up @@ -16,11 +16,14 @@
"id-length": [2, { "min": 1, "max": 40 }],
"indent": [2, 2],
"max-depth": [2, 5],
"max-len": 0,
"max-lines": [1],
"max-lines-per-function": [0],
"max-params": [2, 4],
"max-nested-callbacks": [2, 5],
"max-statements": [1, 25],
"max-statements-per-line": [2, { "max": 2 }],
"multiline-comment-style": [0],
"new-cap": [2, { "capIsNewExceptions": ["Call", "Construct", "CreateHTML", "GetIterator", "GetMethod", "IsCallable", "IsConstructor", "IsPromise", "IsRegExp", "IteratorClose", "IteratorComplete", "IteratorNext", "IteratorStep", "Map", "OrigNumber", "RequireObjectCoercible", "SameValue", "SameValueZero", "Set", "SpeciesConstructor", "ToInteger", "ToLength", "ToNumber", "ToObject", "ToString", "ToUint32", "TypeIsObject"] }],
"no-constant-condition": [1],
"no-continue": [1],
Expand Down
17 changes: 11 additions & 6 deletions es6-shim.js
Expand Up @@ -2057,9 +2057,7 @@
var sign = _sign(v);
var abs = _abs(v);
if (abs < BINARY_32_MIN_VALUE) {
return sign * roundTiesToEven(
abs / BINARY_32_MIN_VALUE / BINARY_32_EPSILON
) * BINARY_32_MIN_VALUE * BINARY_32_EPSILON;
return sign * roundTiesToEven(abs / BINARY_32_MIN_VALUE / BINARY_32_EPSILON) * BINARY_32_MIN_VALUE * BINARY_32_EPSILON;
}
// Veltkamp's splitting (?)
var a = (1 + (BINARY_32_EPSILON / Number.EPSILON)) * abs;
Expand Down Expand Up @@ -2449,7 +2447,10 @@
values[index] = void 0;
var nextPromise = C.resolve(nextValue);
var resolveElement = _promiseAllResolver(
index, values, resultCapability, remaining
index,
values,
resultCapability,
remaining
);
remaining.count += 1;
optimizedThen(nextPromise.then, nextPromise, resolveElement, resultCapability.reject);
Expand Down Expand Up @@ -2609,12 +2610,16 @@
} else if (_promise.state === PROMISE_FULFILLED) {
value = _promise.result;
enqueuePromiseReactionJob(
fulfillReactionHandler, resultCapability, value
fulfillReactionHandler,
resultCapability,
value
);
} else if (_promise.state === PROMISE_REJECTED) {
value = _promise.result;
enqueuePromiseReactionJob(
rejectReactionHandler, resultCapability, value
rejectReactionHandler,
resultCapability,
value
);
} else {
throw new TypeError('unexpected Promise state');
Expand Down
36 changes: 18 additions & 18 deletions package.json
Expand Up @@ -23,29 +23,29 @@
},
"main": "es6-shim",
"scripts": {
"pretest": "npm run --silent lint && evalmd *.md",
"test": "npm run --silent tests-only",
"tests-only": "npm run --silent test:shim && npm run --silent test:sham",
"pretest": "npm run lint && evalmd *.md",
"test": "npm run tests-only",
"tests-only": "npm run test:shim && npm run test:sham",
"test:shim": "mocha test/*.js test/*/*.js",
"test:sham": "mocha test-sham/*.js",
"test:native": "NO_ES6_SHIM=1 npm run --silent tests-only",
"lint": "npm run --silent lint:shim && npm run --silent lint:sham",
"lint:shim": "npm run --silent jshint:shim && npm run --silent jscs:shim && npm run --silent eslint:shim",
"lint:sham": "npm run --silent jshint:sham && npm run --silent jscs:sham && npm run --silent eslint:sham",
"eslint": "npm run --silent eslint:shim && npm run --silent eslint:sham",
"test:native": "NO_ES6_SHIM=1 npm run tests-only",
"lint": "npm run lint:shim && npm run lint:sham",
"lint:shim": "npm run jshint:shim && npm run jscs:shim && npm run eslint:shim",
"lint:sham": "npm run jshint:sham && npm run jscs:sham && npm run eslint:sham",
"eslint": "npm run eslint:shim && npm run eslint:sham",
"eslint:shim": "eslint es6-shim.js test/*.js test/*/*.js",
"eslint:sham": "eslint es6-sham.js test-sham/*.js",
"jshint": "npm run --silent jshint:shim && npm run --silent jshint:sham",
"jshint": "npm run jshint:shim && npm run jshint:sham",
"jshint:shim": "jshint es6-shim.js test/*.js test/*/*.js",
"jshint:sham": "jshint es6-sham.js test-sham/*.js",
"jscs": "npm run --silent jscs:shim && npm run --silent jscs:sham",
"jscs": "npm run jscs:shim && npm run jscs:sham",
"jscs:shim": "jscs es6-shim.js test/*.js test/*/*.js",
"jscs:sham": "jscs es6-sham.js test-sham/*.js",
"minify": "npm run --silent minify:shim && npm run --silent minify:sham",
"minify:shim": "uglifyjs es6-shim.js --keep-fnames --comments --source-map=es6-shim.map -m -b ascii_only=true,beautify=false > es6-shim.min.js",
"minify:sham": "uglifyjs es6-sham.js --keep-fnames --comments --source-map=es6-sham.map -m -b ascii_only=true,beautify=false > es6-sham.min.js",
"minify": "npm run minify:shim && npm run minify:sham",
"minify:shim": "uglifyjs es6-shim.js --support-ie8 --keep-fnames --comments --source-map=es6-shim.map -m -b ascii_only=true,beautify=false > es6-shim.min.js",
"minify:sham": "uglifyjs es6-sham.js --support-ie8 --keep-fnames --comments --source-map=es6-sham.map -m -b ascii_only=true,beautify=false > es6-sham.min.js",
"sauce-connect": "curl -L https://gist.githubusercontent.com/henrikhodne/9322897/raw/sauce-connect.sh | bash && export TRAVIS_SAUCE_CONNECT=true",
"sauce": "npm run --silent sauce-connect && grunt sauce"
"sauce": "npm run sauce-connect && grunt sauce"
},
"testling": {
"html": "testling.html",
Expand All @@ -68,17 +68,17 @@
},
"dependencies": {},
"devDependencies": {
"@ljharb/eslint-config": "^12.2.1",
"@ljharb/eslint-config": "^13.0.0",
"chai": "^3.5.0",
"es5-shim": "^4.5.10",
"eslint": "^4.19.1",
"eslint": "^5.3.0",
"evalmd": "^0.0.17",
"grunt": "^0.4.5",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-watch": "^1.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-saucelabs": "^8.6.3",
"jscs": "^3.0.7",
"jshint": "^2.9.5",
"jshint": "^2.9.6",
"mocha": "^3.5.3",
"promises-aplus-tests": "^2.1.2",
"promises-es6-tests": "^0.5.0",
Expand Down
37 changes: 19 additions & 18 deletions test/.eslintrc
@@ -1,20 +1,21 @@
{
"rules": {
"array-callback-return": 0,
"func-name-matching": 0,
"max-statements-per-line": [2, { "max": 2 }],
"no-restricted-properties": 1,
"symbol-description": 0,
"prefer-promise-reject-errors": 0,
"consistent-return": 0,
},
"env": {
"mocha": true
},
"globals": {
"Symbol": false,
"Promise": false,
"expect": false,
"assert": false
}
"rules": {
"array-callback-return": 0,
"func-name-matching": 0,
"max-lines-per-function": 0,
"max-statements-per-line": [2, { "max": 2 }],
"no-restricted-properties": 1,
"symbol-description": 0,
"prefer-promise-reject-errors": 0,
"consistent-return": 0,
},
"env": {
"mocha": true
},
"globals": {
"Symbol": false,
"Promise": false,
"expect": false,
"assert": false
}
}
8 changes: 2 additions & 6 deletions test/array.js
Expand Up @@ -77,14 +77,10 @@ var runArrayTests = function (it) {
expect(Array.from(arguments)).to.eql([0, 1, 2]);
}(0, 1, 2));

expect(Array.from([null, undefined, 0.1248, -0, 0])).to.eql(
[null, undefined, 0.1248, -0, 0]
);
expect(Array.from([null, undefined, 0.1248, -0, 0])).to.eql([null, undefined, 0.1248, -0, 0]);

if (Array.prototype.values) {
expect(Array.from([null, undefined, 0.1248, -0, 0].values())).to.eql(
[null, undefined, 0.1248, -0, 0]
);
expect(Array.from([null, undefined, 0.1248, -0, 0].values())).to.eql([null, undefined, 0.1248, -0, 0]);
}
});

Expand Down
4 changes: 1 addition & 3 deletions test/map.js
Expand Up @@ -561,9 +561,7 @@ describe('Map', function () {
zeroMap.forEach(function (value, key) {
result.push(String(1 / key) + ' ' + value);
});
expect(result.join(', ')).to.equal(
'Infinity a, Infinity c, 1 b'
);
expect(result.join(', ')).to.equal('Infinity a, Infinity c, 1 b');
});
});

Expand Down
4 changes: 1 addition & 3 deletions test/set.js
Expand Up @@ -621,9 +621,7 @@ describe('Set', function () {
zeroSet.forEach(function (key) {
result.push(String(1 / key));
});
expect(result.join(', ')).to.equal(
'Infinity, Infinity, 1'
);
expect(result.join(', ')).to.equal('Infinity, Infinity, 1');
});
});

Expand Down
4 changes: 1 addition & 3 deletions test/string.js
Expand Up @@ -554,9 +554,7 @@ var runStringTests = function (it) {

it('should work with surrogate characters', function () {
var str = '\u2500\ud800\udc00\udbff\udfff\ud800';
expect(Array.from(str)).to.eql(
['\u2500', '\ud800\udc00', '\udbff\udfff', '\ud800']
);
expect(Array.from(str)).to.eql(['\u2500', '\ud800\udc00', '\udbff\udfff', '\ud800']);
});
});

Expand Down

0 comments on commit 8583cbe

Please sign in to comment.